openapi: 3.0.0
info:
  title: Synerise Public API
  version: 1.2.1
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: Authorization
  - name: Authorization (deprecated)
  - name: Events
  - name: AI Events
  - name: Activities
  - name: Catalogs
  - name: Asset tags
  - name: Tags
  - name: Profile management
  - name: "Analytics: Expressions"
  - name: "Analytics: Aggregates"
  - name: Profile registration
  - name: Profile account management
  - name: Profile devices
  - name: Settings
  - name: Access control
  - name: User management
  - name: Access groups
  - name: User account management
  - name: Directory
  - name: Recommendation campaigns
  - name: Recommendation statistics
  - name: Recommendations
  - name: Search
  - name: Visual Search
  - name: Listing
  - name: Synonyms
  - name: Search Configuration
  - name: Suggestions Configuration
  - name: Query Rules
  - name: Search Stats
  - name: Promotions
  - name: Vouchers
  - name: Handbills
  - name: Screen views
  - name: Promotions points
  - name: Promotion settings
  - name: Promotion locks
  - name: Screen views (legacy)
  - name: Time Optimizer
  - name: Item filters
  - name: Documents
  - name: Uploader
  - name: Documents (legacy)
  - name: Templates
  - name: Template directories
  - name: Workflows
  - name: Data Processing Job Logs
  - name: Consumption
  - name: Organization workspaces
  - name: "Analytics: Funnels"
  - name: "Analytics: Histograms"
  - name: "Analytics: Metrics"
  - name: "AI: Metrics"
  - name: "Analytics: Reports"
  - name: "Analytics: Sankeys"
  - name: "Analytics: Segmentations"
  - name: "Analytics: Trends"
  - name: "Analytics: Management"
  - name: "Brickworks: Schemas"
  - name: "Brickworks: Records"
  - name: "Brickworks: Content generation"
  - name: "Brickworks: External sources"
  - name: "Brickworks: Record versions"
paths:
  /activities-api/activities/{clientId}:
    get:
      deprecated: true
      tags:
        - Activities
      summary: Get profile activities
      description: |
        Retrieve a list of activities from a single profile.

        ---

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

        **User role permission required:** `client_activities: read`
      operationId: getActivitiesPerClient
      security:
        - JWT: []
      parameters:
        - in: path
          name: clientId
          description: The ID of the profile
          required: true
          schema:
            type: number
            example: "434428563"
        - $ref: "#/components/parameters/activities-api-queryDateFrom"
        - $ref: "#/components/parameters/activities-api-queryDateTo"
        - $ref: "#/components/parameters/activities-api-queryActions"
        - $ref: "#/components/parameters/activities-api-queryLimit"
        - $ref: "#/components/parameters/activities-api-queryRaw"
        - $ref: "#/components/parameters/activities-api-queryFormat"
      responses:
        "200":
          description: Activities
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - $ref: "#/components/schemas/activities-api-ActivityTerrarium2"
                    - $ref: "#/components/schemas/activities-api-ActivityRaw2"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Activities/operation/getActivitiesPerClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/activities-api/activities/434428563?dateFrom=SOME_NUMBER_VALUE&dateTo=SOME_NUMBER_VALUE&actions=page.visit&limit=SOME_NUMBER_VALUE&raw=SOME_BOOLEAN_VALUE&format=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", "/activities-api/activities/434428563?dateFrom=SOME_NUMBER_VALUE&dateTo=SOME_NUMBER_VALUE&actions=page.visit&limit=SOME_NUMBER_VALUE&raw=SOME_BOOLEAN_VALUE&format=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/activities-api/activities/434428563?dateFrom=SOME_NUMBER_VALUE&dateTo=SOME_NUMBER_VALUE&actions=page.visit&limit=SOME_NUMBER_VALUE&raw=SOME_BOOLEAN_VALUE&format=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": "/activities-api/activities/434428563?dateFrom=SOME_NUMBER_VALUE&dateTo=SOME_NUMBER_VALUE&actions=page.visit&limit=SOME_NUMBER_VALUE&raw=SOME_BOOLEAN_VALUE&format=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/activities-api/activities/434428563');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'dateFrom' => 'SOME_NUMBER_VALUE',
              'dateTo' => 'SOME_NUMBER_VALUE',
              'actions' => 'page.visit',
              'limit' => 'SOME_NUMBER_VALUE',
              'raw' => 'SOME_BOOLEAN_VALUE',
              'format' => '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/activities-api/activities/434428563?dateFrom=SOME_NUMBER_VALUE&dateTo=SOME_NUMBER_VALUE&actions=page.visit&limit=SOME_NUMBER_VALUE&raw=SOME_BOOLEAN_VALUE&format=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /activities-api/activity/by/{identifierType}:
    post:
      deprecated: true
      tags:
        - Activities
      summary: Get a single activity
      description: |
        Retrieve the details of a single activity.

        ---

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

        **User role permission required:** `client_activities: read`
      operationId: getActivityForClient
      security:
        - JWT: []
      parameters:
        - in: path
          name: identifierType
          description: Profile identifier type
          required: true
          schema:
            type: string
            enum:
              - id
              - uuid
              - email
              - custom_identify
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/activities-api-SingleActivityRequest"
      responses:
        "200":
          description: Activity
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/activities-api-ActivityTerrarium1"
                  - $ref: "#/components/schemas/activities-api-ActivityRaw1"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Activities/operation/getActivityForClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/activities-api/activity/by/%7BidentifierType%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"identifierValue":"string","additionalData":{"time":"1667563770404","unique":"1245924049"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"identifierValue\":\"string\",\"additionalData\":{\"time\":\"1667563770404\",\"unique\":\"1245924049\"}}"

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

            conn.request("POST", "/activities-api/activity/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",
              "additionalData": {
                "time": "1667563770404",
                "unique": "1245924049"
              }
            });

            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/activities-api/activity/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": "/activities-api/activity/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',
              additionalData: {time: '1667563770404', unique: '1245924049'}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/activities-api/activity/by/%7BidentifierType%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"identifierValue":"string","additionalData":{"time":"1667563770404","unique":"1245924049"}}');

            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/activities-api/activity/by/%7BidentifierType%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"identifierValue\":\"string\",\"additionalData\":{\"time\":\"1667563770404\",\"unique\":\"1245924049\"}}")
              .asString();
  /activities-api/descriptions:
    post:
      tags:
        - Activities
      summary: Add description mapping
      description: |
        For each event, you can add a custom, human-readable description that's displayed in the Synerise Web Application

        ---

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

        **User role permission required:** `client_activities: update`
      operationId: addDescription
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/activities-api-descriptionRequest"
        description: Details of the description mapping
        required: true
      responses:
        "200":
          description: Description mapping
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/activities-api-descriptionResponse"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Activities/operation/addDescription
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/activities-api/descriptions \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"action":"page.visit","description":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"action\":\"page.visit\",\"description\":\"string\"}"

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

            conn.request("POST", "/activities-api/descriptions", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "action": "page.visit",
              "description": "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/activities-api/descriptions");
            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": "/activities-api/descriptions",
              "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({action: 'page.visit', description: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"action":"page.visit","description":"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/activities-api/descriptions")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"action\":\"page.visit\",\"description\":\"string\"}")
              .asString();
    get:
      tags:
        - Activities
      summary: Get description mappings
      description: |
        Retrieve a list of existing event-description mappings

        ---

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

        **User role permission required:** `client_activities: read`
      operationId: getDescription
      security:
        - JWT: []
      responses:
        "200":
          description: Description mappings
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/activities-api-descriptionResponse"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Activities/operation/getDescription
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/activities-api/descriptions \
              --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", "/activities-api/descriptions", 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/activities-api/descriptions");
            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": "/activities-api/descriptions",
              "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/activities-api/descriptions');
            $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/activities-api/descriptions")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /activities-api/descriptions/{descriptionId}:
    post:
      tags:
        - Activities
      summary: Update description mapping
      description: |
        Modify an existing description mapping

        ---

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

        **User role permission required:** `client_activities: update`
      operationId: updateDescriptionsById
      security:
        - JWT: []
      parameters:
        - in: path
          name: descriptionId
          description: ID of the mapping
          required: true
          schema:
            type: number
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/activities-api-descriptionRequest"
        description: Updated information
        required: true
      responses:
        "200":
          description: Description mapping
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/activities-api-descriptionResponse"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Activities/operation/updateDescriptionsById
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/activities-api/descriptions/%7BdescriptionId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"action":"page.visit","description":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"action\":\"page.visit\",\"description\":\"string\"}"

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

            conn.request("POST", "/activities-api/descriptions/%7BdescriptionId%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "action": "page.visit",
              "description": "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/activities-api/descriptions/%7BdescriptionId%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": "/activities-api/descriptions/%7BdescriptionId%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({action: 'page.visit', description: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/activities-api/descriptions/%7BdescriptionId%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"action":"page.visit","description":"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/activities-api/descriptions/%7BdescriptionId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"action\":\"page.visit\",\"description\":\"string\"}")
              .asString();
  /activities-api/labels:
    post:
      tags:
        - Activities
      summary: Add label mapping
      description: |
        For each event, you can add a custom, human-readable label that's displayed in the Synerise Web Application

        ---

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

        **User role permission required:** `client_activities: update`
      operationId: addLabel
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/activities-api-labelRequest"
        description: Details of the label mapping
        required: true
      responses:
        "200":
          description: Label mapping
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/activities-api-labelResponse"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Activities/operation/addLabel
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/activities-api/labels \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"action":"page.visit","label":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"action\":\"page.visit\",\"label\":\"string\"}"

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

            conn.request("POST", "/activities-api/labels", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "action": "page.visit",
              "label": "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/activities-api/labels");
            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": "/activities-api/labels",
              "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({action: 'page.visit', label: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"action":"page.visit","label":"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/activities-api/labels")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"action\":\"page.visit\",\"label\":\"string\"}")
              .asString();
    get:
      tags:
        - Activities
      summary: Get label mappings
      description: |
        Retrieve a list of existing event-label mappings

        ---

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

        **User role permission required:** `client_activities: read`
      operationId: getLabel
      security:
        - JWT: []
      responses:
        "200":
          description: Label mappings
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/activities-api-labelResponse"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Activities/operation/getLabel
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/activities-api/labels \
              --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", "/activities-api/labels", 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/activities-api/labels");
            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": "/activities-api/labels",
              "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/activities-api/labels');
            $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/activities-api/labels")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /activities-api/labels/{labelId}:
    post:
      tags:
        - Activities
      summary: Update label mapping
      description: |
        Modify an existing label mapping

        ---

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

        **User role permission required:** `client_activities: update`
      operationId: updateLabelById
      security:
        - JWT: []
      parameters:
        - in: path
          name: labelId
          description: ID of the mapping
          required: true
          schema:
            type: number
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/activities-api-labelRequest"
        description: Updated information
        required: true
      responses:
        "200":
          description: Label mapping
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/activities-api-labelResponse"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Activities/operation/updateLabelById
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/activities-api/labels/%7BlabelId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"action":"page.visit","label":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"action\":\"page.visit\",\"label\":\"string\"}"

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

            conn.request("POST", "/activities-api/labels/%7BlabelId%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "action": "page.visit",
              "label": "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/activities-api/labels/%7BlabelId%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": "/activities-api/labels/%7BlabelId%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({action: 'page.visit', label: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/activities-api/labels/%7BlabelId%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"action":"page.visit","label":"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/activities-api/labels/%7BlabelId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"action\":\"page.visit\",\"label\":\"string\"}")
              .asString();
  /activities-api/icons:
    post:
      tags:
        - Activities
      summary: Add icon mapping
      description: |
        For each event, you can add a custom icon that's displayed in the Synerise Web Application

        ---

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

        **User role permission required:** `client_activities: update`
      operationId: addIcon
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/activities-api-iconRequest"
        description: Icon details
        required: true
      responses:
        "200":
          description: Icon
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/activities-api-iconResponse"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Activities/operation/addIcon
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/activities-api/icons \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"action":"page.visit","icons":{"primary":"string","secondary":"string","color":"string"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"action\":\"page.visit\",\"icons\":{\"primary\":\"string\",\"secondary\":\"string\",\"color\":\"string\"}}"

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

            conn.request("POST", "/activities-api/icons", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "action": "page.visit",
              "icons": {
                "primary": "string",
                "secondary": "string",
                "color": "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/activities-api/icons");
            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": "/activities-api/icons",
              "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({
              action: 'page.visit',
              icons: {primary: 'string', secondary: 'string', color: 'string'}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"action":"page.visit","icons":{"primary":"string","secondary":"string","color":"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/activities-api/icons")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"action\":\"page.visit\",\"icons\":{\"primary\":\"string\",\"secondary\":\"string\",\"color\":\"string\"}}")
              .asString();
    get:
      tags:
        - Activities
      summary: Get icon mappings
      description: |
        Retrieve a list of existing event-icon mappings

        ---

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

        **User role permission required:** `client_activities: read`
      operationId: getIcons
      security:
        - JWT: []
      responses:
        "200":
          description: Icon mappings
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/activities-api-iconResponse"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Activities/operation/getIcons
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/activities-api/icons \
              --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", "/activities-api/icons", 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/activities-api/icons");
            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": "/activities-api/icons",
              "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/activities-api/icons');
            $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/activities-api/icons")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /activities-api/icons/{iconID}:
    post:
      tags:
        - Activities
      summary: Update icon mapping
      description: |
        Modify an existing icon mapping

        ---

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

        **User role permission required:** `client_activities: update`
      operationId: updateIconById
      security:
        - JWT: []
      parameters:
        - in: path
          name: iconID
          description: ID of the icon
          required: true
          schema:
            type: number
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/activities-api-iconRequest"
        description: Updated mapping data
        required: true
      responses:
        "200":
          description: Icon mapping
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/activities-api-iconResponse"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Activities/operation/updateIconById
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/activities-api/icons/%7BiconID%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"action":"page.visit","icons":{"primary":"string","secondary":"string","color":"string"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"action\":\"page.visit\",\"icons\":{\"primary\":\"string\",\"secondary\":\"string\",\"color\":\"string\"}}"

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

            conn.request("POST", "/activities-api/icons/%7BiconID%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "action": "page.visit",
              "icons": {
                "primary": "string",
                "secondary": "string",
                "color": "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/activities-api/icons/%7BiconID%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": "/activities-api/icons/%7BiconID%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({
              action: 'page.visit',
              icons: {primary: 'string', secondary: 'string', color: 'string'}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/activities-api/icons/%7BiconID%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"action":"page.visit","icons":{"primary":"string","secondary":"string","color":"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/activities-api/icons/%7BiconID%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"action\":\"page.visit\",\"icons\":{\"primary\":\"string\",\"secondary\":\"string\",\"color\":\"string\"}}")
              .asString();
  /activities-api/events:
    get:
      tags:
        - Activities
      summary: Get profile's own events
      description: |
        As a profile, retrieve a list of your own events.


        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>

        **User role permission required:** `client_activities: read`
      operationId: getEvents
      parameters:
        - $ref: "#/components/parameters/activities-api-queryActions"
        - $ref: "#/components/parameters/activities-api-queryDateFromV2"
        - $ref: "#/components/parameters/activities-api-queryDateToV2"
        - $ref: "#/components/parameters/activities-api-queryLimit"
        - $ref: "#/components/parameters/activities-api-queryRaw"
        - $ref: "#/components/parameters/activities-api-queryToken"
        - $ref: "#/components/parameters/activities-api-querySortBy"
      responses:
        "200":
          $ref: "#/components/responses/activities-api-EventResponse"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Activities/operation/getEvents
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/activities-api/events?actions=page.visit&dateFrom=SOME_NUMBER_VALUE&dateTo=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&raw=SOME_BOOLEAN_VALUE&pageToken=SOME_STRING_VALUE&sortBy=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", "/activities-api/events?actions=page.visit&dateFrom=SOME_NUMBER_VALUE&dateTo=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&raw=SOME_BOOLEAN_VALUE&pageToken=SOME_STRING_VALUE&sortBy=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/activities-api/events?actions=page.visit&dateFrom=SOME_NUMBER_VALUE&dateTo=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&raw=SOME_BOOLEAN_VALUE&pageToken=SOME_STRING_VALUE&sortBy=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": "/activities-api/events?actions=page.visit&dateFrom=SOME_NUMBER_VALUE&dateTo=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&raw=SOME_BOOLEAN_VALUE&pageToken=SOME_STRING_VALUE&sortBy=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/activities-api/events');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'actions' => 'page.visit',
              'dateFrom' => 'SOME_NUMBER_VALUE',
              'dateTo' => 'SOME_NUMBER_VALUE',
              'limit' => 'SOME_NUMBER_VALUE',
              'raw' => 'SOME_BOOLEAN_VALUE',
              'pageToken' => 'SOME_STRING_VALUE',
              'sortBy' => '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/activities-api/events?actions=page.visit&dateFrom=SOME_NUMBER_VALUE&dateTo=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&raw=SOME_BOOLEAN_VALUE&pageToken=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /activities-api/events/by/{identifierType}:
    post:
      tags:
        - Activities
      summary: Get profile events as a workspace/Synerise user
      description: |
        Retrieve a list of events for the single profile.


        ---

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

        **User role permission required:** `client_activities: read`
      operationId: getEventsByIdentifier
      parameters:
        - $ref: "#/components/parameters/activities-api-pathIdentifierType"
        - $ref: "#/components/parameters/activities-api-queryToken"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/activities-api-ClientEventsRequest"
      responses:
        "200":
          $ref: "#/components/responses/activities-api-EventResponse"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Activities/operation/getEventsByIdentifier
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api.synerise.com/activities-api/events/by/%7BidentifierType%7D?pageToken=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"identifierValue":"string","additionalData":{"actions":"page.visit,client.login","dateFrom":"1720688755000","dateTo":"1720695955000","limit":50,"raw":"true","pageToken":"string","sortBy":"time:desc"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"identifierValue\":\"string\",\"additionalData\":{\"actions\":\"page.visit,client.login\",\"dateFrom\":\"1720688755000\",\"dateTo\":\"1720695955000\",\"limit\":50,\"raw\":\"true\",\"pageToken\":\"string\",\"sortBy\":\"time:desc\"}}"

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

            conn.request("POST", "/activities-api/events/by/%7BidentifierType%7D?pageToken=SOME_STRING_VALUE", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "identifierValue": "string",
              "additionalData": {
                "actions": "page.visit,client.login",
                "dateFrom": "1720688755000",
                "dateTo": "1720695955000",
                "limit": 50,
                "raw": "true",
                "pageToken": "string",
                "sortBy": "time:desc"
              }
            });

            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/activities-api/events/by/%7BidentifierType%7D?pageToken=SOME_STRING_VALUE");
            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": "/activities-api/events/by/%7BidentifierType%7D?pageToken=SOME_STRING_VALUE",
              "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',
              additionalData: {
                actions: 'page.visit,client.login',
                dateFrom: '1720688755000',
                dateTo: '1720695955000',
                limit: 50,
                raw: 'true',
                pageToken: 'string',
                sortBy: 'time:desc'
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/activities-api/events/by/%7BidentifierType%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setQueryData([
              'pageToken' => 'SOME_STRING_VALUE'
            ]);

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

            $request->setBody('{"identifierValue":"string","additionalData":{"actions":"page.visit,client.login","dateFrom":"1720688755000","dateTo":"1720695955000","limit":50,"raw":"true","pageToken":"string","sortBy":"time:desc"}}');

            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/activities-api/events/by/%7BidentifierType%7D?pageToken=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"identifierValue\":\"string\",\"additionalData\":{\"actions\":\"page.visit,client.login\",\"dateFrom\":\"1720688755000\",\"dateTo\":\"1720695955000\",\"limit\":50,\"raw\":\"true\",\"pageToken\":\"string\",\"sortBy\":\"time:desc\"}}")
              .asString();
  /activity-time-estimator/v1/query-model:
    post:
      summary: Generate activity time predictions
      description: |
        Calculate the probability of a profile performing an activity (event) at specific times of the week.

        ---

        **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_TIME_OPTIMIZER_GET_PREDICTIONS_ANALYTICS_READ`

        **User role permission required:** `analytics_ai_time_optimizer: read`
      operationId: generate-time-predictions
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  title: With profile ID
                  required:
                    - clientID
                  properties:
                    clientID:
                      $ref: "#/components/schemas/activity-time-estimator-ClientIDs"
                    mode:
                      $ref: "#/components/schemas/activity-time-estimator-Mode"
                    timeIndex:
                      $ref: "#/components/schemas/activity-time-estimator-TimeIndex"
                    timeIndexExclude:
                      $ref: "#/components/schemas/activity-time-estimator-TimeIndexExclude"
                    topN:
                      $ref: "#/components/schemas/activity-time-estimator-TopN"
                - type: object
                  title: With profile UUID
                  required:
                    - clientUUID
                  properties:
                    clientUUID:
                      $ref: "#/components/schemas/activity-time-estimator-ClientUUIDs"
                    mode:
                      $ref: "#/components/schemas/activity-time-estimator-Mode"
                    timeIndex:
                      $ref: "#/components/schemas/activity-time-estimator-TimeIndex"
                    timeIndexExclude:
                      $ref: "#/components/schemas/activity-time-estimator-TimeIndexExclude"
                    topN:
                      $ref: "#/components/schemas/activity-time-estimator-TopN"
      responses:
        "200":
          description: Predicted activity times
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: With profile ID
                    properties:
                      clientID:
                        $ref: "#/components/schemas/activity-time-estimator-ClientIDs"
                      hours:
                        $ref: "#/components/schemas/activity-time-estimator-Hours"
                      predictions:
                        $ref: "#/components/schemas/activity-time-estimator-Predictions"
                  - type: object
                    title: With profile UUID
                    properties:
                      clientUUID:
                        $ref: "#/components/schemas/activity-time-estimator-ClientUUIDs"
                      hours:
                        $ref: "#/components/schemas/activity-time-estimator-Hours"
                      predictions:
                        $ref: "#/components/schemas/activity-time-estimator-Predictions"
      tags:
        - Time Optimizer
      x-snr-doc-urls:
        - /api-reference/ai-suite#tag/Time-Optimizer/operation/generate-time-predictions
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/activity-time-estimator/v1/query-model \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"clientID":["67346"],"mode":"standard","timeIndex":[[0,23],24,25,26,[27,48]],"timeIndexExclude":[[0,23],24,25,26],"topN":1}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"clientID\":[\"67346\"],\"mode\":\"standard\",\"timeIndex\":[[0,23],24,25,26,[27,48]],\"timeIndexExclude\":[[0,23],24,25,26],\"topN\":1}"

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

            conn.request("POST", "/activity-time-estimator/v1/query-model", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "clientID": [
                "67346"
              ],
              "mode": "standard",
              "timeIndex": [
                [
                  0,
                  23
                ],
                24,
                25,
                26,
                [
                  27,
                  48
                ]
              ],
              "timeIndexExclude": [
                [
                  0,
                  23
                ],
                24,
                25,
                26
              ],
              "topN": 1
            });

            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/activity-time-estimator/v1/query-model");
            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": "/activity-time-estimator/v1/query-model",
              "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({
              clientID: ['67346'],
              mode: 'standard',
              timeIndex: [[0, 23], 24, 25, 26, [27, 48]],
              timeIndexExclude: [[0, 23], 24, 25, 26],
              topN: 1
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/activity-time-estimator/v1/query-model');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"clientID":["67346"],"mode":"standard","timeIndex":[[0,23],24,25,26,[27,48]],"timeIndexExclude":[[0,23],24,25,26],"topN":1}');

            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/activity-time-estimator/v1/query-model")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"clientID\":[\"67346\"],\"mode\":\"standard\",\"timeIndex\":[[0,23],24,25,26,[27,48]],\"timeIndexExclude\":[[0,23],24,25,26],\"topN\":1}")
              .asString();
  /search/v2/indices/{indexId}/stats/queries/summary:
    get:
      summary: Get queries stats summary
      description: |
        Retrieves the statistics of all queries or a single query defined in the request.

        ---

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


        ---

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        ---

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        ---

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        ---

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/stats/queries/summary?indexId=SOME_ARRAY_VALUE&dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /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();
  /analytics/analytics/batch-delete:
    post:
      tags:
        - "Analytics: Management"
      summary: Delete multiple analyses
      description: |
        Deletes many analytics in a single request

        ---

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

        **User role permission required:** `analytics: delete`
      operationId: analytics2-analytics-batch-delete
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-AnalyticsBatchDeleteRequest"
        required: true
      responses:
        "204":
          description: Analytics deleted
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Management/operation/analytics2-analytics-batch-delete
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/analytics/batch-delete \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"funnelIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"segmentationIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"trendIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"metricIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"histogramIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"reportIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"aggregateIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"expressionIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"sankeyIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"funnelIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"segmentationIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"trendIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"metricIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"histogramIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"reportIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"aggregateIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"expressionIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"sankeyIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"]}"

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

            conn.request("POST", "/analytics/analytics/batch-delete", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "funnelIds": [
                "497f6eca-6276-4993-bfeb-53cbbbba6f08"
              ],
              "segmentationIds": [
                "497f6eca-6276-4993-bfeb-53cbbbba6f08"
              ],
              "trendIds": [
                "497f6eca-6276-4993-bfeb-53cbbbba6f08"
              ],
              "metricIds": [
                "497f6eca-6276-4993-bfeb-53cbbbba6f08"
              ],
              "histogramIds": [
                "497f6eca-6276-4993-bfeb-53cbbbba6f08"
              ],
              "reportIds": [
                "497f6eca-6276-4993-bfeb-53cbbbba6f08"
              ],
              "aggregateIds": [
                "497f6eca-6276-4993-bfeb-53cbbbba6f08"
              ],
              "expressionIds": [
                "497f6eca-6276-4993-bfeb-53cbbbba6f08"
              ],
              "sankeyIds": [
                "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/analytics/analytics/batch-delete");
            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": "/analytics/analytics/batch-delete",
              "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({
              funnelIds: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],
              segmentationIds: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],
              trendIds: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],
              metricIds: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],
              histogramIds: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],
              reportIds: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],
              aggregateIds: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],
              expressionIds: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],
              sankeyIds: ['497f6eca-6276-4993-bfeb-53cbbbba6f08']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"funnelIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"segmentationIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"trendIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"metricIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"histogramIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"reportIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"aggregateIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"expressionIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"sankeyIds":["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/analytics/analytics/batch-delete")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"funnelIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"segmentationIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"trendIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"metricIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"histogramIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"reportIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"aggregateIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"expressionIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"sankeyIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"]}")
              .asString();
  /analytics/{namespace}/metrics:
    get:
      tags:
        - "Analytics: Metrics"
      summary: List metrics
      description: |
        Returns a paginated list of metrics.

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-metrics-list
      parameters:
        - $ref: "#/components/parameters/analytics-page"
        - $ref: "#/components/parameters/analytics-limit"
        - $ref: "#/components/parameters/analytics-search"
        - $ref: "#/components/parameters/analytics-sortBy"
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-directoryId"
        - $ref: "#/components/parameters/analytics-ids"
      responses:
        "200":
          description: List of metrics
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: Array of metrics
                    items:
                      $ref: "#/components/schemas/analytics-MetricListItem"
                  meta:
                    $ref: "#/components/schemas/analytics-meta"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Metrics/operation/analytics2-metrics-list
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/analytics/%7Bnamespace%7D/metrics?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=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", "/analytics/%7Bnamespace%7D/metrics?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=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/analytics/%7Bnamespace%7D/metrics?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=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": "/analytics/%7Bnamespace%7D/metrics?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=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/analytics/%7Bnamespace%7D/metrics');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_INTEGER_VALUE',
              'limit' => 'SOME_INTEGER_VALUE',
              'search' => 'SOME_STRING_VALUE',
              'sortBy' => 'name:asc',
              'directoryId' => 'SOME_STRING_VALUE',
              'ids' => '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/analytics/%7Bnamespace%7D/metrics?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - "Analytics: Metrics"
      summary: Create metric analysis
      operationId: analytics2-metrics-create
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-MetricRequest"
      responses:
        "200":
          description: ID of the created analysis
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-id"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Metrics/operation/analytics2-metrics-create
      description: |
        

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_METRICS_CREATE`, `ANALYTICS_BACKEND_METRIC_CREATE`

        **User role permission required:** `analytics: create`
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/metrics \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"title":"string","description":"string","format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"comparison":{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}}},"metricType":"SIMPLE","expression":{"type":"VALUE","value":{"type":"EVENT","title":"string","occurrenceType":"FIRST","aggregation":{"type":"COUNT","level":0.01,"attribute":{"type":"PARAM","param":"string","id":0}},"action":{"id":0,"name":"page.visit"},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}},"isVisibleForClientProfile":true}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"comparison\":{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}}},\"metricType\":\"SIMPLE\",\"expression\":{\"type\":\"VALUE\",\"value\":{\"type\":\"EVENT\",\"title\":\"string\",\"occurrenceType\":\"FIRST\",\"aggregation\":{\"type\":\"COUNT\",\"level\":0.01,\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0}},\"action\":{\"id\":0,\"name\":\"page.visit\"},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}},\"isVisibleForClientProfile\":true}}"

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

            conn.request("POST", "/analytics/%7Bnamespace%7D/metrics", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "title": "string",
                "description": "string",
                "format": {
                  "compactNumbers": false,
                  "currency": "EUR",
                  "dataFormat": "cash",
                  "fixedLength": 0,
                  "useSeparator": false
                },
                "comparison": {
                  "dateFilter": {
                    "type": "ABSOLUTE",
                    "from": "2019-08-24T14:15:22Z",
                    "to": "2019-08-24T14:15:22Z",
                    "filter": {
                      "type": "DAILY",
                      "nestingType": "IN_PLACE",
                      "from": "string",
                      "to": "string",
                      "inverted": false
                    }
                  }
                },
                "metricType": "SIMPLE",
                "expression": {
                  "type": "VALUE",
                  "value": {
                    "type": "EVENT",
                    "title": "string",
                    "occurrenceType": "FIRST",
                    "aggregation": {
                      "type": "COUNT",
                      "level": 0.01,
                      "attribute": {
                        "type": "PARAM",
                        "param": "string",
                        "id": 0
                      }
                    },
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "dateFilter": {
                      "type": "ABSOLUTE",
                      "from": "2019-08-24T14:15:22Z",
                      "to": "2019-08-24T14:15:22Z",
                      "filter": {
                        "type": "DAILY",
                        "nestingType": "IN_PLACE",
                        "from": "string",
                        "to": "string",
                        "inverted": false
                      }
                    },
                    "filter": {
                      "matching": true,
                      "expressions": [
                        {
                          "type": "FUNNEL",
                          "matching": true,
                          "funnel": {
                            "completedWithin": {
                              "period": "YEARS",
                              "value": 0
                            },
                            "dateFilter": {
                              "type": "ABSOLUTE",
                              "from": "2019-08-24T14:15:22Z",
                              "to": "2019-08-24T14:15:22Z",
                              "filter": {
                                "type": "DAILY",
                                "nestingType": "IN_PLACE",
                                "from": "string",
                                "to": "string",
                                "inverted": false
                              }
                            },
                            "exact": false,
                            "steps": [
                              {
                                "title": "string",
                                "action": {
                                  "id": 0,
                                  "name": "page.visit"
                                },
                                "expressions": [
                                  {
                                    "attribute": {
                                      "type": "PARAM",
                                      "param": "string",
                                      "id": 0
                                    },
                                    "constraint": {
                                      "type": "BOOL",
                                      "logic": "IS_TRUE"
                                    }
                                  }
                                ]
                              }
                            ],
                            "title": "string"
                          }
                        }
                      ],
                      "expression": {}
                    },
                    "expressions": [
                      {
                        "attribute": {
                          "type": "PARAM",
                          "param": "string",
                          "id": 0
                        },
                        "constraint": {
                          "type": "BOOL",
                          "logic": "IS_TRUE"
                        }
                      }
                    ]
                  }
                },
                "isVisibleForClientProfile": 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/analytics/%7Bnamespace%7D/metrics");
            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": "/analytics/%7Bnamespace%7D/metrics",
              "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({
              analysis: {
                title: 'string',
                description: 'string',
                format: {
                  compactNumbers: false,
                  currency: 'EUR',
                  dataFormat: 'cash',
                  fixedLength: 0,
                  useSeparator: false
                },
                comparison: {
                  dateFilter: {
                    type: 'ABSOLUTE',
                    from: '2019-08-24T14:15:22Z',
                    to: '2019-08-24T14:15:22Z',
                    filter: {
                      type: 'DAILY',
                      nestingType: 'IN_PLACE',
                      from: 'string',
                      to: 'string',
                      inverted: false
                    }
                  }
                },
                metricType: 'SIMPLE',
                expression: {
                  type: 'VALUE',
                  value: {
                    type: 'EVENT',
                    title: 'string',
                    occurrenceType: 'FIRST',
                    aggregation: {type: 'COUNT', level: 0.01, attribute: {type: 'PARAM', param: 'string', id: 0}},
                    action: {id: 0, name: 'page.visit'},
                    dateFilter: {
                      type: 'ABSOLUTE',
                      from: '2019-08-24T14:15:22Z',
                      to: '2019-08-24T14:15:22Z',
                      filter: {
                        type: 'DAILY',
                        nestingType: 'IN_PLACE',
                        from: 'string',
                        to: 'string',
                        inverted: false
                      }
                    },
                    filter: {
                      matching: true,
                      expressions: [
                        {
                          type: 'FUNNEL',
                          matching: true,
                          funnel: {
                            completedWithin: {period: 'YEARS', value: 0},
                            dateFilter: {
                              type: 'ABSOLUTE',
                              from: '2019-08-24T14:15:22Z',
                              to: '2019-08-24T14:15:22Z',
                              filter: {
                                type: 'DAILY',
                                nestingType: 'IN_PLACE',
                                from: 'string',
                                to: 'string',
                                inverted: false
                              }
                            },
                            exact: false,
                            steps: [
                              {
                                title: 'string',
                                action: {id: 0, name: 'page.visit'},
                                expressions: [
                                  {
                                    attribute: {type: 'PARAM', param: 'string', id: 0},
                                    constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                                  }
                                ]
                              }
                            ],
                            title: 'string'
                          }
                        }
                      ],
                      expression: {}
                    },
                    expressions: [
                      {
                        attribute: {type: 'PARAM', param: 'string', id: 0},
                        constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                      }
                    ]
                  }
                },
                isVisibleForClientProfile: true
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/%7Bnamespace%7D/metrics');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"analysis":{"title":"string","description":"string","format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"comparison":{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}}},"metricType":"SIMPLE","expression":{"type":"VALUE","value":{"type":"EVENT","title":"string","occurrenceType":"FIRST","aggregation":{"type":"COUNT","level":0.01,"attribute":{"type":"PARAM","param":"string","id":0}},"action":{"id":0,"name":"page.visit"},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}},"isVisibleForClientProfile":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/analytics/%7Bnamespace%7D/metrics")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"comparison\":{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}}},\"metricType\":\"SIMPLE\",\"expression\":{\"type\":\"VALUE\",\"value\":{\"type\":\"EVENT\",\"title\":\"string\",\"occurrenceType\":\"FIRST\",\"aggregation\":{\"type\":\"COUNT\",\"level\":0.01,\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0}},\"action\":{\"id\":0,\"name\":\"page.visit\"},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}},\"isVisibleForClientProfile\":true}}")
              .asString();
  /analytics/{namespace}/metrics/{metricId}:
    get:
      tags:
        - "Analytics: Metrics"
      summary: Get metric details
      description: |
        Retrieve the details of a metric definition.

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_METRICS_READ`, `ANALYTICS_BACKEND_METRIC_READ`

        **User role permission required:** `analytics: read`
      operationId: analytics2-metrics-get
      parameters:
        - $ref: "#/components/parameters/analytics-metricIdAsPathParam"
        - $ref: "#/components/parameters/analytics-pathNamespace"
      responses:
        "200":
          description: Metric details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-Metric"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Metrics/operation/analytics2-metrics-get
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/metrics/%7BmetricId%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", "/analytics/%7Bnamespace%7D/metrics/%7BmetricId%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/analytics/%7Bnamespace%7D/metrics/%7BmetricId%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": "/analytics/%7Bnamespace%7D/metrics/%7BmetricId%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/analytics/%7Bnamespace%7D/metrics/%7BmetricId%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/analytics/%7Bnamespace%7D/metrics/%7BmetricId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    put:
      tags:
        - "Analytics: Metrics"
      summary: Update metric
      description: |
        Update an existing metric definition.

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_METRICS_UPDATE`, `ANALYTICS_BACKEND_METRIC_UPDATE`

        **User role permission required:** `analytics: update`
      operationId: analytics2-metrics-update
      parameters:
        - $ref: "#/components/parameters/analytics-metricIdAsPathParam"
        - $ref: "#/components/parameters/analytics-pathNamespace"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-MetricRequest"
      responses:
        "200":
          description: Metric details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-Metric"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Metrics/operation/analytics2-metrics-update
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/metrics/%7BmetricId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"title":"string","description":"string","format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"comparison":{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}}},"metricType":"SIMPLE","expression":{"type":"VALUE","value":{"type":"EVENT","title":"string","occurrenceType":"FIRST","aggregation":{"type":"COUNT","level":0.01,"attribute":{"type":"PARAM","param":"string","id":0}},"action":{"id":0,"name":"page.visit"},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}},"isVisibleForClientProfile":true}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"comparison\":{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}}},\"metricType\":\"SIMPLE\",\"expression\":{\"type\":\"VALUE\",\"value\":{\"type\":\"EVENT\",\"title\":\"string\",\"occurrenceType\":\"FIRST\",\"aggregation\":{\"type\":\"COUNT\",\"level\":0.01,\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0}},\"action\":{\"id\":0,\"name\":\"page.visit\"},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}},\"isVisibleForClientProfile\":true}}"

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

            conn.request("PUT", "/analytics/%7Bnamespace%7D/metrics/%7BmetricId%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "title": "string",
                "description": "string",
                "format": {
                  "compactNumbers": false,
                  "currency": "EUR",
                  "dataFormat": "cash",
                  "fixedLength": 0,
                  "useSeparator": false
                },
                "comparison": {
                  "dateFilter": {
                    "type": "ABSOLUTE",
                    "from": "2019-08-24T14:15:22Z",
                    "to": "2019-08-24T14:15:22Z",
                    "filter": {
                      "type": "DAILY",
                      "nestingType": "IN_PLACE",
                      "from": "string",
                      "to": "string",
                      "inverted": false
                    }
                  }
                },
                "metricType": "SIMPLE",
                "expression": {
                  "type": "VALUE",
                  "value": {
                    "type": "EVENT",
                    "title": "string",
                    "occurrenceType": "FIRST",
                    "aggregation": {
                      "type": "COUNT",
                      "level": 0.01,
                      "attribute": {
                        "type": "PARAM",
                        "param": "string",
                        "id": 0
                      }
                    },
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "dateFilter": {
                      "type": "ABSOLUTE",
                      "from": "2019-08-24T14:15:22Z",
                      "to": "2019-08-24T14:15:22Z",
                      "filter": {
                        "type": "DAILY",
                        "nestingType": "IN_PLACE",
                        "from": "string",
                        "to": "string",
                        "inverted": false
                      }
                    },
                    "filter": {
                      "matching": true,
                      "expressions": [
                        {
                          "type": "FUNNEL",
                          "matching": true,
                          "funnel": {
                            "completedWithin": {
                              "period": "YEARS",
                              "value": 0
                            },
                            "dateFilter": {
                              "type": "ABSOLUTE",
                              "from": "2019-08-24T14:15:22Z",
                              "to": "2019-08-24T14:15:22Z",
                              "filter": {
                                "type": "DAILY",
                                "nestingType": "IN_PLACE",
                                "from": "string",
                                "to": "string",
                                "inverted": false
                              }
                            },
                            "exact": false,
                            "steps": [
                              {
                                "title": "string",
                                "action": {
                                  "id": 0,
                                  "name": "page.visit"
                                },
                                "expressions": [
                                  {
                                    "attribute": {
                                      "type": "PARAM",
                                      "param": "string",
                                      "id": 0
                                    },
                                    "constraint": {
                                      "type": "BOOL",
                                      "logic": "IS_TRUE"
                                    }
                                  }
                                ]
                              }
                            ],
                            "title": "string"
                          }
                        }
                      ],
                      "expression": {}
                    },
                    "expressions": [
                      {
                        "attribute": {
                          "type": "PARAM",
                          "param": "string",
                          "id": 0
                        },
                        "constraint": {
                          "type": "BOOL",
                          "logic": "IS_TRUE"
                        }
                      }
                    ]
                  }
                },
                "isVisibleForClientProfile": true
              }
            });

            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/analytics/%7Bnamespace%7D/metrics/%7BmetricId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/analytics/%7Bnamespace%7D/metrics/%7BmetricId%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({
              analysis: {
                title: 'string',
                description: 'string',
                format: {
                  compactNumbers: false,
                  currency: 'EUR',
                  dataFormat: 'cash',
                  fixedLength: 0,
                  useSeparator: false
                },
                comparison: {
                  dateFilter: {
                    type: 'ABSOLUTE',
                    from: '2019-08-24T14:15:22Z',
                    to: '2019-08-24T14:15:22Z',
                    filter: {
                      type: 'DAILY',
                      nestingType: 'IN_PLACE',
                      from: 'string',
                      to: 'string',
                      inverted: false
                    }
                  }
                },
                metricType: 'SIMPLE',
                expression: {
                  type: 'VALUE',
                  value: {
                    type: 'EVENT',
                    title: 'string',
                    occurrenceType: 'FIRST',
                    aggregation: {type: 'COUNT', level: 0.01, attribute: {type: 'PARAM', param: 'string', id: 0}},
                    action: {id: 0, name: 'page.visit'},
                    dateFilter: {
                      type: 'ABSOLUTE',
                      from: '2019-08-24T14:15:22Z',
                      to: '2019-08-24T14:15:22Z',
                      filter: {
                        type: 'DAILY',
                        nestingType: 'IN_PLACE',
                        from: 'string',
                        to: 'string',
                        inverted: false
                      }
                    },
                    filter: {
                      matching: true,
                      expressions: [
                        {
                          type: 'FUNNEL',
                          matching: true,
                          funnel: {
                            completedWithin: {period: 'YEARS', value: 0},
                            dateFilter: {
                              type: 'ABSOLUTE',
                              from: '2019-08-24T14:15:22Z',
                              to: '2019-08-24T14:15:22Z',
                              filter: {
                                type: 'DAILY',
                                nestingType: 'IN_PLACE',
                                from: 'string',
                                to: 'string',
                                inverted: false
                              }
                            },
                            exact: false,
                            steps: [
                              {
                                title: 'string',
                                action: {id: 0, name: 'page.visit'},
                                expressions: [
                                  {
                                    attribute: {type: 'PARAM', param: 'string', id: 0},
                                    constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                                  }
                                ]
                              }
                            ],
                            title: 'string'
                          }
                        }
                      ],
                      expression: {}
                    },
                    expressions: [
                      {
                        attribute: {type: 'PARAM', param: 'string', id: 0},
                        constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                      }
                    ]
                  }
                },
                isVisibleForClientProfile: true
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/%7Bnamespace%7D/metrics/%7BmetricId%7D');
            $request->setMethod(HTTP_METH_PUT);

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

            $request->setBody('{"analysis":{"title":"string","description":"string","format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"comparison":{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}}},"metricType":"SIMPLE","expression":{"type":"VALUE","value":{"type":"EVENT","title":"string","occurrenceType":"FIRST","aggregation":{"type":"COUNT","level":0.01,"attribute":{"type":"PARAM","param":"string","id":0}},"action":{"id":0,"name":"page.visit"},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}},"isVisibleForClientProfile":true}}');

            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/analytics/%7Bnamespace%7D/metrics/%7BmetricId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"comparison\":{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}}},\"metricType\":\"SIMPLE\",\"expression\":{\"type\":\"VALUE\",\"value\":{\"type\":\"EVENT\",\"title\":\"string\",\"occurrenceType\":\"FIRST\",\"aggregation\":{\"type\":\"COUNT\",\"level\":0.01,\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0}},\"action\":{\"id\":0,\"name\":\"page.visit\"},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}},\"isVisibleForClientProfile\":true}}")
              .asString();
    delete:
      tags:
        - "Analytics: Metrics"
      summary: Delete metric analysis
      operationId: analytics2-metrics-delete
      parameters:
        - $ref: "#/components/parameters/analytics-metricIdAsPathParam"
        - $ref: "#/components/parameters/analytics-pathNamespace"
      responses:
        "204":
          description: Metric deleted
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Metrics/operation/analytics2-metrics-delete
      description: |
        

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_METRICS_DELETE`, `ANALYTICS_BACKEND_METRIC_DELETE`

        **User role permission required:** `analytics: delete`
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/metrics/%7BmetricId%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", "/analytics/%7Bnamespace%7D/metrics/%7BmetricId%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/analytics/%7Bnamespace%7D/metrics/%7BmetricId%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": "/analytics/%7Bnamespace%7D/metrics/%7BmetricId%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/analytics/%7Bnamespace%7D/metrics/%7BmetricId%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/analytics/%7Bnamespace%7D/metrics/%7BmetricId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /analytics/analytics/v4/reports/{reportId}/recalculate/override:
    post:
      tags:
        - "Analytics: Reports"
      summary: Calculate report with override
      description: |
        Calculate a report with new parameters and/or variables (dynamic keys)

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-recalculate-report-override
      parameters:
        - $ref: "#/components/parameters/analytics-reportIdAsPathParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-OverrideQueryRequest"
      responses:
        "200":
          description: Report calculation result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-ReportCalculationResponse"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Reports/operation/analytics2-recalculate-report-override
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/analytics/v4/reports/%7BreportId%7D/recalculate/override \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"aggregateDataBy":{"type":"YEARS","value":0},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"variables":[{"name":"string","value":"string"}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"variables\":[{\"name\":\"string\",\"value\":\"string\"}]}"

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

            conn.request("POST", "/analytics/analytics/v4/reports/%7BreportId%7D/recalculate/override", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "dateFilter": {
                "type": "ABSOLUTE",
                "from": "2019-08-24T14:15:22Z",
                "to": "2019-08-24T14:15:22Z",
                "filter": {
                  "type": "DAILY",
                  "nestingType": "IN_PLACE",
                  "from": "string",
                  "to": "string",
                  "inverted": false
                }
              },
              "aggregateDataBy": {
                "type": "YEARS",
                "value": 0
              },
              "filter": {
                "matching": true,
                "expressions": [
                  {
                    "type": "FUNNEL",
                    "matching": true,
                    "funnel": {
                      "completedWithin": {
                        "period": "YEARS",
                        "value": 0
                      },
                      "dateFilter": {
                        "type": "ABSOLUTE",
                        "from": "2019-08-24T14:15:22Z",
                        "to": "2019-08-24T14:15:22Z",
                        "filter": {
                          "type": "DAILY",
                          "nestingType": "IN_PLACE",
                          "from": "string",
                          "to": "string",
                          "inverted": false
                        }
                      },
                      "exact": false,
                      "steps": [
                        {
                          "title": "string",
                          "action": {
                            "id": 0,
                            "name": "page.visit"
                          },
                          "expressions": [
                            {
                              "attribute": {
                                "type": "PARAM",
                                "param": "string",
                                "id": 0
                              },
                              "constraint": {
                                "type": "BOOL",
                                "logic": "IS_TRUE"
                              }
                            }
                          ]
                        }
                      ],
                      "title": "string"
                    }
                  }
                ],
                "expression": {}
              },
              "variables": [
                {
                  "name": "string",
                  "value": "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/analytics/analytics/v4/reports/%7BreportId%7D/recalculate/override");
            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": "/analytics/analytics/v4/reports/%7BreportId%7D/recalculate/override",
              "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({
              dateFilter: {
                type: 'ABSOLUTE',
                from: '2019-08-24T14:15:22Z',
                to: '2019-08-24T14:15:22Z',
                filter: {
                  type: 'DAILY',
                  nestingType: 'IN_PLACE',
                  from: 'string',
                  to: 'string',
                  inverted: false
                }
              },
              aggregateDataBy: {type: 'YEARS', value: 0},
              filter: {
                matching: true,
                expressions: [
                  {
                    type: 'FUNNEL',
                    matching: true,
                    funnel: {
                      completedWithin: {period: 'YEARS', value: 0},
                      dateFilter: {
                        type: 'ABSOLUTE',
                        from: '2019-08-24T14:15:22Z',
                        to: '2019-08-24T14:15:22Z',
                        filter: {
                          type: 'DAILY',
                          nestingType: 'IN_PLACE',
                          from: 'string',
                          to: 'string',
                          inverted: false
                        }
                      },
                      exact: false,
                      steps: [
                        {
                          title: 'string',
                          action: {id: 0, name: 'page.visit'},
                          expressions: [
                            {
                              attribute: {type: 'PARAM', param: 'string', id: 0},
                              constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                            }
                          ]
                        }
                      ],
                      title: 'string'
                    }
                  }
                ],
                expression: {}
              },
              variables: [{name: 'string', value: 'string'}]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/analytics/v4/reports/%7BreportId%7D/recalculate/override');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"aggregateDataBy":{"type":"YEARS","value":0},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"variables":[{"name":"string","value":"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/analytics/analytics/v4/reports/%7BreportId%7D/recalculate/override")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"variables\":[{\"name\":\"string\",\"value\":\"string\"}]}")
              .asString();
  /analytics/analytics/v4/reports/{reportId}/recalculate:
    post:
      tags:
        - "Analytics: Reports"
      summary: Recalculate report
      description: |
        Retrieve the results of a previously-created report.

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-recalculate-report
      parameters:
        - $ref: "#/components/parameters/analytics-reportIdAsPathParam"
      responses:
        "200":
          description: Report calculation result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-ReportCalculationResponse"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Reports/operation/analytics2-recalculate-report
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/analytics/v4/reports/%7BreportId%7D/recalculate \
              --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", "/analytics/analytics/v4/reports/%7BreportId%7D/recalculate", 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/analytics/analytics/v4/reports/%7BreportId%7D/recalculate");
            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": "/analytics/analytics/v4/reports/%7BreportId%7D/recalculate",
              "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/analytics/analytics/v4/reports/%7BreportId%7D/recalculate');
            $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/analytics/analytics/v4/reports/%7BreportId%7D/recalculate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /analytics/analytics/v4/reports/preview:
    post:
      tags:
        - "Analytics: Reports"
      summary: Preview report
      description: |
        Retrieve the results of a report. This request doesn't save the report.

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-preview-report
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-ReportRequest"
      responses:
        "200":
          description: Report calculation result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-ReportCalculationResponse"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Reports/operation/analytics2-preview-report
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/analytics/v4/reports/preview \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"reportMetrics":[{"metricId":"c2cc9ad9-a69d-40a3-8e01-a95e09e71978","dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"action":{"id":0,"name":"page.visit"},"format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"columnName":"string","grouping":{"type":"TOP","top":0},"groups":[{"title":"string","format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"type":"CLIENT","attribute":{"type":"SEGMENTATION","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08"}}]}]},"allowNull":true}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"reportMetrics\":[{\"metricId\":\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\",\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"action\":{\"id\":0,\"name\":\"page.visit\"},\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"columnName\":\"string\",\"grouping\":{\"type\":\"TOP\",\"top\":0},\"groups\":[{\"title\":\"string\",\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"type\":\"CLIENT\",\"attribute\":{\"type\":\"SEGMENTATION\",\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"}}]}]},\"allowNull\":true}"

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

            conn.request("POST", "/analytics/analytics/v4/reports/preview", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "title": "string",
                "description": "string",
                "filter": {
                  "matching": true,
                  "expressions": [
                    {
                      "type": "FUNNEL",
                      "matching": true,
                      "funnel": {
                        "completedWithin": {
                          "period": "YEARS",
                          "value": 0
                        },
                        "dateFilter": {
                          "type": "ABSOLUTE",
                          "from": "2019-08-24T14:15:22Z",
                          "to": "2019-08-24T14:15:22Z",
                          "filter": {
                            "type": "DAILY",
                            "nestingType": "IN_PLACE",
                            "from": "string",
                            "to": "string",
                            "inverted": false
                          }
                        },
                        "exact": false,
                        "steps": [
                          {
                            "title": "string",
                            "action": {
                              "id": 0,
                              "name": "page.visit"
                            },
                            "expressions": [
                              {
                                "attribute": {
                                  "type": "PARAM",
                                  "param": "string",
                                  "id": 0
                                },
                                "constraint": {
                                  "type": "BOOL",
                                  "logic": "IS_TRUE"
                                }
                              }
                            ]
                          }
                        ],
                        "title": "string"
                      }
                    }
                  ],
                  "expression": {}
                },
                "reportMetrics": [
                  {
                    "metricId": "c2cc9ad9-a69d-40a3-8e01-a95e09e71978",
                    "dateFilter": {
                      "type": "ABSOLUTE",
                      "from": "2019-08-24T14:15:22Z",
                      "to": "2019-08-24T14:15:22Z",
                      "filter": {
                        "type": "DAILY",
                        "nestingType": "IN_PLACE",
                        "from": "string",
                        "to": "string",
                        "inverted": false
                      }
                    },
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "format": {
                      "compactNumbers": false,
                      "currency": "EUR",
                      "dataFormat": "cash",
                      "fixedLength": 0,
                      "useSeparator": false
                    },
                    "columnName": "string",
                    "grouping": {
                      "type": "TOP",
                      "top": 0
                    },
                    "groups": [
                      {
                        "title": "string",
                        "format": {
                          "compactNumbers": false,
                          "currency": "EUR",
                          "dataFormat": "cash",
                          "fixedLength": 0,
                          "useSeparator": false
                        },
                        "type": "CLIENT",
                        "attribute": {
                          "type": "SEGMENTATION",
                          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
                        }
                      }
                    ]
                  }
                ]
              },
              "allowNull": 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/analytics/analytics/v4/reports/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": "/analytics/analytics/v4/reports/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({
              analysis: {
                title: 'string',
                description: 'string',
                filter: {
                  matching: true,
                  expressions: [
                    {
                      type: 'FUNNEL',
                      matching: true,
                      funnel: {
                        completedWithin: {period: 'YEARS', value: 0},
                        dateFilter: {
                          type: 'ABSOLUTE',
                          from: '2019-08-24T14:15:22Z',
                          to: '2019-08-24T14:15:22Z',
                          filter: {
                            type: 'DAILY',
                            nestingType: 'IN_PLACE',
                            from: 'string',
                            to: 'string',
                            inverted: false
                          }
                        },
                        exact: false,
                        steps: [
                          {
                            title: 'string',
                            action: {id: 0, name: 'page.visit'},
                            expressions: [
                              {
                                attribute: {type: 'PARAM', param: 'string', id: 0},
                                constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                              }
                            ]
                          }
                        ],
                        title: 'string'
                      }
                    }
                  ],
                  expression: {}
                },
                reportMetrics: [
                  {
                    metricId: 'c2cc9ad9-a69d-40a3-8e01-a95e09e71978',
                    dateFilter: {
                      type: 'ABSOLUTE',
                      from: '2019-08-24T14:15:22Z',
                      to: '2019-08-24T14:15:22Z',
                      filter: {
                        type: 'DAILY',
                        nestingType: 'IN_PLACE',
                        from: 'string',
                        to: 'string',
                        inverted: false
                      }
                    },
                    action: {id: 0, name: 'page.visit'},
                    format: {
                      compactNumbers: false,
                      currency: 'EUR',
                      dataFormat: 'cash',
                      fixedLength: 0,
                      useSeparator: false
                    },
                    columnName: 'string',
                    grouping: {type: 'TOP', top: 0},
                    groups: [
                      {
                        title: 'string',
                        format: {
                          compactNumbers: false,
                          currency: 'EUR',
                          dataFormat: 'cash',
                          fixedLength: 0,
                          useSeparator: false
                        },
                        type: 'CLIENT',
                        attribute: {type: 'SEGMENTATION', id: '497f6eca-6276-4993-bfeb-53cbbbba6f08'}
                      }
                    ]
                  }
                ]
              },
              allowNull: true
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/analytics/v4/reports/preview');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"analysis":{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"reportMetrics":[{"metricId":"c2cc9ad9-a69d-40a3-8e01-a95e09e71978","dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"action":{"id":0,"name":"page.visit"},"format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"columnName":"string","grouping":{"type":"TOP","top":0},"groups":[{"title":"string","format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"type":"CLIENT","attribute":{"type":"SEGMENTATION","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08"}}]}]},"allowNull":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/analytics/analytics/v4/reports/preview")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"reportMetrics\":[{\"metricId\":\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\",\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"action\":{\"id\":0,\"name\":\"page.visit\"},\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"columnName\":\"string\",\"grouping\":{\"type\":\"TOP\",\"top\":0},\"groups\":[{\"title\":\"string\",\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"type\":\"CLIENT\",\"attribute\":{\"type\":\"SEGMENTATION\",\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"}}]}]},\"allowNull\":true}")
              .asString();
  /analytics/analytics/v4/reports/preview-csv:
    post:
      tags:
        - "Analytics: Reports"
      summary: Preview report as CSV
      description: |
        Retrieve the results of a report as CSV. This request doesn't save the report.

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-preview-csv-report
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-ReportRequest"
      responses:
        "200":
          description: CSV data
          content:
            text/csv:
              schema:
                type: string
                description: |
                  Results for groupings. Each grouping is a CSV row, with the first row being the column headers.

                  **Example**: if the dimensions of your report are _firstname_ and _title_ in a page visit event, this may be the result:

                  ```
                  "firstname";"title";"Value"
                  "John";"Discounted Product Page";"26.0"
                  "Steve";"Discounted Product Page";"12.0"
                  "Steve";"New product pre-order";"117.0"
                  ```

                  This means that 26 profiles named John visited a page titled "Discounted Product Page". The same page was visited by 12 profiles named Steve. Profiles named Steve visited "New product pre-order" page 117 times.
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Reports/operation/analytics2-preview-csv-report
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/analytics/v4/reports/preview-csv \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"reportMetrics":[{"metricId":"c2cc9ad9-a69d-40a3-8e01-a95e09e71978","dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"action":{"id":0,"name":"page.visit"},"format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"columnName":"string","grouping":{"type":"TOP","top":0},"groups":[{"title":"string","format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"type":"CLIENT","attribute":{"type":"SEGMENTATION","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08"}}]}]},"allowNull":true}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"reportMetrics\":[{\"metricId\":\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\",\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"action\":{\"id\":0,\"name\":\"page.visit\"},\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"columnName\":\"string\",\"grouping\":{\"type\":\"TOP\",\"top\":0},\"groups\":[{\"title\":\"string\",\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"type\":\"CLIENT\",\"attribute\":{\"type\":\"SEGMENTATION\",\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"}}]}]},\"allowNull\":true}"

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

            conn.request("POST", "/analytics/analytics/v4/reports/preview-csv", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "title": "string",
                "description": "string",
                "filter": {
                  "matching": true,
                  "expressions": [
                    {
                      "type": "FUNNEL",
                      "matching": true,
                      "funnel": {
                        "completedWithin": {
                          "period": "YEARS",
                          "value": 0
                        },
                        "dateFilter": {
                          "type": "ABSOLUTE",
                          "from": "2019-08-24T14:15:22Z",
                          "to": "2019-08-24T14:15:22Z",
                          "filter": {
                            "type": "DAILY",
                            "nestingType": "IN_PLACE",
                            "from": "string",
                            "to": "string",
                            "inverted": false
                          }
                        },
                        "exact": false,
                        "steps": [
                          {
                            "title": "string",
                            "action": {
                              "id": 0,
                              "name": "page.visit"
                            },
                            "expressions": [
                              {
                                "attribute": {
                                  "type": "PARAM",
                                  "param": "string",
                                  "id": 0
                                },
                                "constraint": {
                                  "type": "BOOL",
                                  "logic": "IS_TRUE"
                                }
                              }
                            ]
                          }
                        ],
                        "title": "string"
                      }
                    }
                  ],
                  "expression": {}
                },
                "reportMetrics": [
                  {
                    "metricId": "c2cc9ad9-a69d-40a3-8e01-a95e09e71978",
                    "dateFilter": {
                      "type": "ABSOLUTE",
                      "from": "2019-08-24T14:15:22Z",
                      "to": "2019-08-24T14:15:22Z",
                      "filter": {
                        "type": "DAILY",
                        "nestingType": "IN_PLACE",
                        "from": "string",
                        "to": "string",
                        "inverted": false
                      }
                    },
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "format": {
                      "compactNumbers": false,
                      "currency": "EUR",
                      "dataFormat": "cash",
                      "fixedLength": 0,
                      "useSeparator": false
                    },
                    "columnName": "string",
                    "grouping": {
                      "type": "TOP",
                      "top": 0
                    },
                    "groups": [
                      {
                        "title": "string",
                        "format": {
                          "compactNumbers": false,
                          "currency": "EUR",
                          "dataFormat": "cash",
                          "fixedLength": 0,
                          "useSeparator": false
                        },
                        "type": "CLIENT",
                        "attribute": {
                          "type": "SEGMENTATION",
                          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
                        }
                      }
                    ]
                  }
                ]
              },
              "allowNull": 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/analytics/analytics/v4/reports/preview-csv");
            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": "/analytics/analytics/v4/reports/preview-csv",
              "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({
              analysis: {
                title: 'string',
                description: 'string',
                filter: {
                  matching: true,
                  expressions: [
                    {
                      type: 'FUNNEL',
                      matching: true,
                      funnel: {
                        completedWithin: {period: 'YEARS', value: 0},
                        dateFilter: {
                          type: 'ABSOLUTE',
                          from: '2019-08-24T14:15:22Z',
                          to: '2019-08-24T14:15:22Z',
                          filter: {
                            type: 'DAILY',
                            nestingType: 'IN_PLACE',
                            from: 'string',
                            to: 'string',
                            inverted: false
                          }
                        },
                        exact: false,
                        steps: [
                          {
                            title: 'string',
                            action: {id: 0, name: 'page.visit'},
                            expressions: [
                              {
                                attribute: {type: 'PARAM', param: 'string', id: 0},
                                constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                              }
                            ]
                          }
                        ],
                        title: 'string'
                      }
                    }
                  ],
                  expression: {}
                },
                reportMetrics: [
                  {
                    metricId: 'c2cc9ad9-a69d-40a3-8e01-a95e09e71978',
                    dateFilter: {
                      type: 'ABSOLUTE',
                      from: '2019-08-24T14:15:22Z',
                      to: '2019-08-24T14:15:22Z',
                      filter: {
                        type: 'DAILY',
                        nestingType: 'IN_PLACE',
                        from: 'string',
                        to: 'string',
                        inverted: false
                      }
                    },
                    action: {id: 0, name: 'page.visit'},
                    format: {
                      compactNumbers: false,
                      currency: 'EUR',
                      dataFormat: 'cash',
                      fixedLength: 0,
                      useSeparator: false
                    },
                    columnName: 'string',
                    grouping: {type: 'TOP', top: 0},
                    groups: [
                      {
                        title: 'string',
                        format: {
                          compactNumbers: false,
                          currency: 'EUR',
                          dataFormat: 'cash',
                          fixedLength: 0,
                          useSeparator: false
                        },
                        type: 'CLIENT',
                        attribute: {type: 'SEGMENTATION', id: '497f6eca-6276-4993-bfeb-53cbbbba6f08'}
                      }
                    ]
                  }
                ]
              },
              allowNull: true
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/analytics/v4/reports/preview-csv');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"analysis":{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"reportMetrics":[{"metricId":"c2cc9ad9-a69d-40a3-8e01-a95e09e71978","dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"action":{"id":0,"name":"page.visit"},"format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"columnName":"string","grouping":{"type":"TOP","top":0},"groups":[{"title":"string","format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"type":"CLIENT","attribute":{"type":"SEGMENTATION","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08"}}]}]},"allowNull":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/analytics/analytics/v4/reports/preview-csv")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"reportMetrics\":[{\"metricId\":\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\",\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"action\":{\"id\":0,\"name\":\"page.visit\"},\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"columnName\":\"string\",\"grouping\":{\"type\":\"TOP\",\"top\":0},\"groups\":[{\"title\":\"string\",\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"type\":\"CLIENT\",\"attribute\":{\"type\":\"SEGMENTATION\",\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"}}]}]},\"allowNull\":true}")
              .asString();
  /analytics/directories:
    get:
      tags:
        - "Analytics: Management"
      summary: List directories
      description: |
        Returns a list of directories for a given analytic type.

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-directories-list
      parameters:
        - name: analyticType
          in: query
          description: Type of object
          required: true
          style: form
          explode: true
          schema:
            type: string
            enum:
              - EXPRESSION
              - AGGREGATE
              - SEGMENTATION
              - METRIC
              - FUNNEL
              - SANKEY
              - TREND
              - HISTOGRAM
              - REPORT
              - ANALYTICS_QUERY
              - ANALYTICS_DASHBOARD
      responses:
        "200":
          description: List of directories
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/analytics-Directory"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Management/operation/analytics2-directories-list
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/analytics/directories?analyticType=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", "/analytics/directories?analyticType=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/analytics/directories?analyticType=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": "/analytics/directories?analyticType=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/analytics/directories');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'analyticType' => '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/analytics/directories?analyticType=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - "Analytics: Management"
      summary: Create directory
      description: |
        Creates a new directory

        ---

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

        **User role permission required:** `analytics: create`
      operationId: analytics2-directories-create
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-DirectoryCreateRequest"
      responses:
        "201":
          description: ID of the created directory
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    $ref: "#/components/schemas/analytics-id"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Management/operation/analytics2-directories-create
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/directories \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"string","analyticType":"EXPRESSION"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"name\":\"string\",\"analyticType\":\"EXPRESSION\"}"

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

            conn.request("POST", "/analytics/directories", payload, headers)

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

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

            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/analytics/directories");
            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": "/analytics/directories",
              "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', analyticType: 'EXPRESSION'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

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

            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/analytics/directories")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\",\"analyticType\":\"EXPRESSION\"}")
              .asString();
  /analytics/directories/{directoryId}:
    delete:
      tags:
        - "Analytics: Management"
      summary: Delete directory
      description: |
        Deletes a directory. If the directory contains any analyses, they are moved to the default directory.

        ---

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

        **User role permission required:** `analytics: delete`
      operationId: analytics2-directories-delete
      parameters:
        - name: directoryId
          in: path
          description: ID of a directory
          required: true
          style: simple
          explode: false
          schema:
            type: string
            format: uuid
      responses:
        "204":
          description: Directory deleted
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Management/operation/analytics2-directories-delete
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/analytics/directories/%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", "/analytics/directories/%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/analytics/directories/%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": "/analytics/directories/%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/analytics/directories/%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/analytics/directories/%7BdirectoryId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    patch:
      tags:
        - "Analytics: Management"
      summary: Rename directory
      description: |
        Renames a directory

        ---

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

        **User role permission required:** `analytics: update`
      operationId: analytics2-directories-rename
      parameters:
        - name: directoryId
          in: path
          description: ID of a directory
          required: true
          style: simple
          explode: false
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-DirectoryRenameRequest"
      responses:
        "204":
          description: Directory renamed
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Management/operation/analytics2-directories-rename
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PATCH \
              --url https://api.synerise.com/analytics/directories/%7BdirectoryId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"newName":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

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

            conn.request("PATCH", "/analytics/directories/%7BdirectoryId%7D", payload, headers)

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

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

            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/analytics/directories/%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": "PATCH",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/analytics/directories/%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({newName: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            HttpRequest::methodRegister('PATCH');
            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/directories/%7BdirectoryId%7D');
            $request->setMethod(HttpRequest::HTTP_METH_PATCH);

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

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

            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/analytics/directories/%7BdirectoryId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"newName\":\"string\"}")
              .asString();
  /analytics/directories/change/{analyticId}:
    patch:
      tags:
        - "Analytics: Management"
      summary: Change Directory
      description: |
        Moves an analysis to another directory

        ---

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

        **User role permission required:** `analytics: update`
      operationId: analytics2-directories-change
      parameters:
        - name: analyticId
          in: path
          description: ID of the analysis
          required: true
          style: simple
          explode: false
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-DirectoryChangeRequest"
      responses:
        "204":
          description: Analysis moved
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Management/operation/analytics2-directories-change
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PATCH \
              --url https://api.synerise.com/analytics/directories/change/%7BanalyticId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"newDir":"927cf82e-bfcc-4026-ba0d-96408cda03cb","analyticType":"EXPRESSION"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"newDir\":\"927cf82e-bfcc-4026-ba0d-96408cda03cb\",\"analyticType\":\"EXPRESSION\"}"

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

            conn.request("PATCH", "/analytics/directories/change/%7BanalyticId%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "newDir": "927cf82e-bfcc-4026-ba0d-96408cda03cb",
              "analyticType": "EXPRESSION"
            });

            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/analytics/directories/change/%7BanalyticId%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": "PATCH",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/analytics/directories/change/%7BanalyticId%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({newDir: '927cf82e-bfcc-4026-ba0d-96408cda03cb', analyticType: 'EXPRESSION'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            HttpRequest::methodRegister('PATCH');
            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/directories/change/%7BanalyticId%7D');
            $request->setMethod(HttpRequest::HTTP_METH_PATCH);

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

            $request->setBody('{"newDir":"927cf82e-bfcc-4026-ba0d-96408cda03cb","analyticType":"EXPRESSION"}');

            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/analytics/directories/change/%7BanalyticId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"newDir\":\"927cf82e-bfcc-4026-ba0d-96408cda03cb\",\"analyticType\":\"EXPRESSION\"}")
              .asString();
  /analytics/analytics/v3/metrics/preview:
    post:
      tags:
        - "Analytics: Metrics"
      summary: Preview metric
      description: |
        Get the results of a metric. This request doesn't save the metric to the database.

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-preview-metric-legacy
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-MetricLegacyPreview"
      responses:
        "200":
          description: Metric preview result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-MetricCalculationResponse"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Metrics/operation/analytics2-preview-metric-legacy
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/analytics/v3/metrics/preview \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"title":"string","description":"string","format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"comparison":{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}}},"metricType":"SIMPLE","expression":{"type":"VALUE","value":{"type":"EVENT","title":"string","occurrenceType":"FIRST","aggregation":{"type":"COUNT","level":0.01,"attribute":{"type":"PARAM","param":"string","id":0}},"action":{"id":0,"name":"page.visit"},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}},"isVisibleForClientProfile":true}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"comparison\":{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}}},\"metricType\":\"SIMPLE\",\"expression\":{\"type\":\"VALUE\",\"value\":{\"type\":\"EVENT\",\"title\":\"string\",\"occurrenceType\":\"FIRST\",\"aggregation\":{\"type\":\"COUNT\",\"level\":0.01,\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0}},\"action\":{\"id\":0,\"name\":\"page.visit\"},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}},\"isVisibleForClientProfile\":true}}"

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

            conn.request("POST", "/analytics/analytics/v3/metrics/preview", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "title": "string",
                "description": "string",
                "format": {
                  "compactNumbers": false,
                  "currency": "EUR",
                  "dataFormat": "cash",
                  "fixedLength": 0,
                  "useSeparator": false
                },
                "comparison": {
                  "dateFilter": {
                    "type": "ABSOLUTE",
                    "from": "2019-08-24T14:15:22Z",
                    "to": "2019-08-24T14:15:22Z",
                    "filter": {
                      "type": "DAILY",
                      "nestingType": "IN_PLACE",
                      "from": "string",
                      "to": "string",
                      "inverted": false
                    }
                  }
                },
                "metricType": "SIMPLE",
                "expression": {
                  "type": "VALUE",
                  "value": {
                    "type": "EVENT",
                    "title": "string",
                    "occurrenceType": "FIRST",
                    "aggregation": {
                      "type": "COUNT",
                      "level": 0.01,
                      "attribute": {
                        "type": "PARAM",
                        "param": "string",
                        "id": 0
                      }
                    },
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "dateFilter": {
                      "type": "ABSOLUTE",
                      "from": "2019-08-24T14:15:22Z",
                      "to": "2019-08-24T14:15:22Z",
                      "filter": {
                        "type": "DAILY",
                        "nestingType": "IN_PLACE",
                        "from": "string",
                        "to": "string",
                        "inverted": false
                      }
                    },
                    "filter": {
                      "matching": true,
                      "expressions": [
                        {
                          "type": "FUNNEL",
                          "matching": true,
                          "funnel": {
                            "completedWithin": {
                              "period": "YEARS",
                              "value": 0
                            },
                            "dateFilter": {
                              "type": "ABSOLUTE",
                              "from": "2019-08-24T14:15:22Z",
                              "to": "2019-08-24T14:15:22Z",
                              "filter": {
                                "type": "DAILY",
                                "nestingType": "IN_PLACE",
                                "from": "string",
                                "to": "string",
                                "inverted": false
                              }
                            },
                            "exact": false,
                            "steps": [
                              {
                                "title": "string",
                                "action": {
                                  "id": 0,
                                  "name": "page.visit"
                                },
                                "expressions": [
                                  {
                                    "attribute": {
                                      "type": "PARAM",
                                      "param": "string",
                                      "id": 0
                                    },
                                    "constraint": {
                                      "type": "BOOL",
                                      "logic": "IS_TRUE"
                                    }
                                  }
                                ]
                              }
                            ],
                            "title": "string"
                          }
                        }
                      ],
                      "expression": {}
                    },
                    "expressions": [
                      {
                        "attribute": {
                          "type": "PARAM",
                          "param": "string",
                          "id": 0
                        },
                        "constraint": {
                          "type": "BOOL",
                          "logic": "IS_TRUE"
                        }
                      }
                    ]
                  }
                },
                "isVisibleForClientProfile": 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/analytics/analytics/v3/metrics/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": "/analytics/analytics/v3/metrics/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({
              analysis: {
                title: 'string',
                description: 'string',
                format: {
                  compactNumbers: false,
                  currency: 'EUR',
                  dataFormat: 'cash',
                  fixedLength: 0,
                  useSeparator: false
                },
                comparison: {
                  dateFilter: {
                    type: 'ABSOLUTE',
                    from: '2019-08-24T14:15:22Z',
                    to: '2019-08-24T14:15:22Z',
                    filter: {
                      type: 'DAILY',
                      nestingType: 'IN_PLACE',
                      from: 'string',
                      to: 'string',
                      inverted: false
                    }
                  }
                },
                metricType: 'SIMPLE',
                expression: {
                  type: 'VALUE',
                  value: {
                    type: 'EVENT',
                    title: 'string',
                    occurrenceType: 'FIRST',
                    aggregation: {type: 'COUNT', level: 0.01, attribute: {type: 'PARAM', param: 'string', id: 0}},
                    action: {id: 0, name: 'page.visit'},
                    dateFilter: {
                      type: 'ABSOLUTE',
                      from: '2019-08-24T14:15:22Z',
                      to: '2019-08-24T14:15:22Z',
                      filter: {
                        type: 'DAILY',
                        nestingType: 'IN_PLACE',
                        from: 'string',
                        to: 'string',
                        inverted: false
                      }
                    },
                    filter: {
                      matching: true,
                      expressions: [
                        {
                          type: 'FUNNEL',
                          matching: true,
                          funnel: {
                            completedWithin: {period: 'YEARS', value: 0},
                            dateFilter: {
                              type: 'ABSOLUTE',
                              from: '2019-08-24T14:15:22Z',
                              to: '2019-08-24T14:15:22Z',
                              filter: {
                                type: 'DAILY',
                                nestingType: 'IN_PLACE',
                                from: 'string',
                                to: 'string',
                                inverted: false
                              }
                            },
                            exact: false,
                            steps: [
                              {
                                title: 'string',
                                action: {id: 0, name: 'page.visit'},
                                expressions: [
                                  {
                                    attribute: {type: 'PARAM', param: 'string', id: 0},
                                    constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                                  }
                                ]
                              }
                            ],
                            title: 'string'
                          }
                        }
                      ],
                      expression: {}
                    },
                    expressions: [
                      {
                        attribute: {type: 'PARAM', param: 'string', id: 0},
                        constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                      }
                    ]
                  }
                },
                isVisibleForClientProfile: true
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/analytics/v3/metrics/preview');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"analysis":{"title":"string","description":"string","format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"comparison":{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}}},"metricType":"SIMPLE","expression":{"type":"VALUE","value":{"type":"EVENT","title":"string","occurrenceType":"FIRST","aggregation":{"type":"COUNT","level":0.01,"attribute":{"type":"PARAM","param":"string","id":0}},"action":{"id":0,"name":"page.visit"},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}},"isVisibleForClientProfile":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/analytics/analytics/v3/metrics/preview")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"comparison\":{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}}},\"metricType\":\"SIMPLE\",\"expression\":{\"type\":\"VALUE\",\"value\":{\"type\":\"EVENT\",\"title\":\"string\",\"occurrenceType\":\"FIRST\",\"aggregation\":{\"type\":\"COUNT\",\"level\":0.01,\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0}},\"action\":{\"id\":0,\"name\":\"page.visit\"},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}},\"isVisibleForClientProfile\":true}}")
              .asString();
  /analytics/analytics/v3/metrics/{metricId}/recalculate/override:
    post:
      tags:
        - "Analytics: Metrics"
      summary: Calculate metric with parameter override
      description: |
        Recalculate a metric with new parameters and/or variable (dynamic key) values.

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-calculate-metric-with-override
      parameters:
        - $ref: "#/components/parameters/analytics-metricIdAsPathParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-OverrideQueryRequest"
      responses:
        "200":
          description: Metric calculation result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-MetricCalculationResponse"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Metrics/operation/analytics2-calculate-metric-with-override
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/analytics/v3/metrics/%7BmetricId%7D/recalculate/override \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"aggregateDataBy":{"type":"YEARS","value":0},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"variables":[{"name":"string","value":"string"}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"variables\":[{\"name\":\"string\",\"value\":\"string\"}]}"

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

            conn.request("POST", "/analytics/analytics/v3/metrics/%7BmetricId%7D/recalculate/override", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "dateFilter": {
                "type": "ABSOLUTE",
                "from": "2019-08-24T14:15:22Z",
                "to": "2019-08-24T14:15:22Z",
                "filter": {
                  "type": "DAILY",
                  "nestingType": "IN_PLACE",
                  "from": "string",
                  "to": "string",
                  "inverted": false
                }
              },
              "aggregateDataBy": {
                "type": "YEARS",
                "value": 0
              },
              "filter": {
                "matching": true,
                "expressions": [
                  {
                    "type": "FUNNEL",
                    "matching": true,
                    "funnel": {
                      "completedWithin": {
                        "period": "YEARS",
                        "value": 0
                      },
                      "dateFilter": {
                        "type": "ABSOLUTE",
                        "from": "2019-08-24T14:15:22Z",
                        "to": "2019-08-24T14:15:22Z",
                        "filter": {
                          "type": "DAILY",
                          "nestingType": "IN_PLACE",
                          "from": "string",
                          "to": "string",
                          "inverted": false
                        }
                      },
                      "exact": false,
                      "steps": [
                        {
                          "title": "string",
                          "action": {
                            "id": 0,
                            "name": "page.visit"
                          },
                          "expressions": [
                            {
                              "attribute": {
                                "type": "PARAM",
                                "param": "string",
                                "id": 0
                              },
                              "constraint": {
                                "type": "BOOL",
                                "logic": "IS_TRUE"
                              }
                            }
                          ]
                        }
                      ],
                      "title": "string"
                    }
                  }
                ],
                "expression": {}
              },
              "variables": [
                {
                  "name": "string",
                  "value": "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/analytics/analytics/v3/metrics/%7BmetricId%7D/recalculate/override");
            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": "/analytics/analytics/v3/metrics/%7BmetricId%7D/recalculate/override",
              "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({
              dateFilter: {
                type: 'ABSOLUTE',
                from: '2019-08-24T14:15:22Z',
                to: '2019-08-24T14:15:22Z',
                filter: {
                  type: 'DAILY',
                  nestingType: 'IN_PLACE',
                  from: 'string',
                  to: 'string',
                  inverted: false
                }
              },
              aggregateDataBy: {type: 'YEARS', value: 0},
              filter: {
                matching: true,
                expressions: [
                  {
                    type: 'FUNNEL',
                    matching: true,
                    funnel: {
                      completedWithin: {period: 'YEARS', value: 0},
                      dateFilter: {
                        type: 'ABSOLUTE',
                        from: '2019-08-24T14:15:22Z',
                        to: '2019-08-24T14:15:22Z',
                        filter: {
                          type: 'DAILY',
                          nestingType: 'IN_PLACE',
                          from: 'string',
                          to: 'string',
                          inverted: false
                        }
                      },
                      exact: false,
                      steps: [
                        {
                          title: 'string',
                          action: {id: 0, name: 'page.visit'},
                          expressions: [
                            {
                              attribute: {type: 'PARAM', param: 'string', id: 0},
                              constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                            }
                          ]
                        }
                      ],
                      title: 'string'
                    }
                  }
                ],
                expression: {}
              },
              variables: [{name: 'string', value: 'string'}]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/analytics/v3/metrics/%7BmetricId%7D/recalculate/override');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"aggregateDataBy":{"type":"YEARS","value":0},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"variables":[{"name":"string","value":"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/analytics/analytics/v3/metrics/%7BmetricId%7D/recalculate/override")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"variables\":[{\"name\":\"string\",\"value\":\"string\"}]}")
              .asString();
  /analytics/analytics/v3/metrics/{metricId}/recalculate:
    post:
      tags:
        - "Analytics: Metrics"
      summary: Calculate metric
      description: |
        Calculate a metric that was created earlier.

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-calculate-metric
      parameters:
        - $ref: "#/components/parameters/analytics-metricIdAsPathParam"
      responses:
        "200":
          description: Metric calculation result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-MetricCalculationResponse"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Metrics/operation/analytics2-calculate-metric
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/analytics/v3/metrics/%7BmetricId%7D/recalculate \
              --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", "/analytics/analytics/v3/metrics/%7BmetricId%7D/recalculate", 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/analytics/analytics/v3/metrics/%7BmetricId%7D/recalculate");
            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": "/analytics/analytics/v3/metrics/%7BmetricId%7D/recalculate",
              "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/analytics/analytics/v3/metrics/%7BmetricId%7D/recalculate');
            $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/analytics/analytics/v3/metrics/%7BmetricId%7D/recalculate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /analytics/analytics/v3/metrics/{metricId}/dynamic/value:
    post:
      tags:
        - "Analytics: Metrics"
      summary: Calculate dynamic metric
      description: |
        Calculate a metric that includes variables (dynamic keys).

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-calculate-metric-override-variables
      parameters:
        - $ref: "#/components/parameters/analytics-metricIdAsPathParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-DynamicVariablesRequest"
      responses:
        "200":
          description: Metric calculation result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-MetricCalculationResponse"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Metrics/operation/analytics2-calculate-metric-override-variables
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/analytics/v3/metrics/%7BmetricId%7D/dynamic/value \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"variables":[{"name":"event.params.PARAMNAME","value":"string"}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"variables\":[{\"name\":\"event.params.PARAMNAME\",\"value\":\"string\"}]}"

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

            conn.request("POST", "/analytics/analytics/v3/metrics/%7BmetricId%7D/dynamic/value", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "variables": [
                {
                  "name": "event.params.PARAMNAME",
                  "value": "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/analytics/analytics/v3/metrics/%7BmetricId%7D/dynamic/value");
            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": "/analytics/analytics/v3/metrics/%7BmetricId%7D/dynamic/value",
              "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({variables: [{name: 'event.params.PARAMNAME', value: 'string'}]}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/analytics/v3/metrics/%7BmetricId%7D/dynamic/value');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"variables":[{"name":"event.params.PARAMNAME","value":"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/analytics/analytics/v3/metrics/%7BmetricId%7D/dynamic/value")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"variables\":[{\"name\":\"event.params.PARAMNAME\",\"value\":\"string\"}]}")
              .asString();
  /analytics/{namespace}/expressions/visible-for-client/by/{identifierType}:
    post:
      tags:
        - "Analytics: Expressions"
      summary: Get expressions for profile card
      description: |
        Retrieve expressions to display on a profile's card in the Profiles module (`"isVisibleForClientProfile": true` in the [expression config](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#operation/addExpressionPOST)).


        ---

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

        **User role permission required (at least one):** `analytics: read`, `client_analytics_preview: read`
      operationId: analytics2-client-card-expressions-get
      parameters:
        - $ref: "#/components/parameters/analytics-pathIdentifierType"
        - $ref: "#/components/parameters/analytics-pathNamespace"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                identifierValue:
                  $ref: "#/components/schemas/analytics-identifierValue"
              required:
                - identifierValue
      responses:
        "200":
          description: List of calculated expressions configured as visible on the profile card
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/analytics-calculatedAnalytic"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Analytics:-Expressions/operation/analytics2-client-card-expressions-get
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/visible-for-client/by/%7BidentifierType%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"identifierValue":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

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

            conn.request("POST", "/analytics/%7Bnamespace%7D/expressions/visible-for-client/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"
            });

            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/analytics/%7Bnamespace%7D/expressions/visible-for-client/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": "/analytics/%7Bnamespace%7D/expressions/visible-for-client/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'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/visible-for-client/by/%7BidentifierType%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"identifierValue":"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/analytics/%7Bnamespace%7D/expressions/visible-for-client/by/%7BidentifierType%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"identifierValue\":\"string\"}")
              .asString();
  /analytics/{namespace}/expressions/{expressionId}/calculate/by/{identifierType}:
    post:
      tags:
        - "Analytics: Expressions"
      summary: Calculate expression for profile
      description: |
        Calculate the result of an expression in context of a single profile.

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-expression-calculate
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-expressionIdAsPathParam"
        - $ref: "#/components/parameters/analytics-pathIdentifierType"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                identifierValue:
                  $ref: "#/components/schemas/analytics-identifierValue"
              required:
                - identifierValue
      responses:
        "200":
          description: Expression result
          content:
            application/json:
              schema:
                oneOf:
                  - type: string
                  - type: number
                  - type: boolean
                  - type: object
                  - type: array
                    items: {}
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Analytics:-Expressions/operation/analytics2-expression-calculate
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D/calculate/by/%7BidentifierType%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"identifierValue":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

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

            conn.request("POST", "/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D/calculate/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"
            });

            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/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D/calculate/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": "/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D/calculate/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'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D/calculate/by/%7BidentifierType%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"identifierValue":"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/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D/calculate/by/%7BidentifierType%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"identifierValue\":\"string\"}")
              .asString();
  /analytics/{namespace}/expressions:
    get:
      tags:
        - "Analytics: Expressions"
      summary: List expressions
      description: |
        Returns a paginated list of expressions.

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-expressions-list
      parameters:
        - $ref: "#/components/parameters/analytics-page"
        - $ref: "#/components/parameters/analytics-limit"
        - $ref: "#/components/parameters/analytics-search"
        - $ref: "#/components/parameters/analytics-sortBy"
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-directoryId"
        - $ref: "#/components/parameters/analytics-ids"
      responses:
        "200":
          description: List of expressions
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: Array of expressions
                    items:
                      $ref: "#/components/schemas/analytics-ExpressionListItem"
                  meta:
                    $ref: "#/components/schemas/analytics-meta"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Analytics:-Expressions/operation/analytics2-expressions-list
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/analytics/%7Bnamespace%7D/expressions?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=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", "/analytics/%7Bnamespace%7D/expressions?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=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/analytics/%7Bnamespace%7D/expressions?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=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": "/analytics/%7Bnamespace%7D/expressions?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=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/analytics/%7Bnamespace%7D/expressions');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_INTEGER_VALUE',
              'limit' => 'SOME_INTEGER_VALUE',
              'search' => 'SOME_STRING_VALUE',
              'sortBy' => 'name:asc',
              'directoryId' => 'SOME_STRING_VALUE',
              'ids' => '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/analytics/%7Bnamespace%7D/expressions?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - "Analytics: Expressions"
      summary: Create expression
      description: |
        Create an expression that is saved in the database and can be used in other analyses.

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_EXPRESSIONS_CREATE`, `ANALYTICS_BACKEND_EXPRESSION_CREATE`

        **User role permission required:** `analytics: create`
      operationId: analytics2-expressions-create
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-expressionCreateRequestBody"
      responses:
        "201":
          description: Create expression
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Analytics:-Expressions/operation/analytics2-expressions-create
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/expressions \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"isVisibleForClientProfile":true,"analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"string","value":{"type":"EVENT","attribute":{"type":"PARAM","param":"string","id":0}}}}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"isVisibleForClientProfile\":true,\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"string\",\"value\":{\"type\":\"EVENT\",\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0}}}}}"

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

            conn.request("POST", "/analytics/%7Bnamespace%7D/expressions", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "isVisibleForClientProfile": true,
              "analysis": {
                "type": "EVENT",
                "action": {
                  "id": 0,
                  "name": "page.visit"
                },
                "name": "string",
                "description": "string",
                "expression": {
                  "type": "VALUE",
                  "title": "string",
                  "value": {
                    "type": "EVENT",
                    "attribute": {
                      "type": "PARAM",
                      "param": "string",
                      "id": 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/analytics/%7Bnamespace%7D/expressions");
            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": "/analytics/%7Bnamespace%7D/expressions",
              "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({
              isVisibleForClientProfile: true,
              analysis: {
                type: 'EVENT',
                action: {id: 0, name: 'page.visit'},
                name: 'string',
                description: 'string',
                expression: {
                  type: 'VALUE',
                  title: 'string',
                  value: {type: 'EVENT', attribute: {type: 'PARAM', param: 'string', id: 0}}
                }
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/%7Bnamespace%7D/expressions');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"isVisibleForClientProfile":true,"analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"string","value":{"type":"EVENT","attribute":{"type":"PARAM","param":"string","id":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/analytics/%7Bnamespace%7D/expressions")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"isVisibleForClientProfile\":true,\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"string\",\"value\":{\"type\":\"EVENT\",\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0}}}}}")
              .asString();
  /analytics/{namespace}/expressions/{expressionId}:
    get:
      tags:
        - "Analytics: Expressions"
      summary: Get expression details
      description: |
        Retrieve information about an expression analysis

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_EXPRESSIONS_READ`, `ANALYTICS_BACKEND_EXPRESSION_READ`

        **User role permission required:** `analytics: read`
      operationId: analytics2-expressions-get
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-expressionIdAsPathParam"
      responses:
        "200":
          description: Get expression details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-Expression"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Analytics:-Expressions/operation/analytics2-expressions-get
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%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", "/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%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/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%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": "/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%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/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%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/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    put:
      tags:
        - "Analytics: Expressions"
      summary: Update expression
      description: |
        Update an existing expression

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_EXPRESSIONS_UPDATE`, `ANALYTICS_BACKEND_EXPRESSION_UPDATE`

        **User role permission required:** `analytics: update`
      operationId: analytics2-expressions-update
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-expressionIdAsPathParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-expressionCreateRequestBody"
      responses:
        "200":
          description: Update expression
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Analytics:-Expressions/operation/analytics2-expressions-update
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"isVisibleForClientProfile":true,"analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"string","value":{"type":"EVENT","attribute":{"type":"PARAM","param":"string","id":0}}}}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"isVisibleForClientProfile\":true,\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"string\",\"value\":{\"type\":\"EVENT\",\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0}}}}}"

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

            conn.request("PUT", "/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "isVisibleForClientProfile": true,
              "analysis": {
                "type": "EVENT",
                "action": {
                  "id": 0,
                  "name": "page.visit"
                },
                "name": "string",
                "description": "string",
                "expression": {
                  "type": "VALUE",
                  "title": "string",
                  "value": {
                    "type": "EVENT",
                    "attribute": {
                      "type": "PARAM",
                      "param": "string",
                      "id": 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/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%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({
              isVisibleForClientProfile: true,
              analysis: {
                type: 'EVENT',
                action: {id: 0, name: 'page.visit'},
                name: 'string',
                description: 'string',
                expression: {
                  type: 'VALUE',
                  title: 'string',
                  value: {type: 'EVENT', attribute: {type: 'PARAM', param: 'string', id: 0}}
                }
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D');
            $request->setMethod(HTTP_METH_PUT);

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

            $request->setBody('{"isVisibleForClientProfile":true,"analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"string","value":{"type":"EVENT","attribute":{"type":"PARAM","param":"string","id":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/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"isVisibleForClientProfile\":true,\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"string\",\"value\":{\"type\":\"EVENT\",\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0}}}}}")
              .asString();
    delete:
      tags:
        - "Analytics: Expressions"
      summary: Delete expression
      operationId: analytics2-expressions-delete
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-expressionIdAsPathParam"
      responses:
        "204":
          description: Delete expression
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Analytics:-Expressions/operation/analytics2-expressions-delete
      description: |
        

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_EXPRESSIONS_DELETE`, `ANALYTICS_BACKEND_EXPRESSION_DELETE`

        **User role permission required:** `analytics: delete`
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%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", "/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%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/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%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": "/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%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/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%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/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /analytics/{namespace}/expressions/preview/by/{identifierType}:
    post:
      tags:
        - "Analytics: Expressions"
      summary: Get expression preview
      description: |
        Retrieve expression preview value. Previews are only available for CLIENT-type expressions. This request doesn't save the expression.

        ---

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

        **User role permission required (at least one):** `analytics: read`, `client_analytics_preview: read`
      operationId: analytics2-expression-preview-v2
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-pathIdentifierType"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-ExpressionPreviewRequestWithClient"
      responses:
        "200":
          description: Expression preview result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-ExpressionTypedCalculationResponse"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Analytics:-Expressions/operation/analytics2-expression-preview-v2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/preview/by/%7BidentifierType%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"identifierValue":"string","expression":{"type":"CLIENT","name":"string","description":"string","expression":{"type":"VALUE","title":"string","value":{"type":"CLIENT","attribute":{"type":"SEGMENTATION","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08"}}}}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"identifierValue\":\"string\",\"expression\":{\"type\":\"CLIENT\",\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"string\",\"value\":{\"type\":\"CLIENT\",\"attribute\":{\"type\":\"SEGMENTATION\",\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"}}}}}"

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

            conn.request("POST", "/analytics/%7Bnamespace%7D/expressions/preview/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",
              "expression": {
                "type": "CLIENT",
                "name": "string",
                "description": "string",
                "expression": {
                  "type": "VALUE",
                  "title": "string",
                  "value": {
                    "type": "CLIENT",
                    "attribute": {
                      "type": "SEGMENTATION",
                      "id": "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/analytics/%7Bnamespace%7D/expressions/preview/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": "/analytics/%7Bnamespace%7D/expressions/preview/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',
              expression: {
                type: 'CLIENT',
                name: 'string',
                description: 'string',
                expression: {
                  type: 'VALUE',
                  title: 'string',
                  value: {
                    type: 'CLIENT',
                    attribute: {type: 'SEGMENTATION', id: '497f6eca-6276-4993-bfeb-53cbbbba6f08'}
                  }
                }
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/preview/by/%7BidentifierType%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"identifierValue":"string","expression":{"type":"CLIENT","name":"string","description":"string","expression":{"type":"VALUE","title":"string","value":{"type":"CLIENT","attribute":{"type":"SEGMENTATION","id":"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/analytics/%7Bnamespace%7D/expressions/preview/by/%7BidentifierType%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"identifierValue\":\"string\",\"expression\":{\"type\":\"CLIENT\",\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"string\",\"value\":{\"type\":\"CLIENT\",\"attribute\":{\"type\":\"SEGMENTATION\",\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"}}}}}")
              .asString();
  /analytics/{namespace}/histograms:
    get:
      tags:
        - "Analytics: Histograms"
      summary: List histograms
      description: |
        Returns a paginated list of histograms.

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-histograms-list
      parameters:
        - $ref: "#/components/parameters/analytics-page"
        - $ref: "#/components/parameters/analytics-limit"
        - $ref: "#/components/parameters/analytics-search"
        - $ref: "#/components/parameters/analytics-sortBy"
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-directoryId"
        - $ref: "#/components/parameters/analytics-ids"
      responses:
        "200":
          description: List of histograms
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: Array of histograms
                    items:
                      $ref: "#/components/schemas/analytics-ListAnalyticsItemCommon"
                  meta:
                    $ref: "#/components/schemas/analytics-meta"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Histograms/operation/analytics2-histograms-list
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/analytics/%7Bnamespace%7D/histograms?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=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", "/analytics/%7Bnamespace%7D/histograms?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=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/analytics/%7Bnamespace%7D/histograms?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=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": "/analytics/%7Bnamespace%7D/histograms?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=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/analytics/%7Bnamespace%7D/histograms');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_INTEGER_VALUE',
              'limit' => 'SOME_INTEGER_VALUE',
              'search' => 'SOME_STRING_VALUE',
              'sortBy' => 'name:asc',
              'directoryId' => 'SOME_STRING_VALUE',
              'ids' => '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/analytics/%7Bnamespace%7D/histograms?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - "Analytics: Histograms"
      summary: Create histogram
      operationId: analytics2-histograms-create
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-HistogramRequest"
      responses:
        "200":
          description: Histogram created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-id"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Histograms/operation/analytics2-histograms-create
      description: |
        

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_HISTOGRAMS_CREATE`, `ANALYTICS_BACKEND_HISTOGRAM_CREATE`

        **User role permission required:** `analytics: create`
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/histograms \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"title":"string","description":"string","histogram":{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"period":{"type":"YEARS","value":0},"eventMetrics":[{"metricId":"c2cc9ad9-a69d-40a3-8e01-a95e09e71978","chartType":"COLUMN","title":"string"}]}}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"histogram\":{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"period\":{\"type\":\"YEARS\",\"value\":0},\"eventMetrics\":[{\"metricId\":\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\",\"chartType\":\"COLUMN\",\"title\":\"string\"}]}}}"

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

            conn.request("POST", "/analytics/%7Bnamespace%7D/histograms", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "title": "string",
                "description": "string",
                "histogram": {
                  "dateFilter": {
                    "type": "ABSOLUTE",
                    "from": "2019-08-24T14:15:22Z",
                    "to": "2019-08-24T14:15:22Z",
                    "filter": {
                      "type": "DAILY",
                      "nestingType": "IN_PLACE",
                      "from": "string",
                      "to": "string",
                      "inverted": false
                    }
                  },
                  "period": {
                    "type": "YEARS",
                    "value": 0
                  },
                  "eventMetrics": [
                    {
                      "metricId": "c2cc9ad9-a69d-40a3-8e01-a95e09e71978",
                      "chartType": "COLUMN",
                      "title": "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/analytics/%7Bnamespace%7D/histograms");
            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": "/analytics/%7Bnamespace%7D/histograms",
              "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({
              analysis: {
                title: 'string',
                description: 'string',
                histogram: {
                  dateFilter: {
                    type: 'ABSOLUTE',
                    from: '2019-08-24T14:15:22Z',
                    to: '2019-08-24T14:15:22Z',
                    filter: {
                      type: 'DAILY',
                      nestingType: 'IN_PLACE',
                      from: 'string',
                      to: 'string',
                      inverted: false
                    }
                  },
                  period: {type: 'YEARS', value: 0},
                  eventMetrics: [
                    {
                      metricId: 'c2cc9ad9-a69d-40a3-8e01-a95e09e71978',
                      chartType: 'COLUMN',
                      title: 'string'
                    }
                  ]
                }
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/%7Bnamespace%7D/histograms');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"analysis":{"title":"string","description":"string","histogram":{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"period":{"type":"YEARS","value":0},"eventMetrics":[{"metricId":"c2cc9ad9-a69d-40a3-8e01-a95e09e71978","chartType":"COLUMN","title":"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/analytics/%7Bnamespace%7D/histograms")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"histogram\":{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"period\":{\"type\":\"YEARS\",\"value\":0},\"eventMetrics\":[{\"metricId\":\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\",\"chartType\":\"COLUMN\",\"title\":\"string\"}]}}}")
              .asString();
  /analytics/{namespace}/histograms/{histogramId}:
    get:
      tags:
        - "Analytics: Histograms"
      summary: Get histogram details
      description: |
        Retrieve the details of an existing histogram definition

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_HISTOGRAMS_READ`, `ANALYTICS_BACKEND_HISTOGRAM_READ`

        **User role permission required:** `analytics: read`
      operationId: analytics2-histograms-get
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-histogramIdAsPathParam"
      responses:
        "200":
          description: Histogram analysis details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-Histogram"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Histograms/operation/analytics2-histograms-get
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/histograms/%7BhistogramId%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", "/analytics/%7Bnamespace%7D/histograms/%7BhistogramId%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/analytics/%7Bnamespace%7D/histograms/%7BhistogramId%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": "/analytics/%7Bnamespace%7D/histograms/%7BhistogramId%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/analytics/%7Bnamespace%7D/histograms/%7BhistogramId%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/analytics/%7Bnamespace%7D/histograms/%7BhistogramId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    put:
      tags:
        - "Analytics: Histograms"
      summary: Update histogram analysis
      description: |
        Update an existing histogram analysis

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_HISTOGRAMS_UPDATE`, `ANALYTICS_BACKEND_HISTOGRAM_UPDATE`

        **User role permission required:** `analytics: update`
      operationId: analytics2-histograms-update
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-histogramIdAsPathParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-HistogramRequest"
      responses:
        "200":
          description: Histogram updated
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Histograms/operation/analytics2-histograms-update
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/histograms/%7BhistogramId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"title":"string","description":"string","histogram":{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"period":{"type":"YEARS","value":0},"eventMetrics":[{"metricId":"c2cc9ad9-a69d-40a3-8e01-a95e09e71978","chartType":"COLUMN","title":"string"}]}}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"histogram\":{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"period\":{\"type\":\"YEARS\",\"value\":0},\"eventMetrics\":[{\"metricId\":\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\",\"chartType\":\"COLUMN\",\"title\":\"string\"}]}}}"

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

            conn.request("PUT", "/analytics/%7Bnamespace%7D/histograms/%7BhistogramId%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "title": "string",
                "description": "string",
                "histogram": {
                  "dateFilter": {
                    "type": "ABSOLUTE",
                    "from": "2019-08-24T14:15:22Z",
                    "to": "2019-08-24T14:15:22Z",
                    "filter": {
                      "type": "DAILY",
                      "nestingType": "IN_PLACE",
                      "from": "string",
                      "to": "string",
                      "inverted": false
                    }
                  },
                  "period": {
                    "type": "YEARS",
                    "value": 0
                  },
                  "eventMetrics": [
                    {
                      "metricId": "c2cc9ad9-a69d-40a3-8e01-a95e09e71978",
                      "chartType": "COLUMN",
                      "title": "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/analytics/%7Bnamespace%7D/histograms/%7BhistogramId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/analytics/%7Bnamespace%7D/histograms/%7BhistogramId%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({
              analysis: {
                title: 'string',
                description: 'string',
                histogram: {
                  dateFilter: {
                    type: 'ABSOLUTE',
                    from: '2019-08-24T14:15:22Z',
                    to: '2019-08-24T14:15:22Z',
                    filter: {
                      type: 'DAILY',
                      nestingType: 'IN_PLACE',
                      from: 'string',
                      to: 'string',
                      inverted: false
                    }
                  },
                  period: {type: 'YEARS', value: 0},
                  eventMetrics: [
                    {
                      metricId: 'c2cc9ad9-a69d-40a3-8e01-a95e09e71978',
                      chartType: 'COLUMN',
                      title: 'string'
                    }
                  ]
                }
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/%7Bnamespace%7D/histograms/%7BhistogramId%7D');
            $request->setMethod(HTTP_METH_PUT);

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

            $request->setBody('{"analysis":{"title":"string","description":"string","histogram":{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"period":{"type":"YEARS","value":0},"eventMetrics":[{"metricId":"c2cc9ad9-a69d-40a3-8e01-a95e09e71978","chartType":"COLUMN","title":"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/analytics/%7Bnamespace%7D/histograms/%7BhistogramId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"histogram\":{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"period\":{\"type\":\"YEARS\",\"value\":0},\"eventMetrics\":[{\"metricId\":\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\",\"chartType\":\"COLUMN\",\"title\":\"string\"}]}}}")
              .asString();
    delete:
      tags:
        - "Analytics: Histograms"
      summary: Delete histogram
      operationId: analytics2-histograms-delete
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-histogramIdAsPathParam"
      responses:
        "204":
          description: Histogram deleted
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Histograms/operation/analytics2-histograms-delete
      description: |
        

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_HISTOGRAMS_DELETE`, `ANALYTICS_BACKEND_HISTOGRAM_DELETE`

        **User role permission required:** `analytics: delete`
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/histograms/%7BhistogramId%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", "/analytics/%7Bnamespace%7D/histograms/%7BhistogramId%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/analytics/%7Bnamespace%7D/histograms/%7BhistogramId%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": "/analytics/%7Bnamespace%7D/histograms/%7BhistogramId%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/analytics/%7Bnamespace%7D/histograms/%7BhistogramId%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/analytics/%7Bnamespace%7D/histograms/%7BhistogramId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /analytics/analytics/v3/metrics/histogram-metrics:
    get:
      tags:
        - "Analytics: Metrics"
      summary: Get metrics usable in histograms
      description: |
        Retrieve a list of metrics that can be used in histograms.

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-get-histogram-metrics
      responses:
        "200":
          description: List of metrics
          content:
            application/json;charset=UTF-8:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/analytics-MetricProjectionResponse"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Metrics/operation/analytics2-get-histogram-metrics
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/analytics/analytics/v3/metrics/histogram-metrics \
              --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", "/analytics/analytics/v3/metrics/histogram-metrics", 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/analytics/analytics/v3/metrics/histogram-metrics");
            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": "/analytics/analytics/v3/metrics/histogram-metrics",
              "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/analytics/analytics/v3/metrics/histogram-metrics');
            $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/analytics/analytics/v3/metrics/histogram-metrics")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /analytics/analytics/v2/segmentations/{segmentationId}/dynamic/value:
    post:
      tags:
        - "Analytics: Segmentations"
      summary: Calculate dynamic segmentation
      description: |
        Calculate a segmentation that includes variables (dynamic keys).

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-calculate-segmentations-with-variables
      parameters:
        - $ref: "#/components/parameters/analytics-segmentationIdAsPathParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-DynamicVariablesRequest"
      responses:
        "200":
          description: Segmentation calculation results
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-SegmentationCalculationResponse"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Segmentations/operation/analytics2-calculate-segmentations-with-variables
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/analytics/v2/segmentations/%7BsegmentationId%7D/dynamic/value \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"variables":[{"name":"event.params.PARAMNAME","value":"string"}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"variables\":[{\"name\":\"event.params.PARAMNAME\",\"value\":\"string\"}]}"

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

            conn.request("POST", "/analytics/analytics/v2/segmentations/%7BsegmentationId%7D/dynamic/value", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "variables": [
                {
                  "name": "event.params.PARAMNAME",
                  "value": "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/analytics/analytics/v2/segmentations/%7BsegmentationId%7D/dynamic/value");
            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": "/analytics/analytics/v2/segmentations/%7BsegmentationId%7D/dynamic/value",
              "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({variables: [{name: 'event.params.PARAMNAME', value: 'string'}]}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/analytics/v2/segmentations/%7BsegmentationId%7D/dynamic/value');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"variables":[{"name":"event.params.PARAMNAME","value":"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/analytics/analytics/v2/segmentations/%7BsegmentationId%7D/dynamic/value")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"variables\":[{\"name\":\"event.params.PARAMNAME\",\"value\":\"string\"}]}")
              .asString();
  /analytics/analytics/v2/segmentations/preview:
    post:
      tags:
        - "Analytics: Segmentations"
      summary: Preview segmentation
      description: |
        Preview the results of a segmentation, with information about the results of each segment. This request does not save the analysis.

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-segmentation-preview-legacy
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-SegmentationPreviewRequest"
      responses:
        "200":
          description: Calculation result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-SegmentationCalculationResponse"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Segmentations/operation/analytics2-segmentation-preview-legacy
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/analytics/v2/segmentations/preview \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"title":"string","description":"string","segments":[{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}}}],"unique":true},"allowNull":true}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}}}],\"unique\":true},\"allowNull\":true}"

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

            conn.request("POST", "/analytics/analytics/v2/segmentations/preview", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "title": "string",
                "description": "string",
                "segments": [
                  {
                    "title": "string",
                    "description": "string",
                    "filter": {
                      "matching": true,
                      "expressions": [
                        {
                          "type": "FUNNEL",
                          "matching": true,
                          "funnel": {
                            "completedWithin": {
                              "period": "YEARS",
                              "value": 0
                            },
                            "dateFilter": {
                              "type": "ABSOLUTE",
                              "from": "2019-08-24T14:15:22Z",
                              "to": "2019-08-24T14:15:22Z",
                              "filter": {
                                "type": "DAILY",
                                "nestingType": "IN_PLACE",
                                "from": "string",
                                "to": "string",
                                "inverted": false
                              }
                            },
                            "exact": false,
                            "steps": [
                              {
                                "title": "string",
                                "action": {
                                  "id": 0,
                                  "name": "page.visit"
                                },
                                "expressions": [
                                  {
                                    "attribute": {
                                      "type": "PARAM",
                                      "param": "string",
                                      "id": 0
                                    },
                                    "constraint": {
                                      "type": "BOOL",
                                      "logic": "IS_TRUE"
                                    }
                                  }
                                ]
                              }
                            ],
                            "title": "string"
                          }
                        }
                      ],
                      "expression": {}
                    }
                  }
                ],
                "unique": true
              },
              "allowNull": 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/analytics/analytics/v2/segmentations/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": "/analytics/analytics/v2/segmentations/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({
              analysis: {
                title: 'string',
                description: 'string',
                segments: [
                  {
                    title: 'string',
                    description: 'string',
                    filter: {
                      matching: true,
                      expressions: [
                        {
                          type: 'FUNNEL',
                          matching: true,
                          funnel: {
                            completedWithin: {period: 'YEARS', value: 0},
                            dateFilter: {
                              type: 'ABSOLUTE',
                              from: '2019-08-24T14:15:22Z',
                              to: '2019-08-24T14:15:22Z',
                              filter: {
                                type: 'DAILY',
                                nestingType: 'IN_PLACE',
                                from: 'string',
                                to: 'string',
                                inverted: false
                              }
                            },
                            exact: false,
                            steps: [
                              {
                                title: 'string',
                                action: {id: 0, name: 'page.visit'},
                                expressions: [
                                  {
                                    attribute: {type: 'PARAM', param: 'string', id: 0},
                                    constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                                  }
                                ]
                              }
                            ],
                            title: 'string'
                          }
                        }
                      ],
                      expression: {}
                    }
                  }
                ],
                unique: true
              },
              allowNull: true
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"analysis":{"title":"string","description":"string","segments":[{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}}}],"unique":true},"allowNull":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/analytics/analytics/v2/segmentations/preview")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}}}],\"unique\":true},\"allowNull\":true}")
              .asString();
  /analytics/analytics/v2/segmentations/preview/clients:
    post:
      tags:
        - "Analytics: Segmentations"
      summary: Preview profiles in segmentation
      description: |
        Calculate a segmentation and get a list of profiles in each segment. This request doesn't save the segmentation in the database.

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-segmentation-preview-clients-legacy
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-SegmentationPreviewRequest"
      responses:
        "200":
          description: Array of segments
          content:
            application/json:
              schema:
                type: array
                description: Each item in this array is a segment, according to their order in the request.
                items:
                  type: array
                  description: Each number in the segment is a profile ID.
                  items:
                    type: number
                    format: int64
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Segmentations/operation/analytics2-segmentation-preview-clients-legacy
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/analytics/v2/segmentations/preview/clients \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"title":"string","description":"string","segments":[{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}}}],"unique":true},"allowNull":true}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}}}],\"unique\":true},\"allowNull\":true}"

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

            conn.request("POST", "/analytics/analytics/v2/segmentations/preview/clients", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "title": "string",
                "description": "string",
                "segments": [
                  {
                    "title": "string",
                    "description": "string",
                    "filter": {
                      "matching": true,
                      "expressions": [
                        {
                          "type": "FUNNEL",
                          "matching": true,
                          "funnel": {
                            "completedWithin": {
                              "period": "YEARS",
                              "value": 0
                            },
                            "dateFilter": {
                              "type": "ABSOLUTE",
                              "from": "2019-08-24T14:15:22Z",
                              "to": "2019-08-24T14:15:22Z",
                              "filter": {
                                "type": "DAILY",
                                "nestingType": "IN_PLACE",
                                "from": "string",
                                "to": "string",
                                "inverted": false
                              }
                            },
                            "exact": false,
                            "steps": [
                              {
                                "title": "string",
                                "action": {
                                  "id": 0,
                                  "name": "page.visit"
                                },
                                "expressions": [
                                  {
                                    "attribute": {
                                      "type": "PARAM",
                                      "param": "string",
                                      "id": 0
                                    },
                                    "constraint": {
                                      "type": "BOOL",
                                      "logic": "IS_TRUE"
                                    }
                                  }
                                ]
                              }
                            ],
                            "title": "string"
                          }
                        }
                      ],
                      "expression": {}
                    }
                  }
                ],
                "unique": true
              },
              "allowNull": 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/analytics/analytics/v2/segmentations/preview/clients");
            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": "/analytics/analytics/v2/segmentations/preview/clients",
              "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({
              analysis: {
                title: 'string',
                description: 'string',
                segments: [
                  {
                    title: 'string',
                    description: 'string',
                    filter: {
                      matching: true,
                      expressions: [
                        {
                          type: 'FUNNEL',
                          matching: true,
                          funnel: {
                            completedWithin: {period: 'YEARS', value: 0},
                            dateFilter: {
                              type: 'ABSOLUTE',
                              from: '2019-08-24T14:15:22Z',
                              to: '2019-08-24T14:15:22Z',
                              filter: {
                                type: 'DAILY',
                                nestingType: 'IN_PLACE',
                                from: 'string',
                                to: 'string',
                                inverted: false
                              }
                            },
                            exact: false,
                            steps: [
                              {
                                title: 'string',
                                action: {id: 0, name: 'page.visit'},
                                expressions: [
                                  {
                                    attribute: {type: 'PARAM', param: 'string', id: 0},
                                    constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                                  }
                                ]
                              }
                            ],
                            title: 'string'
                          }
                        }
                      ],
                      expression: {}
                    }
                  }
                ],
                unique: true
              },
              allowNull: true
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/analytics/v2/segmentations/preview/clients');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"analysis":{"title":"string","description":"string","segments":[{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}}}],"unique":true},"allowNull":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/analytics/analytics/v2/segmentations/preview/clients")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}}}],\"unique\":true},\"allowNull\":true}")
              .asString();
  /analytics/analytics/v2/metrics/histograms/{histogramId}/recalculate/override:
    post:
      tags:
        - "Analytics: Histograms"
      summary: Calculate histogram with parameter override
      description: |
        Calculate a histogram with new parameters and/or variable (dynamic key) values.

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-calculate-histogram-with-override
      parameters:
        - $ref: "#/components/parameters/analytics-histogramIdAsPathParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-OverrideQueryRequest"
      responses:
        "200":
          description: Histogram override calculation result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-HistogramCalculationResponse"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Histograms/operation/analytics2-calculate-histogram-with-override
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/analytics/v2/metrics/histograms/%7BhistogramId%7D/recalculate/override \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"aggregateDataBy":{"type":"YEARS","value":0},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"variables":[{"name":"string","value":"string"}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"variables\":[{\"name\":\"string\",\"value\":\"string\"}]}"

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

            conn.request("POST", "/analytics/analytics/v2/metrics/histograms/%7BhistogramId%7D/recalculate/override", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "dateFilter": {
                "type": "ABSOLUTE",
                "from": "2019-08-24T14:15:22Z",
                "to": "2019-08-24T14:15:22Z",
                "filter": {
                  "type": "DAILY",
                  "nestingType": "IN_PLACE",
                  "from": "string",
                  "to": "string",
                  "inverted": false
                }
              },
              "aggregateDataBy": {
                "type": "YEARS",
                "value": 0
              },
              "filter": {
                "matching": true,
                "expressions": [
                  {
                    "type": "FUNNEL",
                    "matching": true,
                    "funnel": {
                      "completedWithin": {
                        "period": "YEARS",
                        "value": 0
                      },
                      "dateFilter": {
                        "type": "ABSOLUTE",
                        "from": "2019-08-24T14:15:22Z",
                        "to": "2019-08-24T14:15:22Z",
                        "filter": {
                          "type": "DAILY",
                          "nestingType": "IN_PLACE",
                          "from": "string",
                          "to": "string",
                          "inverted": false
                        }
                      },
                      "exact": false,
                      "steps": [
                        {
                          "title": "string",
                          "action": {
                            "id": 0,
                            "name": "page.visit"
                          },
                          "expressions": [
                            {
                              "attribute": {
                                "type": "PARAM",
                                "param": "string",
                                "id": 0
                              },
                              "constraint": {
                                "type": "BOOL",
                                "logic": "IS_TRUE"
                              }
                            }
                          ]
                        }
                      ],
                      "title": "string"
                    }
                  }
                ],
                "expression": {}
              },
              "variables": [
                {
                  "name": "string",
                  "value": "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/analytics/analytics/v2/metrics/histograms/%7BhistogramId%7D/recalculate/override");
            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": "/analytics/analytics/v2/metrics/histograms/%7BhistogramId%7D/recalculate/override",
              "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({
              dateFilter: {
                type: 'ABSOLUTE',
                from: '2019-08-24T14:15:22Z',
                to: '2019-08-24T14:15:22Z',
                filter: {
                  type: 'DAILY',
                  nestingType: 'IN_PLACE',
                  from: 'string',
                  to: 'string',
                  inverted: false
                }
              },
              aggregateDataBy: {type: 'YEARS', value: 0},
              filter: {
                matching: true,
                expressions: [
                  {
                    type: 'FUNNEL',
                    matching: true,
                    funnel: {
                      completedWithin: {period: 'YEARS', value: 0},
                      dateFilter: {
                        type: 'ABSOLUTE',
                        from: '2019-08-24T14:15:22Z',
                        to: '2019-08-24T14:15:22Z',
                        filter: {
                          type: 'DAILY',
                          nestingType: 'IN_PLACE',
                          from: 'string',
                          to: 'string',
                          inverted: false
                        }
                      },
                      exact: false,
                      steps: [
                        {
                          title: 'string',
                          action: {id: 0, name: 'page.visit'},
                          expressions: [
                            {
                              attribute: {type: 'PARAM', param: 'string', id: 0},
                              constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                            }
                          ]
                        }
                      ],
                      title: 'string'
                    }
                  }
                ],
                expression: {}
              },
              variables: [{name: 'string', value: 'string'}]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/analytics/v2/metrics/histograms/%7BhistogramId%7D/recalculate/override');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"aggregateDataBy":{"type":"YEARS","value":0},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"variables":[{"name":"string","value":"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/analytics/analytics/v2/metrics/histograms/%7BhistogramId%7D/recalculate/override")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"variables\":[{\"name\":\"string\",\"value\":\"string\"}]}")
              .asString();
  /analytics/analytics/v2/metrics/histograms/preview:
    post:
      tags:
        - "Analytics: Histograms"
      summary: Preview histogram
      description: |
        Preview the results of a histogram. This request doesn't save the histogram.

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-histogram-preview-legacy
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-HistogramLegacyPreviewRequest"
      responses:
        "200":
          description: Histogram preview calculation result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-HistogramCalculationResponse"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Histograms/operation/analytics2-histogram-preview-legacy
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/analytics/v2/metrics/histograms/preview \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"title":"string","description":"string","histogram":{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"period":{"type":"YEARS","value":0},"eventMetrics":[{"metricId":"c2cc9ad9-a69d-40a3-8e01-a95e09e71978","chartType":"COLUMN","title":"string"}]}}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"histogram\":{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"period\":{\"type\":\"YEARS\",\"value\":0},\"eventMetrics\":[{\"metricId\":\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\",\"chartType\":\"COLUMN\",\"title\":\"string\"}]}}}"

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

            conn.request("POST", "/analytics/analytics/v2/metrics/histograms/preview", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "title": "string",
                "description": "string",
                "histogram": {
                  "dateFilter": {
                    "type": "ABSOLUTE",
                    "from": "2019-08-24T14:15:22Z",
                    "to": "2019-08-24T14:15:22Z",
                    "filter": {
                      "type": "DAILY",
                      "nestingType": "IN_PLACE",
                      "from": "string",
                      "to": "string",
                      "inverted": false
                    }
                  },
                  "period": {
                    "type": "YEARS",
                    "value": 0
                  },
                  "eventMetrics": [
                    {
                      "metricId": "c2cc9ad9-a69d-40a3-8e01-a95e09e71978",
                      "chartType": "COLUMN",
                      "title": "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/analytics/analytics/v2/metrics/histograms/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": "/analytics/analytics/v2/metrics/histograms/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({
              analysis: {
                title: 'string',
                description: 'string',
                histogram: {
                  dateFilter: {
                    type: 'ABSOLUTE',
                    from: '2019-08-24T14:15:22Z',
                    to: '2019-08-24T14:15:22Z',
                    filter: {
                      type: 'DAILY',
                      nestingType: 'IN_PLACE',
                      from: 'string',
                      to: 'string',
                      inverted: false
                    }
                  },
                  period: {type: 'YEARS', value: 0},
                  eventMetrics: [
                    {
                      metricId: 'c2cc9ad9-a69d-40a3-8e01-a95e09e71978',
                      chartType: 'COLUMN',
                      title: 'string'
                    }
                  ]
                }
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/analytics/v2/metrics/histograms/preview');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"analysis":{"title":"string","description":"string","histogram":{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"period":{"type":"YEARS","value":0},"eventMetrics":[{"metricId":"c2cc9ad9-a69d-40a3-8e01-a95e09e71978","chartType":"COLUMN","title":"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/analytics/analytics/v2/metrics/histograms/preview")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"histogram\":{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"period\":{\"type\":\"YEARS\",\"value\":0},\"eventMetrics\":[{\"metricId\":\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\",\"chartType\":\"COLUMN\",\"title\":\"string\"}]}}}")
              .asString();
  /analytics/profiles/segmentations/firstMatch/by/{identifierType}:
    post:
      tags:
        - "Analytics: Segmentations"
      summary: Get first matching segmentation for profile from provided list
      description: |
        Check a number of segmentations and return the first one that matches the selected profile. Note that `segmentations` is a list of objects to check, and each object can also refer to multiple segmentations.

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_SEGMENTATIONS_READ`, `ANALYTICS_BACKEND_SEGMENTATION_READ`

        **User role permission required:** `analytics: read`
      operationId: analytics2-segmentation-first-match-by
      parameters:
        - $ref: "#/components/parameters/analytics-pathIdentifierType"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-AnalyticsFirstMatchRequest"
        required: true
      responses:
        "200":
          description: Identifier (`id` from the request body) of the matched entry
          content:
            application/json:
              schema:
                type: string
                format: uuid
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Segmentations/operation/analytics2-segmentation-first-match-by
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/profiles/segmentations/firstMatch/by/%7BidentifierType%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"identifierValue":"string","segmentations":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","segmentationIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"query":{"analysis":{"title":"string","description":"string","segments":[{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{}]}],"title":"string"}}],"expression":{}}}],"unique":true}}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"identifierValue\":\"string\",\"segmentations\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"segmentationIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"query\":{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{}]}],\"title\":\"string\"}}],\"expression\":{}}}],\"unique\":true}}}]}"

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

            conn.request("POST", "/analytics/profiles/segmentations/firstMatch/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",
              "segmentations": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "segmentationIds": [
                    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
                  ],
                  "query": {
                    "analysis": {
                      "title": "string",
                      "description": "string",
                      "segments": [
                        {
                          "title": "string",
                          "description": "string",
                          "filter": {
                            "matching": true,
                            "expressions": [
                              {
                                "type": "FUNNEL",
                                "matching": true,
                                "funnel": {
                                  "completedWithin": {
                                    "period": "YEARS",
                                    "value": 0
                                  },
                                  "dateFilter": {
                                    "type": "ABSOLUTE",
                                    "from": "2019-08-24T14:15:22Z",
                                    "to": "2019-08-24T14:15:22Z",
                                    "filter": {
                                      "type": "DAILY",
                                      "nestingType": "IN_PLACE",
                                      "from": "string",
                                      "to": "string",
                                      "inverted": false
                                    }
                                  },
                                  "exact": false,
                                  "steps": [
                                    {
                                      "title": "string",
                                      "action": {
                                        "id": 0,
                                        "name": "page.visit"
                                      },
                                      "expressions": [
                                        {}
                                      ]
                                    }
                                  ],
                                  "title": "string"
                                }
                              }
                            ],
                            "expression": {}
                          }
                        }
                      ],
                      "unique": 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/analytics/profiles/segmentations/firstMatch/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": "/analytics/profiles/segmentations/firstMatch/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',
              segmentations: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  segmentationIds: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],
                  query: {
                    analysis: {
                      title: 'string',
                      description: 'string',
                      segments: [
                        {
                          title: 'string',
                          description: 'string',
                          filter: {
                            matching: true,
                            expressions: [
                              {
                                type: 'FUNNEL',
                                matching: true,
                                funnel: {
                                  completedWithin: {period: 'YEARS', value: 0},
                                  dateFilter: {
                                    type: 'ABSOLUTE',
                                    from: '2019-08-24T14:15:22Z',
                                    to: '2019-08-24T14:15:22Z',
                                    filter: {
                                      type: 'DAILY',
                                      nestingType: 'IN_PLACE',
                                      from: 'string',
                                      to: 'string',
                                      inverted: false
                                    }
                                  },
                                  exact: false,
                                  steps: [{title: 'string', action: {id: 0, name: 'page.visit'}, expressions: [{}]}],
                                  title: 'string'
                                }
                              }
                            ],
                            expression: {}
                          }
                        }
                      ],
                      unique: true
                    }
                  }
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/profiles/segmentations/firstMatch/by/%7BidentifierType%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"identifierValue":"string","segmentations":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","segmentationIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"query":{"analysis":{"title":"string","description":"string","segments":[{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{}]}],"title":"string"}}],"expression":{}}}],"unique":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/analytics/profiles/segmentations/firstMatch/by/%7BidentifierType%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"identifierValue\":\"string\",\"segmentations\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"segmentationIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"query\":{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{}]}],\"title\":\"string\"}}],\"expression\":{}}}],\"unique\":true}}}]}")
              .asString();
  /analytics/{namespace}/segmentations:
    get:
      tags:
        - "Analytics: Segmentations"
      summary: List segmentations
      description: |
        Returns a paginated list of segmentations.

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-segmentations-list
      parameters:
        - $ref: "#/components/parameters/analytics-page"
        - $ref: "#/components/parameters/analytics-limit"
        - $ref: "#/components/parameters/analytics-search"
        - $ref: "#/components/parameters/analytics-sortBy"
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-directoryId"
        - $ref: "#/components/parameters/analytics-ids"
        - $ref: "#/components/parameters/analytics-shareType"
      responses:
        "200":
          description: List of segmentations
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: Array of segmentations
                    items:
                      $ref: "#/components/schemas/analytics-SegmentationListItem"
                  meta:
                    $ref: "#/components/schemas/analytics-meta"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Segmentations/operation/analytics2-segmentations-list
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/analytics/%7Bnamespace%7D/segmentations?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&shareType=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", "/analytics/%7Bnamespace%7D/segmentations?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&shareType=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/analytics/%7Bnamespace%7D/segmentations?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&shareType=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": "/analytics/%7Bnamespace%7D/segmentations?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&shareType=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/analytics/%7Bnamespace%7D/segmentations');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_INTEGER_VALUE',
              'limit' => 'SOME_INTEGER_VALUE',
              'search' => 'SOME_STRING_VALUE',
              'sortBy' => 'name:asc',
              'directoryId' => 'SOME_STRING_VALUE',
              'ids' => 'SOME_STRING_VALUE',
              'shareType' => '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/analytics/%7Bnamespace%7D/segmentations?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&shareType=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - "Analytics: Segmentations"
      summary: Create segmentation
      description: |
        Create a new segmentation

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_SEGMENTATIONS_CREATE`, `ANALYTICS_BACKEND_SEGMENTATION_CREATE`

        **User role permission required:** `analytics: create`
      operationId: analytics2-segmentations-create
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-SegmentationRequest"
      responses:
        "200":
          description: ID of the created segmentation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-uuid"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Segmentations/operation/analytics2-segmentations-create
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/segmentations \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"title":"string","description":"string","segments":[{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}}}],"unique":true},"isVisibleForClientProfile":true}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}}}],\"unique\":true},\"isVisibleForClientProfile\":true}"

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

            conn.request("POST", "/analytics/%7Bnamespace%7D/segmentations", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "title": "string",
                "description": "string",
                "segments": [
                  {
                    "title": "string",
                    "description": "string",
                    "filter": {
                      "matching": true,
                      "expressions": [
                        {
                          "type": "FUNNEL",
                          "matching": true,
                          "funnel": {
                            "completedWithin": {
                              "period": "YEARS",
                              "value": 0
                            },
                            "dateFilter": {
                              "type": "ABSOLUTE",
                              "from": "2019-08-24T14:15:22Z",
                              "to": "2019-08-24T14:15:22Z",
                              "filter": {
                                "type": "DAILY",
                                "nestingType": "IN_PLACE",
                                "from": "string",
                                "to": "string",
                                "inverted": false
                              }
                            },
                            "exact": false,
                            "steps": [
                              {
                                "title": "string",
                                "action": {
                                  "id": 0,
                                  "name": "page.visit"
                                },
                                "expressions": [
                                  {
                                    "attribute": {
                                      "type": "PARAM",
                                      "param": "string",
                                      "id": 0
                                    },
                                    "constraint": {
                                      "type": "BOOL",
                                      "logic": "IS_TRUE"
                                    }
                                  }
                                ]
                              }
                            ],
                            "title": "string"
                          }
                        }
                      ],
                      "expression": {}
                    }
                  }
                ],
                "unique": true
              },
              "isVisibleForClientProfile": 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/analytics/%7Bnamespace%7D/segmentations");
            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": "/analytics/%7Bnamespace%7D/segmentations",
              "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({
              analysis: {
                title: 'string',
                description: 'string',
                segments: [
                  {
                    title: 'string',
                    description: 'string',
                    filter: {
                      matching: true,
                      expressions: [
                        {
                          type: 'FUNNEL',
                          matching: true,
                          funnel: {
                            completedWithin: {period: 'YEARS', value: 0},
                            dateFilter: {
                              type: 'ABSOLUTE',
                              from: '2019-08-24T14:15:22Z',
                              to: '2019-08-24T14:15:22Z',
                              filter: {
                                type: 'DAILY',
                                nestingType: 'IN_PLACE',
                                from: 'string',
                                to: 'string',
                                inverted: false
                              }
                            },
                            exact: false,
                            steps: [
                              {
                                title: 'string',
                                action: {id: 0, name: 'page.visit'},
                                expressions: [
                                  {
                                    attribute: {type: 'PARAM', param: 'string', id: 0},
                                    constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                                  }
                                ]
                              }
                            ],
                            title: 'string'
                          }
                        }
                      ],
                      expression: {}
                    }
                  }
                ],
                unique: true
              },
              isVisibleForClientProfile: true
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/%7Bnamespace%7D/segmentations');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"analysis":{"title":"string","description":"string","segments":[{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}}}],"unique":true},"isVisibleForClientProfile":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/analytics/%7Bnamespace%7D/segmentations")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}}}],\"unique\":true},\"isVisibleForClientProfile\":true}")
              .asString();
  /analytics/{namespace}/segmentations/{segmentationId}:
    get:
      tags:
        - "Analytics: Segmentations"
      summary: Get segmentation details
      description: |
        Retrieve the details of a segmentation analysis

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_SEGMENTATIONS_READ`, `ANALYTICS_BACKEND_SEGMENTATION_READ`

        **User role permission required:** `analytics: read`
      operationId: analytics2-segmentation-get
      parameters:
        - $ref: "#/components/parameters/analytics-segmentationIdAsPathParam"
        - $ref: "#/components/parameters/analytics-pathNamespace"
      responses:
        "200":
          description: Segmentation details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-segmentation"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Segmentations/operation/analytics2-segmentation-get
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/segmentations/%7BsegmentationId%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", "/analytics/%7Bnamespace%7D/segmentations/%7BsegmentationId%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/analytics/%7Bnamespace%7D/segmentations/%7BsegmentationId%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": "/analytics/%7Bnamespace%7D/segmentations/%7BsegmentationId%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/analytics/%7Bnamespace%7D/segmentations/%7BsegmentationId%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/analytics/%7Bnamespace%7D/segmentations/%7BsegmentationId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    put:
      tags:
        - "Analytics: Segmentations"
      summary: Update segmentation
      description: |
        Update an existing segmentation analysis.

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_SEGMENTATIONS_UPDATE`, `ANALYTICS_BACKEND_SEGMENTATION_UPDATE`

        **User role permission required:** `analytics: update`
      operationId: analytics2-segmentation-update
      parameters:
        - $ref: "#/components/parameters/analytics-segmentationIdAsPathParam"
        - $ref: "#/components/parameters/analytics-pathNamespace"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-SegmentationRequest"
      responses:
        "200":
          description: Segmentation updated
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Segmentations/operation/analytics2-segmentation-update
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/segmentations/%7BsegmentationId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"title":"string","description":"string","segments":[{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}}}],"unique":true},"isVisibleForClientProfile":true}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}}}],\"unique\":true},\"isVisibleForClientProfile\":true}"

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

            conn.request("PUT", "/analytics/%7Bnamespace%7D/segmentations/%7BsegmentationId%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "title": "string",
                "description": "string",
                "segments": [
                  {
                    "title": "string",
                    "description": "string",
                    "filter": {
                      "matching": true,
                      "expressions": [
                        {
                          "type": "FUNNEL",
                          "matching": true,
                          "funnel": {
                            "completedWithin": {
                              "period": "YEARS",
                              "value": 0
                            },
                            "dateFilter": {
                              "type": "ABSOLUTE",
                              "from": "2019-08-24T14:15:22Z",
                              "to": "2019-08-24T14:15:22Z",
                              "filter": {
                                "type": "DAILY",
                                "nestingType": "IN_PLACE",
                                "from": "string",
                                "to": "string",
                                "inverted": false
                              }
                            },
                            "exact": false,
                            "steps": [
                              {
                                "title": "string",
                                "action": {
                                  "id": 0,
                                  "name": "page.visit"
                                },
                                "expressions": [
                                  {
                                    "attribute": {
                                      "type": "PARAM",
                                      "param": "string",
                                      "id": 0
                                    },
                                    "constraint": {
                                      "type": "BOOL",
                                      "logic": "IS_TRUE"
                                    }
                                  }
                                ]
                              }
                            ],
                            "title": "string"
                          }
                        }
                      ],
                      "expression": {}
                    }
                  }
                ],
                "unique": true
              },
              "isVisibleForClientProfile": true
            });

            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/analytics/%7Bnamespace%7D/segmentations/%7BsegmentationId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/analytics/%7Bnamespace%7D/segmentations/%7BsegmentationId%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({
              analysis: {
                title: 'string',
                description: 'string',
                segments: [
                  {
                    title: 'string',
                    description: 'string',
                    filter: {
                      matching: true,
                      expressions: [
                        {
                          type: 'FUNNEL',
                          matching: true,
                          funnel: {
                            completedWithin: {period: 'YEARS', value: 0},
                            dateFilter: {
                              type: 'ABSOLUTE',
                              from: '2019-08-24T14:15:22Z',
                              to: '2019-08-24T14:15:22Z',
                              filter: {
                                type: 'DAILY',
                                nestingType: 'IN_PLACE',
                                from: 'string',
                                to: 'string',
                                inverted: false
                              }
                            },
                            exact: false,
                            steps: [
                              {
                                title: 'string',
                                action: {id: 0, name: 'page.visit'},
                                expressions: [
                                  {
                                    attribute: {type: 'PARAM', param: 'string', id: 0},
                                    constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                                  }
                                ]
                              }
                            ],
                            title: 'string'
                          }
                        }
                      ],
                      expression: {}
                    }
                  }
                ],
                unique: true
              },
              isVisibleForClientProfile: true
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/%7Bnamespace%7D/segmentations/%7BsegmentationId%7D');
            $request->setMethod(HTTP_METH_PUT);

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

            $request->setBody('{"analysis":{"title":"string","description":"string","segments":[{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}}}],"unique":true},"isVisibleForClientProfile":true}');

            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/analytics/%7Bnamespace%7D/segmentations/%7BsegmentationId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}}}],\"unique\":true},\"isVisibleForClientProfile\":true}")
              .asString();
    delete:
      tags:
        - "Analytics: Segmentations"
      summary: Delete segmentation
      operationId: analytics2-segmentation-delete
      parameters:
        - $ref: "#/components/parameters/analytics-segmentationIdAsPathParam"
        - $ref: "#/components/parameters/analytics-pathNamespace"
      responses:
        "204":
          description: Deleted segmentation analysis
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Segmentations/operation/analytics2-segmentation-delete
      description: |
        

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_SEGMENTATIONS_DELETE`, `ANALYTICS_BACKEND_SEGMENTATION_DELETE`

        **User role permission required:** `analytics: delete`
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/segmentations/%7BsegmentationId%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", "/analytics/%7Bnamespace%7D/segmentations/%7BsegmentationId%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/analytics/%7Bnamespace%7D/segmentations/%7BsegmentationId%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": "/analytics/%7Bnamespace%7D/segmentations/%7BsegmentationId%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/analytics/%7Bnamespace%7D/segmentations/%7BsegmentationId%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/analytics/%7Bnamespace%7D/segmentations/%7BsegmentationId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /analytics/{namespace}/segmentations/visible-for-client/by/{identifierType}:
    post:
      tags:
        - "Analytics: Segmentations"
      summary: Get segmentations for profile card
      description: |
        Retrieve segmentations to display on a profile's card in the Profiles module (`"isVisibleForClientProfile": true`) in the [segmentation config](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#operation/addSegmentationPOST_v2)).


        ---

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

        **User role permission required (at least one):** `analytics: read`, `client_analytics_preview: read`
      operationId: analytics2-client-card-segmentations-get
      parameters:
        - $ref: "#/components/parameters/analytics-pathIdentifierType"
        - $ref: "#/components/parameters/analytics-pathNamespace"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                identifierValue:
                  $ref: "#/components/schemas/analytics-identifierValue"
              required:
                - identifierValue
      responses:
        "200":
          description: List of checked segmentations configured as visible on the profile card
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/analytics-calculatedAnalytic"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Segmentations/operation/analytics2-client-card-segmentations-get
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/segmentations/visible-for-client/by/%7BidentifierType%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"identifierValue":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

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

            conn.request("POST", "/analytics/%7Bnamespace%7D/segmentations/visible-for-client/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"
            });

            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/analytics/%7Bnamespace%7D/segmentations/visible-for-client/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": "/analytics/%7Bnamespace%7D/segmentations/visible-for-client/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'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/%7Bnamespace%7D/segmentations/visible-for-client/by/%7BidentifierType%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"identifierValue":"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/analytics/%7Bnamespace%7D/segmentations/visible-for-client/by/%7BidentifierType%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"identifierValue\":\"string\"}")
              .asString();
  /analytics/{namespace}/segmentations/check/by/{identifierType}:
    post:
      tags:
        - "Analytics: Segmentations"
      summary: Check if profile in segmentations
      description: |
        Check if a profile is in a number of segmentations.

        **IMPORTANT**: This endpoint is limited to:
        - 10 segmentations per request
        - 500 requests per second
        - 10 requests per second per profile


        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-segmentation-check
      parameters:
        - $ref: "#/components/parameters/analytics-pathIdentifierType"
        - $ref: "#/components/parameters/analytics-pathNamespace"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                identifierValue:
                  $ref: "#/components/schemas/analytics-identifierValue"
                segmentationIds:
                  type: array
                  description: UUIDs of the segmentations to check
                  items:
                    $ref: "#/components/schemas/analytics-analyticId"
                  maxItems: 10
              required:
                - identifierValue
                - segmentationIds
      responses:
        "200":
          description: Check results
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/analytics-segmentationWithRelated"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Segmentations/operation/analytics2-segmentation-check
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/segmentations/check/by/%7BidentifierType%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"identifierValue":"string","segmentationIds":["5370bf3c-2dfa-4e89-98ff-07100cffee6c"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"identifierValue\":\"string\",\"segmentationIds\":[\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\"]}"

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

            conn.request("POST", "/analytics/%7Bnamespace%7D/segmentations/check/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",
              "segmentationIds": [
                "5370bf3c-2dfa-4e89-98ff-07100cffee6c"
              ]
            });

            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/analytics/%7Bnamespace%7D/segmentations/check/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": "/analytics/%7Bnamespace%7D/segmentations/check/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',
              segmentationIds: ['5370bf3c-2dfa-4e89-98ff-07100cffee6c']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/%7Bnamespace%7D/segmentations/check/by/%7BidentifierType%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"identifierValue":"string","segmentationIds":["5370bf3c-2dfa-4e89-98ff-07100cffee6c"]}');

            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/analytics/%7Bnamespace%7D/segmentations/check/by/%7BidentifierType%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"identifierValue\":\"string\",\"segmentationIds\":[\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\"]}")
              .asString();
  /analytics/analytics/definitions-manager/aggregates/{aggregateId}/client/{clientId}/calculate/histogram:
    post:
      tags:
        - "Analytics: Aggregates"
      summary: Calculate aggregate for profile with period conditions
      description: |
        Calculate the results of an aggregate in context of a single profile. The results can be date-filtered and aggregated in time periods.

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics-calculate-aggregate-for-profile-with-period-uuid
      parameters:
        - $ref: "#/components/parameters/analytics-aggregateIdAsPathParam"
        - $ref: "#/components/parameters/analytics-clientIdAsPathParameter"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-AggregateHistogramRequest"
      responses:
        "200":
          description: Aggregate calculation result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-AggregateHistogramCalculationResponse"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Analytics:-Aggregates/operation/analytics-calculate-aggregate-for-profile-with-period-uuid
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/analytics/definitions-manager/aggregates/%7BaggregateId%7D/client/%7BclientId%7D/calculate/histogram \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"variables":[{"name":"string","value":"string"}],"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"aggregateDataBy":{"type":"YEARS","value":0}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"variables\":[{\"name\":\"string\",\"value\":\"string\"}],\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0}}"

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

            conn.request("POST", "/analytics/analytics/definitions-manager/aggregates/%7BaggregateId%7D/client/%7BclientId%7D/calculate/histogram", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "variables": [
                {
                  "name": "string",
                  "value": "string"
                }
              ],
              "dateFilter": {
                "type": "ABSOLUTE",
                "from": "2019-08-24T14:15:22Z",
                "to": "2019-08-24T14:15:22Z",
                "filter": {
                  "type": "DAILY",
                  "nestingType": "IN_PLACE",
                  "from": "string",
                  "to": "string",
                  "inverted": false
                }
              },
              "aggregateDataBy": {
                "type": "YEARS",
                "value": 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/analytics/analytics/definitions-manager/aggregates/%7BaggregateId%7D/client/%7BclientId%7D/calculate/histogram");
            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": "/analytics/analytics/definitions-manager/aggregates/%7BaggregateId%7D/client/%7BclientId%7D/calculate/histogram",
              "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({
              variables: [{name: 'string', value: 'string'}],
              dateFilter: {
                type: 'ABSOLUTE',
                from: '2019-08-24T14:15:22Z',
                to: '2019-08-24T14:15:22Z',
                filter: {
                  type: 'DAILY',
                  nestingType: 'IN_PLACE',
                  from: 'string',
                  to: 'string',
                  inverted: false
                }
              },
              aggregateDataBy: {type: 'YEARS', value: 0}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/analytics/definitions-manager/aggregates/%7BaggregateId%7D/client/%7BclientId%7D/calculate/histogram');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"variables":[{"name":"string","value":"string"}],"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"aggregateDataBy":{"type":"YEARS","value":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/analytics/analytics/definitions-manager/aggregates/%7BaggregateId%7D/client/%7BclientId%7D/calculate/histogram")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"variables\":[{\"name\":\"string\",\"value\":\"string\"}],\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0}}")
              .asString();
  /analytics/{namespace}/aggregates/preview/by/{identifierType}:
    post:
      tags:
        - "Analytics: Aggregates"
      summary: Get aggregate preview
      description: |
        Retrieve aggregate preview value. Previews are only available for the AGGREGATE type (profile aggregate). This request doesn't save an aggregate to the database.

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_AGGREGATES_READ`, `ANALYTICS_BACKEND_AGGREGATE_READ`

        **User role permission required:** `analytics_aggregates: read`
      operationId: analytics2-aggregate-preview-v2
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-pathIdentifierType"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-PreviewAggregateRequest"
      responses:
        "200":
          description: Aggregate preview
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-AggregateTypedCalculationResponse"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Analytics:-Aggregates/operation/analytics2-aggregate-preview-v2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates/preview/by/%7BidentifierType%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"aggregate":{"oldId":0,"aggregateType":"AGGREGATE","name":"string","description":"string","action":{"id":0,"name":"page.visit"},"attribute":{"type":"PARAM","param":"string","id":0},"type":"AVG","level":0.01,"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"size":0,"unique":false,"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]},"identifierValue":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"aggregate\":{\"oldId\":0,\"aggregateType\":\"AGGREGATE\",\"name\":\"string\",\"description\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"type\":\"AVG\",\"level\":0.01,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"size\":0,\"unique\":false,\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]},\"identifierValue\":\"string\"}"

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

            conn.request("POST", "/analytics/%7Bnamespace%7D/aggregates/preview/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({
              "aggregate": {
                "oldId": 0,
                "aggregateType": "AGGREGATE",
                "name": "string",
                "description": "string",
                "action": {
                  "id": 0,
                  "name": "page.visit"
                },
                "attribute": {
                  "type": "PARAM",
                  "param": "string",
                  "id": 0
                },
                "type": "AVG",
                "level": 0.01,
                "dateFilter": {
                  "type": "ABSOLUTE",
                  "from": "2019-08-24T14:15:22Z",
                  "to": "2019-08-24T14:15:22Z",
                  "filter": {
                    "type": "DAILY",
                    "nestingType": "IN_PLACE",
                    "from": "string",
                    "to": "string",
                    "inverted": false
                  }
                },
                "size": 0,
                "unique": false,
                "expressions": [
                  {
                    "attribute": {
                      "type": "PARAM",
                      "param": "string",
                      "id": 0
                    },
                    "constraint": {
                      "type": "BOOL",
                      "logic": "IS_TRUE"
                    }
                  }
                ]
              },
              "identifierValue": "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/analytics/%7Bnamespace%7D/aggregates/preview/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": "/analytics/%7Bnamespace%7D/aggregates/preview/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({
              aggregate: {
                oldId: 0,
                aggregateType: 'AGGREGATE',
                name: 'string',
                description: 'string',
                action: {id: 0, name: 'page.visit'},
                attribute: {type: 'PARAM', param: 'string', id: 0},
                type: 'AVG',
                level: 0.01,
                dateFilter: {
                  type: 'ABSOLUTE',
                  from: '2019-08-24T14:15:22Z',
                  to: '2019-08-24T14:15:22Z',
                  filter: {
                    type: 'DAILY',
                    nestingType: 'IN_PLACE',
                    from: 'string',
                    to: 'string',
                    inverted: false
                  }
                },
                size: 0,
                unique: false,
                expressions: [
                  {
                    attribute: {type: 'PARAM', param: 'string', id: 0},
                    constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                  }
                ]
              },
              identifierValue: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates/preview/by/%7BidentifierType%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"aggregate":{"oldId":0,"aggregateType":"AGGREGATE","name":"string","description":"string","action":{"id":0,"name":"page.visit"},"attribute":{"type":"PARAM","param":"string","id":0},"type":"AVG","level":0.01,"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"size":0,"unique":false,"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]},"identifierValue":"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/analytics/%7Bnamespace%7D/aggregates/preview/by/%7BidentifierType%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"aggregate\":{\"oldId\":0,\"aggregateType\":\"AGGREGATE\",\"name\":\"string\",\"description\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"type\":\"AVG\",\"level\":0.01,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"size\":0,\"unique\":false,\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]},\"identifierValue\":\"string\"}")
              .asString();
  /analytics/{namespace}/aggregates/visible-for-client/by/{identifierType}:
    post:
      tags:
        - "Analytics: Aggregates"
      summary: Get aggregates for profile card
      description: |
        Retrieve aggregates to display on a profile's card in the Profiles module (`"isVisibleForClientProfile": true`) in the [expression config](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#operation/addAggregatePOST)).


        ---

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

        **User role permission required (at least one):** `analytics: read`, `client_analytics_preview: read`
      operationId: analytics2-client-card-aggregates-get
      parameters:
        - $ref: "#/components/parameters/analytics-pathIdentifierType"
        - $ref: "#/components/parameters/analytics-pathNamespace"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                identifierValue:
                  $ref: "#/components/schemas/analytics-identifierValue"
              required:
                - identifierValue
      responses:
        "200":
          description: List of calculated aggregates configured as visible on the profile card
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/analytics-calculatedAnalytic"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Analytics:-Aggregates/operation/analytics2-client-card-aggregates-get
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates/visible-for-client/by/%7BidentifierType%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"identifierValue":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

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

            conn.request("POST", "/analytics/%7Bnamespace%7D/aggregates/visible-for-client/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"
            });

            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/analytics/%7Bnamespace%7D/aggregates/visible-for-client/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": "/analytics/%7Bnamespace%7D/aggregates/visible-for-client/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'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates/visible-for-client/by/%7BidentifierType%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"identifierValue":"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/analytics/%7Bnamespace%7D/aggregates/visible-for-client/by/%7BidentifierType%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"identifierValue\":\"string\"}")
              .asString();
  /analytics/{namespace}/aggregates/{aggregateId}/calculate/by/{identifierType}:
    post:
      tags:
        - "Analytics: Aggregates"
      summary: Calculate aggregate for profile
      description: |
        Calculate the result of an existing aggregate in context of a single profile.

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-aggregate-calculate
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-aggregateIdAsPathParam"
        - $ref: "#/components/parameters/analytics-pathIdentifierType"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                identifierValue:
                  $ref: "#/components/schemas/analytics-identifierValue"
              required:
                - identifierValue
      responses:
        "200":
          description: Aggregate result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-AggregateResult"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Analytics:-Aggregates/operation/analytics2-aggregate-calculate
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%7D/calculate/by/%7BidentifierType%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"identifierValue":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

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

            conn.request("POST", "/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%7D/calculate/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"
            });

            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/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%7D/calculate/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": "/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%7D/calculate/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'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%7D/calculate/by/%7BidentifierType%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"identifierValue":"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/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%7D/calculate/by/%7BidentifierType%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"identifierValue\":\"string\"}")
              .asString();
  /analytics/{namespace}/aggregates:
    get:
      tags:
        - "Analytics: Aggregates"
      summary: List aggregates
      description: |
        Returns a paginated list of aggregates.

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-aggregates-list
      parameters:
        - $ref: "#/components/parameters/analytics-page"
        - $ref: "#/components/parameters/analytics-limit"
        - $ref: "#/components/parameters/analytics-search"
        - $ref: "#/components/parameters/analytics-sortBy"
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-directoryId"
        - $ref: "#/components/parameters/analytics-ids"
        - $ref: "#/components/parameters/analytics-aggregateType"
      responses:
        "200":
          description: List of aggregates
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-analyticAggregateResponse"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Analytics:-Aggregates/operation/analytics2-aggregates-list
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&aggregateType=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", "/analytics/%7Bnamespace%7D/aggregates?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&aggregateType=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/analytics/%7Bnamespace%7D/aggregates?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&aggregateType=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": "/analytics/%7Bnamespace%7D/aggregates?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&aggregateType=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/analytics/%7Bnamespace%7D/aggregates');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_INTEGER_VALUE',
              'limit' => 'SOME_INTEGER_VALUE',
              'search' => 'SOME_STRING_VALUE',
              'sortBy' => 'name:asc',
              'directoryId' => 'SOME_STRING_VALUE',
              'ids' => 'SOME_STRING_VALUE',
              'aggregateType' => '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/analytics/%7Bnamespace%7D/aggregates?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&aggregateType=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - "Analytics: Aggregates"
      summary: Create aggregate
      description: |
        Create an aggregate analysis and save it to the database.

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_AGGREGATES_CREATE`, `ANALYTICS_BACKEND_AGGREGATE_CREATE`

        **User role permission required:** `analytics_aggregates: create`
      operationId: analytics2-aggregate-create
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-AggregateRequest"
      responses:
        "201":
          description: Aggregate has been created
          content:
            application/json:
              schema:
                type: string
                description: UUID of the created aggregate
                format: uuid
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Analytics:-Aggregates/operation/analytics2-aggregate-create
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"aggregateType":"RUNNING_AGGREGATE","excludeCurrent":true,"timeWindow":{"type":"YEARS","value":0},"name":"string","description":"string","action":{"id":0,"name":"page.visit"},"attribute":{"type":"PARAM","param":"string","id":0},"type":"AVG","level":0.01,"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"size":0,"unique":false,"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]},"isVisibleForClientProfile":true,"previewDefaultObjectId":0}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"aggregateType\":\"RUNNING_AGGREGATE\",\"excludeCurrent\":true,\"timeWindow\":{\"type\":\"YEARS\",\"value\":0},\"name\":\"string\",\"description\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"type\":\"AVG\",\"level\":0.01,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"size\":0,\"unique\":false,\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]},\"isVisibleForClientProfile\":true,\"previewDefaultObjectId\":0}"

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

            conn.request("POST", "/analytics/%7Bnamespace%7D/aggregates", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "aggregateType": "RUNNING_AGGREGATE",
                "excludeCurrent": true,
                "timeWindow": {
                  "type": "YEARS",
                  "value": 0
                },
                "name": "string",
                "description": "string",
                "action": {
                  "id": 0,
                  "name": "page.visit"
                },
                "attribute": {
                  "type": "PARAM",
                  "param": "string",
                  "id": 0
                },
                "type": "AVG",
                "level": 0.01,
                "dateFilter": {
                  "type": "ABSOLUTE",
                  "from": "2019-08-24T14:15:22Z",
                  "to": "2019-08-24T14:15:22Z",
                  "filter": {
                    "type": "DAILY",
                    "nestingType": "IN_PLACE",
                    "from": "string",
                    "to": "string",
                    "inverted": false
                  }
                },
                "size": 0,
                "unique": false,
                "expressions": [
                  {
                    "attribute": {
                      "type": "PARAM",
                      "param": "string",
                      "id": 0
                    },
                    "constraint": {
                      "type": "BOOL",
                      "logic": "IS_TRUE"
                    }
                  }
                ]
              },
              "isVisibleForClientProfile": true,
              "previewDefaultObjectId": 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/analytics/%7Bnamespace%7D/aggregates");
            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": "/analytics/%7Bnamespace%7D/aggregates",
              "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({
              analysis: {
                aggregateType: 'RUNNING_AGGREGATE',
                excludeCurrent: true,
                timeWindow: {type: 'YEARS', value: 0},
                name: 'string',
                description: 'string',
                action: {id: 0, name: 'page.visit'},
                attribute: {type: 'PARAM', param: 'string', id: 0},
                type: 'AVG',
                level: 0.01,
                dateFilter: {
                  type: 'ABSOLUTE',
                  from: '2019-08-24T14:15:22Z',
                  to: '2019-08-24T14:15:22Z',
                  filter: {
                    type: 'DAILY',
                    nestingType: 'IN_PLACE',
                    from: 'string',
                    to: 'string',
                    inverted: false
                  }
                },
                size: 0,
                unique: false,
                expressions: [
                  {
                    attribute: {type: 'PARAM', param: 'string', id: 0},
                    constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                  }
                ]
              },
              isVisibleForClientProfile: true,
              previewDefaultObjectId: 0
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"analysis":{"aggregateType":"RUNNING_AGGREGATE","excludeCurrent":true,"timeWindow":{"type":"YEARS","value":0},"name":"string","description":"string","action":{"id":0,"name":"page.visit"},"attribute":{"type":"PARAM","param":"string","id":0},"type":"AVG","level":0.01,"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"size":0,"unique":false,"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]},"isVisibleForClientProfile":true,"previewDefaultObjectId":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/analytics/%7Bnamespace%7D/aggregates")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"aggregateType\":\"RUNNING_AGGREGATE\",\"excludeCurrent\":true,\"timeWindow\":{\"type\":\"YEARS\",\"value\":0},\"name\":\"string\",\"description\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"type\":\"AVG\",\"level\":0.01,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"size\":0,\"unique\":false,\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]},\"isVisibleForClientProfile\":true,\"previewDefaultObjectId\":0}")
              .asString();
  /analytics/{namespace}/aggregates/{aggregateId}:
    get:
      tags:
        - "Analytics: Aggregates"
      summary: Get aggregate details
      description: |
        Retrieve all data about an aggregate definition.

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_AGGREGATES_READ`, `ANALYTICS_BACKEND_AGGREGATE_READ`

        **User role permission required:** `analytics_aggregates: read`
      operationId: analytics2-aggregate-get
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-aggregateIdAsPathParam"
      responses:
        "200":
          description: Details of the aggregate
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-Aggregate"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Analytics:-Aggregates/operation/analytics2-aggregate-get
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%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", "/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%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/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%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": "/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%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/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%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/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    put:
      tags:
        - "Analytics: Aggregates"
      summary: Update aggregate
      description: |
        Update an aggregate.

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_AGGREGATES_UPDATE`, `ANALYTICS_BACKEND_AGGREGATE_UPDATE`

        **User role permission required:** `analytics_aggregates: update`
      operationId: analytics2-aggregate-update
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-aggregateIdAsPathParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-AggregateUpdateRequest"
      responses:
        "200":
          description: Aggregate updated
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Analytics:-Aggregates/operation/analytics2-aggregate-update
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"oldId":0,"aggregateType":"RUNNING_AGGREGATE","excludeCurrent":true,"timeWindow":{"type":"YEARS","value":0},"name":"string","description":"string","action":{"id":0,"name":"page.visit"},"attribute":{"type":"PARAM","param":"string","id":0},"type":"AVG","level":0.01,"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"size":0,"unique":false,"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]},"isVisibleForClientProfile":true,"previewDefaultObjectId":0}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"oldId\":0,\"aggregateType\":\"RUNNING_AGGREGATE\",\"excludeCurrent\":true,\"timeWindow\":{\"type\":\"YEARS\",\"value\":0},\"name\":\"string\",\"description\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"type\":\"AVG\",\"level\":0.01,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"size\":0,\"unique\":false,\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]},\"isVisibleForClientProfile\":true,\"previewDefaultObjectId\":0}"

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

            conn.request("PUT", "/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "oldId": 0,
                "aggregateType": "RUNNING_AGGREGATE",
                "excludeCurrent": true,
                "timeWindow": {
                  "type": "YEARS",
                  "value": 0
                },
                "name": "string",
                "description": "string",
                "action": {
                  "id": 0,
                  "name": "page.visit"
                },
                "attribute": {
                  "type": "PARAM",
                  "param": "string",
                  "id": 0
                },
                "type": "AVG",
                "level": 0.01,
                "dateFilter": {
                  "type": "ABSOLUTE",
                  "from": "2019-08-24T14:15:22Z",
                  "to": "2019-08-24T14:15:22Z",
                  "filter": {
                    "type": "DAILY",
                    "nestingType": "IN_PLACE",
                    "from": "string",
                    "to": "string",
                    "inverted": false
                  }
                },
                "size": 0,
                "unique": false,
                "expressions": [
                  {
                    "attribute": {
                      "type": "PARAM",
                      "param": "string",
                      "id": 0
                    },
                    "constraint": {
                      "type": "BOOL",
                      "logic": "IS_TRUE"
                    }
                  }
                ]
              },
              "isVisibleForClientProfile": true,
              "previewDefaultObjectId": 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/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%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({
              analysis: {
                oldId: 0,
                aggregateType: 'RUNNING_AGGREGATE',
                excludeCurrent: true,
                timeWindow: {type: 'YEARS', value: 0},
                name: 'string',
                description: 'string',
                action: {id: 0, name: 'page.visit'},
                attribute: {type: 'PARAM', param: 'string', id: 0},
                type: 'AVG',
                level: 0.01,
                dateFilter: {
                  type: 'ABSOLUTE',
                  from: '2019-08-24T14:15:22Z',
                  to: '2019-08-24T14:15:22Z',
                  filter: {
                    type: 'DAILY',
                    nestingType: 'IN_PLACE',
                    from: 'string',
                    to: 'string',
                    inverted: false
                  }
                },
                size: 0,
                unique: false,
                expressions: [
                  {
                    attribute: {type: 'PARAM', param: 'string', id: 0},
                    constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                  }
                ]
              },
              isVisibleForClientProfile: true,
              previewDefaultObjectId: 0
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%7D');
            $request->setMethod(HTTP_METH_PUT);

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

            $request->setBody('{"analysis":{"oldId":0,"aggregateType":"RUNNING_AGGREGATE","excludeCurrent":true,"timeWindow":{"type":"YEARS","value":0},"name":"string","description":"string","action":{"id":0,"name":"page.visit"},"attribute":{"type":"PARAM","param":"string","id":0},"type":"AVG","level":0.01,"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"size":0,"unique":false,"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]},"isVisibleForClientProfile":true,"previewDefaultObjectId":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/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"oldId\":0,\"aggregateType\":\"RUNNING_AGGREGATE\",\"excludeCurrent\":true,\"timeWindow\":{\"type\":\"YEARS\",\"value\":0},\"name\":\"string\",\"description\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"type\":\"AVG\",\"level\":0.01,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"size\":0,\"unique\":false,\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]},\"isVisibleForClientProfile\":true,\"previewDefaultObjectId\":0}")
              .asString();
    delete:
      tags:
        - "Analytics: Aggregates"
      summary: Delete aggregate
      operationId: analytics2-aggregate-delete
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-aggregateIdAsPathParam"
      responses:
        "204":
          description: Aggregate deleted
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Analytics:-Aggregates/operation/analytics2-aggregate-delete
      description: |
        

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_AGGREGATES_DELETE`, `ANALYTICS_BACKEND_AGGREGATE_DELETE`

        **User role permission required:** `analytics_aggregates: delete`
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%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", "/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%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/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%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": "/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%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/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%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/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /analytics/analytics/v2/sankeys/preview:
    post:
      tags:
        - "Analytics: Sankeys"
      summary: Preview Sankey analysis
      description: |
        Preview the results of a Sankey analysis. This request doesn't save the analysis.

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-sankey-preview-override
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-CreateRequestSankeyAnalysis"
        required: true
      responses:
        "200":
          description: Calculation results
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: "#/components/schemas/analytics-SankeyCalculationResponse"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Sankeys/operation/analytics2-sankey-preview-override
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/analytics/v2/sankeys/preview \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"title":"string","description":"string","sourceEvent":{"action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]},"reverseOrder":true,"numberOfSteps":0,"numberOfPaths":0,"drillDown":[{"eventName":"page.visit","attribute":{"type":"PARAM","param":"string","id":0},"layer":0}],"drillDownCount":null,"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"eventFilters":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"excludeEvents":true,"firstOccurrenceOnly":true}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"sourceEvent\":{\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]},\"reverseOrder\":true,\"numberOfSteps\":0,\"numberOfPaths\":0,\"drillDown\":[{\"eventName\":\"page.visit\",\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"layer\":0}],\"drillDownCount\":null,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"eventFilters\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"excludeEvents\":true,\"firstOccurrenceOnly\":true}}"

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

            conn.request("POST", "/analytics/analytics/v2/sankeys/preview", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "title": "string",
                "description": "string",
                "sourceEvent": {
                  "action": {
                    "id": 0,
                    "name": "page.visit"
                  },
                  "expressions": [
                    {
                      "attribute": {
                        "type": "PARAM",
                        "param": "string",
                        "id": 0
                      },
                      "constraint": {
                        "type": "BOOL",
                        "logic": "IS_TRUE"
                      }
                    }
                  ]
                },
                "reverseOrder": true,
                "numberOfSteps": 0,
                "numberOfPaths": 0,
                "drillDown": [
                  {
                    "eventName": "page.visit",
                    "attribute": {
                      "type": "PARAM",
                      "param": "string",
                      "id": 0
                    },
                    "layer": 0
                  }
                ],
                "drillDownCount": null,
                "dateFilter": {
                  "type": "ABSOLUTE",
                  "from": "2019-08-24T14:15:22Z",
                  "to": "2019-08-24T14:15:22Z",
                  "filter": {
                    "type": "DAILY",
                    "nestingType": "IN_PLACE",
                    "from": "string",
                    "to": "string",
                    "inverted": false
                  }
                },
                "filter": {
                  "matching": true,
                  "expressions": [
                    {
                      "type": "FUNNEL",
                      "matching": true,
                      "funnel": {
                        "completedWithin": {
                          "period": "YEARS",
                          "value": 0
                        },
                        "dateFilter": {
                          "type": "ABSOLUTE",
                          "from": "2019-08-24T14:15:22Z",
                          "to": "2019-08-24T14:15:22Z",
                          "filter": {
                            "type": "DAILY",
                            "nestingType": "IN_PLACE",
                            "from": "string",
                            "to": "string",
                            "inverted": false
                          }
                        },
                        "exact": false,
                        "steps": [
                          {
                            "title": "string",
                            "action": {
                              "id": 0,
                              "name": "page.visit"
                            },
                            "expressions": [
                              {
                                "attribute": {
                                  "type": "PARAM",
                                  "param": "string",
                                  "id": 0
                                },
                                "constraint": {
                                  "type": "BOOL",
                                  "logic": "IS_TRUE"
                                }
                              }
                            ]
                          }
                        ],
                        "title": "string"
                      }
                    }
                  ],
                  "expression": {}
                },
                "eventFilters": [
                  {
                    "title": "string",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "expressions": [
                      {
                        "attribute": {
                          "type": "PARAM",
                          "param": "string",
                          "id": 0
                        },
                        "constraint": {
                          "type": "BOOL",
                          "logic": "IS_TRUE"
                        }
                      }
                    ]
                  }
                ],
                "excludeEvents": true,
                "firstOccurrenceOnly": 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/analytics/analytics/v2/sankeys/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": "/analytics/analytics/v2/sankeys/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({
              analysis: {
                title: 'string',
                description: 'string',
                sourceEvent: {
                  action: {id: 0, name: 'page.visit'},
                  expressions: [
                    {
                      attribute: {type: 'PARAM', param: 'string', id: 0},
                      constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                    }
                  ]
                },
                reverseOrder: true,
                numberOfSteps: 0,
                numberOfPaths: 0,
                drillDown: [
                  {
                    eventName: 'page.visit',
                    attribute: {type: 'PARAM', param: 'string', id: 0},
                    layer: 0
                  }
                ],
                drillDownCount: null,
                dateFilter: {
                  type: 'ABSOLUTE',
                  from: '2019-08-24T14:15:22Z',
                  to: '2019-08-24T14:15:22Z',
                  filter: {
                    type: 'DAILY',
                    nestingType: 'IN_PLACE',
                    from: 'string',
                    to: 'string',
                    inverted: false
                  }
                },
                filter: {
                  matching: true,
                  expressions: [
                    {
                      type: 'FUNNEL',
                      matching: true,
                      funnel: {
                        completedWithin: {period: 'YEARS', value: 0},
                        dateFilter: {
                          type: 'ABSOLUTE',
                          from: '2019-08-24T14:15:22Z',
                          to: '2019-08-24T14:15:22Z',
                          filter: {
                            type: 'DAILY',
                            nestingType: 'IN_PLACE',
                            from: 'string',
                            to: 'string',
                            inverted: false
                          }
                        },
                        exact: false,
                        steps: [
                          {
                            title: 'string',
                            action: {id: 0, name: 'page.visit'},
                            expressions: [
                              {
                                attribute: {type: 'PARAM', param: 'string', id: 0},
                                constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                              }
                            ]
                          }
                        ],
                        title: 'string'
                      }
                    }
                  ],
                  expression: {}
                },
                eventFilters: [
                  {
                    title: 'string',
                    action: {id: 0, name: 'page.visit'},
                    expressions: [
                      {
                        attribute: {type: 'PARAM', param: 'string', id: 0},
                        constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                      }
                    ]
                  }
                ],
                excludeEvents: true,
                firstOccurrenceOnly: true
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"analysis":{"title":"string","description":"string","sourceEvent":{"action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]},"reverseOrder":true,"numberOfSteps":0,"numberOfPaths":0,"drillDown":[{"eventName":"page.visit","attribute":{"type":"PARAM","param":"string","id":0},"layer":0}],"drillDownCount":null,"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"eventFilters":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"excludeEvents":true,"firstOccurrenceOnly":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/analytics/analytics/v2/sankeys/preview")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"sourceEvent\":{\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]},\"reverseOrder\":true,\"numberOfSteps\":0,\"numberOfPaths\":0,\"drillDown\":[{\"eventName\":\"page.visit\",\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"layer\":0}],\"drillDownCount\":null,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"eventFilters\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"excludeEvents\":true,\"firstOccurrenceOnly\":true}}")
              .asString();
  /analytics/analytics/v2/funnels/preview:
    post:
      tags:
        - "Analytics: Funnels"
      summary: Preview funnel calculation
      description: |
        Preview the results of a funnel. This request doesn't save the funnel.

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-funnel-preview
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-FunnelRequest"
        required: true
      responses:
        "200":
          description: Preview of the results
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-FunnelCalculationResponse"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Funnels/operation/analytics2-funnel-preview
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/analytics/v2/funnels/preview \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"title":"string","description":"string","funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}}}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}}}}"

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

            conn.request("POST", "/analytics/analytics/v2/funnels/preview", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "title": "string",
                "description": "string",
                "funnel": {
                  "completedWithin": {
                    "period": "YEARS",
                    "value": 0
                  },
                  "dateFilter": {
                    "type": "ABSOLUTE",
                    "from": "2019-08-24T14:15:22Z",
                    "to": "2019-08-24T14:15:22Z",
                    "filter": {
                      "type": "DAILY",
                      "nestingType": "IN_PLACE",
                      "from": "string",
                      "to": "string",
                      "inverted": false
                    }
                  },
                  "exact": false,
                  "steps": [
                    {
                      "title": "string",
                      "action": {
                        "id": 0,
                        "name": "page.visit"
                      },
                      "expressions": [
                        {
                          "attribute": {
                            "type": "PARAM",
                            "param": "string",
                            "id": 0
                          },
                          "constraint": {
                            "type": "BOOL",
                            "logic": "IS_TRUE"
                          }
                        }
                      ]
                    }
                  ],
                  "title": "string"
                },
                "filter": {
                  "matching": true,
                  "expressions": [
                    {
                      "type": "FUNNEL",
                      "matching": true,
                      "funnel": {
                        "completedWithin": {
                          "period": "YEARS",
                          "value": 0
                        },
                        "dateFilter": {
                          "type": "ABSOLUTE",
                          "from": "2019-08-24T14:15:22Z",
                          "to": "2019-08-24T14:15:22Z",
                          "filter": {
                            "type": "DAILY",
                            "nestingType": "IN_PLACE",
                            "from": "string",
                            "to": "string",
                            "inverted": false
                          }
                        },
                        "exact": false,
                        "steps": [
                          {
                            "title": "string",
                            "action": {
                              "id": 0,
                              "name": "page.visit"
                            },
                            "expressions": [
                              {
                                "attribute": {
                                  "type": "PARAM",
                                  "param": "string",
                                  "id": 0
                                },
                                "constraint": {
                                  "type": "BOOL",
                                  "logic": "IS_TRUE"
                                }
                              }
                            ]
                          }
                        ],
                        "title": "string"
                      }
                    }
                  ],
                  "expression": {}
                }
              }
            });

            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/analytics/analytics/v2/funnels/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": "/analytics/analytics/v2/funnels/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({
              analysis: {
                title: 'string',
                description: 'string',
                funnel: {
                  completedWithin: {period: 'YEARS', value: 0},
                  dateFilter: {
                    type: 'ABSOLUTE',
                    from: '2019-08-24T14:15:22Z',
                    to: '2019-08-24T14:15:22Z',
                    filter: {
                      type: 'DAILY',
                      nestingType: 'IN_PLACE',
                      from: 'string',
                      to: 'string',
                      inverted: false
                    }
                  },
                  exact: false,
                  steps: [
                    {
                      title: 'string',
                      action: {id: 0, name: 'page.visit'},
                      expressions: [
                        {
                          attribute: {type: 'PARAM', param: 'string', id: 0},
                          constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                        }
                      ]
                    }
                  ],
                  title: 'string'
                },
                filter: {
                  matching: true,
                  expressions: [
                    {
                      type: 'FUNNEL',
                      matching: true,
                      funnel: {
                        completedWithin: {period: 'YEARS', value: 0},
                        dateFilter: {
                          type: 'ABSOLUTE',
                          from: '2019-08-24T14:15:22Z',
                          to: '2019-08-24T14:15:22Z',
                          filter: {
                            type: 'DAILY',
                            nestingType: 'IN_PLACE',
                            from: 'string',
                            to: 'string',
                            inverted: false
                          }
                        },
                        exact: false,
                        steps: [
                          {
                            title: 'string',
                            action: {id: 0, name: 'page.visit'},
                            expressions: [
                              {
                                attribute: {type: 'PARAM', param: 'string', id: 0},
                                constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                              }
                            ]
                          }
                        ],
                        title: 'string'
                      }
                    }
                  ],
                  expression: {}
                }
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"analysis":{"title":"string","description":"string","funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}}}}');

            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/analytics/analytics/v2/funnels/preview")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}}}}")
              .asString();
  /analytics/analytics/v2/funnels/{funnelId}/recalculate/override:
    post:
      tags:
        - "Analytics: Funnels"
      summary: Recalculate funnel with parameter override
      description: |
        Recalculate a funnel with new parameters and/or variable (dynamic key) values.

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-funnel-preview-override
      parameters:
        - $ref: "#/components/parameters/analytics-funnelIdAsPathParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-OverrideQueryRequest"
        required: true
      responses:
        "200":
          description: Funnel results
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: "#/components/schemas/analytics-FunnelCalculationResponse"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Funnels/operation/analytics2-funnel-preview-override
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/analytics/v2/funnels/%7BfunnelId%7D/recalculate/override \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"aggregateDataBy":{"type":"YEARS","value":0},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"variables":[{"name":"string","value":"string"}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"variables\":[{\"name\":\"string\",\"value\":\"string\"}]}"

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

            conn.request("POST", "/analytics/analytics/v2/funnels/%7BfunnelId%7D/recalculate/override", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "dateFilter": {
                "type": "ABSOLUTE",
                "from": "2019-08-24T14:15:22Z",
                "to": "2019-08-24T14:15:22Z",
                "filter": {
                  "type": "DAILY",
                  "nestingType": "IN_PLACE",
                  "from": "string",
                  "to": "string",
                  "inverted": false
                }
              },
              "aggregateDataBy": {
                "type": "YEARS",
                "value": 0
              },
              "filter": {
                "matching": true,
                "expressions": [
                  {
                    "type": "FUNNEL",
                    "matching": true,
                    "funnel": {
                      "completedWithin": {
                        "period": "YEARS",
                        "value": 0
                      },
                      "dateFilter": {
                        "type": "ABSOLUTE",
                        "from": "2019-08-24T14:15:22Z",
                        "to": "2019-08-24T14:15:22Z",
                        "filter": {
                          "type": "DAILY",
                          "nestingType": "IN_PLACE",
                          "from": "string",
                          "to": "string",
                          "inverted": false
                        }
                      },
                      "exact": false,
                      "steps": [
                        {
                          "title": "string",
                          "action": {
                            "id": 0,
                            "name": "page.visit"
                          },
                          "expressions": [
                            {
                              "attribute": {
                                "type": "PARAM",
                                "param": "string",
                                "id": 0
                              },
                              "constraint": {
                                "type": "BOOL",
                                "logic": "IS_TRUE"
                              }
                            }
                          ]
                        }
                      ],
                      "title": "string"
                    }
                  }
                ],
                "expression": {}
              },
              "variables": [
                {
                  "name": "string",
                  "value": "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/analytics/analytics/v2/funnels/%7BfunnelId%7D/recalculate/override");
            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": "/analytics/analytics/v2/funnels/%7BfunnelId%7D/recalculate/override",
              "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({
              dateFilter: {
                type: 'ABSOLUTE',
                from: '2019-08-24T14:15:22Z',
                to: '2019-08-24T14:15:22Z',
                filter: {
                  type: 'DAILY',
                  nestingType: 'IN_PLACE',
                  from: 'string',
                  to: 'string',
                  inverted: false
                }
              },
              aggregateDataBy: {type: 'YEARS', value: 0},
              filter: {
                matching: true,
                expressions: [
                  {
                    type: 'FUNNEL',
                    matching: true,
                    funnel: {
                      completedWithin: {period: 'YEARS', value: 0},
                      dateFilter: {
                        type: 'ABSOLUTE',
                        from: '2019-08-24T14:15:22Z',
                        to: '2019-08-24T14:15:22Z',
                        filter: {
                          type: 'DAILY',
                          nestingType: 'IN_PLACE',
                          from: 'string',
                          to: 'string',
                          inverted: false
                        }
                      },
                      exact: false,
                      steps: [
                        {
                          title: 'string',
                          action: {id: 0, name: 'page.visit'},
                          expressions: [
                            {
                              attribute: {type: 'PARAM', param: 'string', id: 0},
                              constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                            }
                          ]
                        }
                      ],
                      title: 'string'
                    }
                  }
                ],
                expression: {}
              },
              variables: [{name: 'string', value: 'string'}]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/analytics/v2/funnels/%7BfunnelId%7D/recalculate/override');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"aggregateDataBy":{"type":"YEARS","value":0},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"variables":[{"name":"string","value":"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/analytics/analytics/v2/funnels/%7BfunnelId%7D/recalculate/override")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"variables\":[{\"name\":\"string\",\"value\":\"string\"}]}")
              .asString();
  /analytics/{namespace}/funnels:
    get:
      tags:
        - "Analytics: Funnels"
      summary: List funnels
      description: |
        Returns a paginated list of funnels.

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-funnels-list
      parameters:
        - $ref: "#/components/parameters/analytics-page"
        - $ref: "#/components/parameters/analytics-limit"
        - $ref: "#/components/parameters/analytics-search"
        - $ref: "#/components/parameters/analytics-sortBy"
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-directoryId"
        - $ref: "#/components/parameters/analytics-ids"
      responses:
        "200":
          description: List of funnels
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: Array of funnels
                    items:
                      $ref: "#/components/schemas/analytics-ListAnalyticsItemCommon"
                  meta:
                    $ref: "#/components/schemas/analytics-meta"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Funnels/operation/analytics2-funnels-list
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/analytics/%7Bnamespace%7D/funnels?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=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", "/analytics/%7Bnamespace%7D/funnels?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=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/analytics/%7Bnamespace%7D/funnels?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=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": "/analytics/%7Bnamespace%7D/funnels?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=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/analytics/%7Bnamespace%7D/funnels');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_INTEGER_VALUE',
              'limit' => 'SOME_INTEGER_VALUE',
              'search' => 'SOME_STRING_VALUE',
              'sortBy' => 'name:asc',
              'directoryId' => 'SOME_STRING_VALUE',
              'ids' => '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/analytics/%7Bnamespace%7D/funnels?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - "Analytics: Funnels"
      summary: Create a funnel
      description: |
        Create a funnel.

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_FUNNELS_CREATE`, `ANALYTICS_BACKEND_FUNNEL_CREATE`

        **User role permission required:** `analytics: create`
      operationId: analytics2-funnels-create
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-FunnelRequest"
      responses:
        "201":
          description: Funnel created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-uuid"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Funnels/operation/analytics2-funnels-create
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/funnels \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"title":"string","description":"string","funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}}}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}}}}"

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

            conn.request("POST", "/analytics/%7Bnamespace%7D/funnels", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "title": "string",
                "description": "string",
                "funnel": {
                  "completedWithin": {
                    "period": "YEARS",
                    "value": 0
                  },
                  "dateFilter": {
                    "type": "ABSOLUTE",
                    "from": "2019-08-24T14:15:22Z",
                    "to": "2019-08-24T14:15:22Z",
                    "filter": {
                      "type": "DAILY",
                      "nestingType": "IN_PLACE",
                      "from": "string",
                      "to": "string",
                      "inverted": false
                    }
                  },
                  "exact": false,
                  "steps": [
                    {
                      "title": "string",
                      "action": {
                        "id": 0,
                        "name": "page.visit"
                      },
                      "expressions": [
                        {
                          "attribute": {
                            "type": "PARAM",
                            "param": "string",
                            "id": 0
                          },
                          "constraint": {
                            "type": "BOOL",
                            "logic": "IS_TRUE"
                          }
                        }
                      ]
                    }
                  ],
                  "title": "string"
                },
                "filter": {
                  "matching": true,
                  "expressions": [
                    {
                      "type": "FUNNEL",
                      "matching": true,
                      "funnel": {
                        "completedWithin": {
                          "period": "YEARS",
                          "value": 0
                        },
                        "dateFilter": {
                          "type": "ABSOLUTE",
                          "from": "2019-08-24T14:15:22Z",
                          "to": "2019-08-24T14:15:22Z",
                          "filter": {
                            "type": "DAILY",
                            "nestingType": "IN_PLACE",
                            "from": "string",
                            "to": "string",
                            "inverted": false
                          }
                        },
                        "exact": false,
                        "steps": [
                          {
                            "title": "string",
                            "action": {
                              "id": 0,
                              "name": "page.visit"
                            },
                            "expressions": [
                              {
                                "attribute": {
                                  "type": "PARAM",
                                  "param": "string",
                                  "id": 0
                                },
                                "constraint": {
                                  "type": "BOOL",
                                  "logic": "IS_TRUE"
                                }
                              }
                            ]
                          }
                        ],
                        "title": "string"
                      }
                    }
                  ],
                  "expression": {}
                }
              }
            });

            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/analytics/%7Bnamespace%7D/funnels");
            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": "/analytics/%7Bnamespace%7D/funnels",
              "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({
              analysis: {
                title: 'string',
                description: 'string',
                funnel: {
                  completedWithin: {period: 'YEARS', value: 0},
                  dateFilter: {
                    type: 'ABSOLUTE',
                    from: '2019-08-24T14:15:22Z',
                    to: '2019-08-24T14:15:22Z',
                    filter: {
                      type: 'DAILY',
                      nestingType: 'IN_PLACE',
                      from: 'string',
                      to: 'string',
                      inverted: false
                    }
                  },
                  exact: false,
                  steps: [
                    {
                      title: 'string',
                      action: {id: 0, name: 'page.visit'},
                      expressions: [
                        {
                          attribute: {type: 'PARAM', param: 'string', id: 0},
                          constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                        }
                      ]
                    }
                  ],
                  title: 'string'
                },
                filter: {
                  matching: true,
                  expressions: [
                    {
                      type: 'FUNNEL',
                      matching: true,
                      funnel: {
                        completedWithin: {period: 'YEARS', value: 0},
                        dateFilter: {
                          type: 'ABSOLUTE',
                          from: '2019-08-24T14:15:22Z',
                          to: '2019-08-24T14:15:22Z',
                          filter: {
                            type: 'DAILY',
                            nestingType: 'IN_PLACE',
                            from: 'string',
                            to: 'string',
                            inverted: false
                          }
                        },
                        exact: false,
                        steps: [
                          {
                            title: 'string',
                            action: {id: 0, name: 'page.visit'},
                            expressions: [
                              {
                                attribute: {type: 'PARAM', param: 'string', id: 0},
                                constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                              }
                            ]
                          }
                        ],
                        title: 'string'
                      }
                    }
                  ],
                  expression: {}
                }
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/%7Bnamespace%7D/funnels');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"analysis":{"title":"string","description":"string","funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}}}}');

            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/analytics/%7Bnamespace%7D/funnels")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}}}}")
              .asString();
  /analytics/{namespace}/funnels/{funnelId}:
    get:
      tags:
        - "Analytics: Funnels"
      summary: Get funnel details
      description: |
        Retrieve the definition of a single funnel

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_FUNNELS_READ`, `ANALYTICS_BACKEND_FUNNEL_READ`

        **User role permission required:** `analytics: read`
      operationId: analytics2-funnels-get
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-funnelIdAsPathParam"
      responses:
        "200":
          description: Details of the funnel
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-Funnel"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Funnels/operation/analytics2-funnels-get
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/funnels/%7BfunnelId%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", "/analytics/%7Bnamespace%7D/funnels/%7BfunnelId%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/analytics/%7Bnamespace%7D/funnels/%7BfunnelId%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": "/analytics/%7Bnamespace%7D/funnels/%7BfunnelId%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/analytics/%7Bnamespace%7D/funnels/%7BfunnelId%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/analytics/%7Bnamespace%7D/funnels/%7BfunnelId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    put:
      tags:
        - "Analytics: Funnels"
      summary: Update funnel
      description: |
        Update a funnel definition

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_FUNNELS_UPDATE`, `ANALYTICS_BACKEND_FUNNEL_UPDATE`

        **User role permission required:** `analytics: update`
      operationId: analytics2-funnels-update
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-funnelIdAsPathParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-FunnelRequest"
      responses:
        "200":
          description: Funnel updated
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Funnels/operation/analytics2-funnels-update
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/funnels/%7BfunnelId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"title":"string","description":"string","funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}}}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}}}}"

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

            conn.request("PUT", "/analytics/%7Bnamespace%7D/funnels/%7BfunnelId%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "title": "string",
                "description": "string",
                "funnel": {
                  "completedWithin": {
                    "period": "YEARS",
                    "value": 0
                  },
                  "dateFilter": {
                    "type": "ABSOLUTE",
                    "from": "2019-08-24T14:15:22Z",
                    "to": "2019-08-24T14:15:22Z",
                    "filter": {
                      "type": "DAILY",
                      "nestingType": "IN_PLACE",
                      "from": "string",
                      "to": "string",
                      "inverted": false
                    }
                  },
                  "exact": false,
                  "steps": [
                    {
                      "title": "string",
                      "action": {
                        "id": 0,
                        "name": "page.visit"
                      },
                      "expressions": [
                        {
                          "attribute": {
                            "type": "PARAM",
                            "param": "string",
                            "id": 0
                          },
                          "constraint": {
                            "type": "BOOL",
                            "logic": "IS_TRUE"
                          }
                        }
                      ]
                    }
                  ],
                  "title": "string"
                },
                "filter": {
                  "matching": true,
                  "expressions": [
                    {
                      "type": "FUNNEL",
                      "matching": true,
                      "funnel": {
                        "completedWithin": {
                          "period": "YEARS",
                          "value": 0
                        },
                        "dateFilter": {
                          "type": "ABSOLUTE",
                          "from": "2019-08-24T14:15:22Z",
                          "to": "2019-08-24T14:15:22Z",
                          "filter": {
                            "type": "DAILY",
                            "nestingType": "IN_PLACE",
                            "from": "string",
                            "to": "string",
                            "inverted": false
                          }
                        },
                        "exact": false,
                        "steps": [
                          {
                            "title": "string",
                            "action": {
                              "id": 0,
                              "name": "page.visit"
                            },
                            "expressions": [
                              {
                                "attribute": {
                                  "type": "PARAM",
                                  "param": "string",
                                  "id": 0
                                },
                                "constraint": {
                                  "type": "BOOL",
                                  "logic": "IS_TRUE"
                                }
                              }
                            ]
                          }
                        ],
                        "title": "string"
                      }
                    }
                  ],
                  "expression": {}
                }
              }
            });

            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/analytics/%7Bnamespace%7D/funnels/%7BfunnelId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/analytics/%7Bnamespace%7D/funnels/%7BfunnelId%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({
              analysis: {
                title: 'string',
                description: 'string',
                funnel: {
                  completedWithin: {period: 'YEARS', value: 0},
                  dateFilter: {
                    type: 'ABSOLUTE',
                    from: '2019-08-24T14:15:22Z',
                    to: '2019-08-24T14:15:22Z',
                    filter: {
                      type: 'DAILY',
                      nestingType: 'IN_PLACE',
                      from: 'string',
                      to: 'string',
                      inverted: false
                    }
                  },
                  exact: false,
                  steps: [
                    {
                      title: 'string',
                      action: {id: 0, name: 'page.visit'},
                      expressions: [
                        {
                          attribute: {type: 'PARAM', param: 'string', id: 0},
                          constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                        }
                      ]
                    }
                  ],
                  title: 'string'
                },
                filter: {
                  matching: true,
                  expressions: [
                    {
                      type: 'FUNNEL',
                      matching: true,
                      funnel: {
                        completedWithin: {period: 'YEARS', value: 0},
                        dateFilter: {
                          type: 'ABSOLUTE',
                          from: '2019-08-24T14:15:22Z',
                          to: '2019-08-24T14:15:22Z',
                          filter: {
                            type: 'DAILY',
                            nestingType: 'IN_PLACE',
                            from: 'string',
                            to: 'string',
                            inverted: false
                          }
                        },
                        exact: false,
                        steps: [
                          {
                            title: 'string',
                            action: {id: 0, name: 'page.visit'},
                            expressions: [
                              {
                                attribute: {type: 'PARAM', param: 'string', id: 0},
                                constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                              }
                            ]
                          }
                        ],
                        title: 'string'
                      }
                    }
                  ],
                  expression: {}
                }
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/%7Bnamespace%7D/funnels/%7BfunnelId%7D');
            $request->setMethod(HTTP_METH_PUT);

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

            $request->setBody('{"analysis":{"title":"string","description":"string","funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}}}}');

            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/analytics/%7Bnamespace%7D/funnels/%7BfunnelId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}}}}")
              .asString();
    delete:
      tags:
        - "Analytics: Funnels"
      summary: Delete funnel
      description: |
        Delete a funnel.

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_FUNNELS_DELETE`, `ANALYTICS_BACKEND_FUNNEL_DELETE`

        **User role permission required:** `analytics: delete`
      operationId: analytics2-funnels-delete
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-funnelIdAsPathParam"
      responses:
        "204":
          description: Funnel deleted
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Funnels/operation/analytics2-funnels-delete
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/funnels/%7BfunnelId%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", "/analytics/%7Bnamespace%7D/funnels/%7BfunnelId%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/analytics/%7Bnamespace%7D/funnels/%7BfunnelId%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": "/analytics/%7Bnamespace%7D/funnels/%7BfunnelId%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/analytics/%7Bnamespace%7D/funnels/%7BfunnelId%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/analytics/%7Bnamespace%7D/funnels/%7BfunnelId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /analytics/{namespace}/reports:
    get:
      tags:
        - "Analytics: Reports"
      summary: List reports
      description: |
        Returns a paginated list of reports.

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-reports-list
      parameters:
        - $ref: "#/components/parameters/analytics-page"
        - $ref: "#/components/parameters/analytics-limit"
        - $ref: "#/components/parameters/analytics-search"
        - $ref: "#/components/parameters/analytics-sortBy"
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-directoryId"
        - $ref: "#/components/parameters/analytics-ids"
        - $ref: "#/components/parameters/analytics-isMultiMetric"
      responses:
        "200":
          description: List of reports
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: Array of reports
                    items:
                      $ref: "#/components/schemas/analytics-ReportListItem"
                  meta:
                    $ref: "#/components/schemas/analytics-meta"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Reports/operation/analytics2-reports-list
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/analytics/%7Bnamespace%7D/reports?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&isMultiMetric=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", "/analytics/%7Bnamespace%7D/reports?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&isMultiMetric=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/analytics/%7Bnamespace%7D/reports?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&isMultiMetric=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": "/analytics/%7Bnamespace%7D/reports?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&isMultiMetric=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/analytics/%7Bnamespace%7D/reports');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_INTEGER_VALUE',
              'limit' => 'SOME_INTEGER_VALUE',
              'search' => 'SOME_STRING_VALUE',
              'sortBy' => 'name:asc',
              'directoryId' => 'SOME_STRING_VALUE',
              'ids' => 'SOME_STRING_VALUE',
              'isMultiMetric' => '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/analytics/%7Bnamespace%7D/reports?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&isMultiMetric=SOME_BOOLEAN_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - "Analytics: Reports"
      summary: Create report analysis
      operationId: analytics2-reports-create
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-ReportRequest"
      responses:
        "200":
          description: ID of the created report
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-uuid"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Reports/operation/analytics2-reports-create
      description: |
        

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_REPORTS_CREATE`, `ANALYTICS_BACKEND_REPORT_CREATE`

        **User role permission required:** `analytics: create`
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/reports \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"reportMetrics":[{"metricId":"c2cc9ad9-a69d-40a3-8e01-a95e09e71978","dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"action":{"id":0,"name":"page.visit"},"format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"columnName":"string","grouping":{"type":"TOP","top":0},"groups":[{"title":"string","format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"type":"CLIENT","attribute":{"type":"SEGMENTATION","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08"}}]}]},"allowNull":true}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"reportMetrics\":[{\"metricId\":\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\",\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"action\":{\"id\":0,\"name\":\"page.visit\"},\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"columnName\":\"string\",\"grouping\":{\"type\":\"TOP\",\"top\":0},\"groups\":[{\"title\":\"string\",\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"type\":\"CLIENT\",\"attribute\":{\"type\":\"SEGMENTATION\",\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"}}]}]},\"allowNull\":true}"

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

            conn.request("POST", "/analytics/%7Bnamespace%7D/reports", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "title": "string",
                "description": "string",
                "filter": {
                  "matching": true,
                  "expressions": [
                    {
                      "type": "FUNNEL",
                      "matching": true,
                      "funnel": {
                        "completedWithin": {
                          "period": "YEARS",
                          "value": 0
                        },
                        "dateFilter": {
                          "type": "ABSOLUTE",
                          "from": "2019-08-24T14:15:22Z",
                          "to": "2019-08-24T14:15:22Z",
                          "filter": {
                            "type": "DAILY",
                            "nestingType": "IN_PLACE",
                            "from": "string",
                            "to": "string",
                            "inverted": false
                          }
                        },
                        "exact": false,
                        "steps": [
                          {
                            "title": "string",
                            "action": {
                              "id": 0,
                              "name": "page.visit"
                            },
                            "expressions": [
                              {
                                "attribute": {
                                  "type": "PARAM",
                                  "param": "string",
                                  "id": 0
                                },
                                "constraint": {
                                  "type": "BOOL",
                                  "logic": "IS_TRUE"
                                }
                              }
                            ]
                          }
                        ],
                        "title": "string"
                      }
                    }
                  ],
                  "expression": {}
                },
                "reportMetrics": [
                  {
                    "metricId": "c2cc9ad9-a69d-40a3-8e01-a95e09e71978",
                    "dateFilter": {
                      "type": "ABSOLUTE",
                      "from": "2019-08-24T14:15:22Z",
                      "to": "2019-08-24T14:15:22Z",
                      "filter": {
                        "type": "DAILY",
                        "nestingType": "IN_PLACE",
                        "from": "string",
                        "to": "string",
                        "inverted": false
                      }
                    },
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "format": {
                      "compactNumbers": false,
                      "currency": "EUR",
                      "dataFormat": "cash",
                      "fixedLength": 0,
                      "useSeparator": false
                    },
                    "columnName": "string",
                    "grouping": {
                      "type": "TOP",
                      "top": 0
                    },
                    "groups": [
                      {
                        "title": "string",
                        "format": {
                          "compactNumbers": false,
                          "currency": "EUR",
                          "dataFormat": "cash",
                          "fixedLength": 0,
                          "useSeparator": false
                        },
                        "type": "CLIENT",
                        "attribute": {
                          "type": "SEGMENTATION",
                          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
                        }
                      }
                    ]
                  }
                ]
              },
              "allowNull": 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/analytics/%7Bnamespace%7D/reports");
            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": "/analytics/%7Bnamespace%7D/reports",
              "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({
              analysis: {
                title: 'string',
                description: 'string',
                filter: {
                  matching: true,
                  expressions: [
                    {
                      type: 'FUNNEL',
                      matching: true,
                      funnel: {
                        completedWithin: {period: 'YEARS', value: 0},
                        dateFilter: {
                          type: 'ABSOLUTE',
                          from: '2019-08-24T14:15:22Z',
                          to: '2019-08-24T14:15:22Z',
                          filter: {
                            type: 'DAILY',
                            nestingType: 'IN_PLACE',
                            from: 'string',
                            to: 'string',
                            inverted: false
                          }
                        },
                        exact: false,
                        steps: [
                          {
                            title: 'string',
                            action: {id: 0, name: 'page.visit'},
                            expressions: [
                              {
                                attribute: {type: 'PARAM', param: 'string', id: 0},
                                constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                              }
                            ]
                          }
                        ],
                        title: 'string'
                      }
                    }
                  ],
                  expression: {}
                },
                reportMetrics: [
                  {
                    metricId: 'c2cc9ad9-a69d-40a3-8e01-a95e09e71978',
                    dateFilter: {
                      type: 'ABSOLUTE',
                      from: '2019-08-24T14:15:22Z',
                      to: '2019-08-24T14:15:22Z',
                      filter: {
                        type: 'DAILY',
                        nestingType: 'IN_PLACE',
                        from: 'string',
                        to: 'string',
                        inverted: false
                      }
                    },
                    action: {id: 0, name: 'page.visit'},
                    format: {
                      compactNumbers: false,
                      currency: 'EUR',
                      dataFormat: 'cash',
                      fixedLength: 0,
                      useSeparator: false
                    },
                    columnName: 'string',
                    grouping: {type: 'TOP', top: 0},
                    groups: [
                      {
                        title: 'string',
                        format: {
                          compactNumbers: false,
                          currency: 'EUR',
                          dataFormat: 'cash',
                          fixedLength: 0,
                          useSeparator: false
                        },
                        type: 'CLIENT',
                        attribute: {type: 'SEGMENTATION', id: '497f6eca-6276-4993-bfeb-53cbbbba6f08'}
                      }
                    ]
                  }
                ]
              },
              allowNull: true
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/%7Bnamespace%7D/reports');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"analysis":{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"reportMetrics":[{"metricId":"c2cc9ad9-a69d-40a3-8e01-a95e09e71978","dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"action":{"id":0,"name":"page.visit"},"format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"columnName":"string","grouping":{"type":"TOP","top":0},"groups":[{"title":"string","format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"type":"CLIENT","attribute":{"type":"SEGMENTATION","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08"}}]}]},"allowNull":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/analytics/%7Bnamespace%7D/reports")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"reportMetrics\":[{\"metricId\":\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\",\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"action\":{\"id\":0,\"name\":\"page.visit\"},\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"columnName\":\"string\",\"grouping\":{\"type\":\"TOP\",\"top\":0},\"groups\":[{\"title\":\"string\",\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"type\":\"CLIENT\",\"attribute\":{\"type\":\"SEGMENTATION\",\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"}}]}]},\"allowNull\":true}")
              .asString();
  /analytics/{namespace}/reports/{reportId}:
    get:
      tags:
        - "Analytics: Reports"
      summary: Get report analysis details
      operationId: analytics2-reports-get
      parameters:
        - $ref: "#/components/parameters/analytics-reportIdAsPathParam"
        - $ref: "#/components/parameters/analytics-pathNamespace"
      responses:
        "200":
          description: Get report analysis details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-Report"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Reports/operation/analytics2-reports-get
      description: |
        

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_REPORTS_READ`, `ANALYTICS_BACKEND_REPORT_READ`

        **User role permission required:** `analytics: read`
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/reports/%7BreportId%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", "/analytics/%7Bnamespace%7D/reports/%7BreportId%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/analytics/%7Bnamespace%7D/reports/%7BreportId%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": "/analytics/%7Bnamespace%7D/reports/%7BreportId%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/analytics/%7Bnamespace%7D/reports/%7BreportId%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/analytics/%7Bnamespace%7D/reports/%7BreportId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    put:
      tags:
        - "Analytics: Reports"
      summary: Update report analysis
      operationId: analytics2-reports-update
      parameters:
        - $ref: "#/components/parameters/analytics-reportIdAsPathParam"
        - $ref: "#/components/parameters/analytics-pathNamespace"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-ReportRequest"
      responses:
        "200":
          description: Report analysis updated
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Reports/operation/analytics2-reports-update
      description: |
        

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_REPORTS_UPDATE`, `ANALYTICS_BACKEND_REPORT_UPDATE`

        **User role permission required:** `analytics: update`
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/reports/%7BreportId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"reportMetrics":[{"metricId":"c2cc9ad9-a69d-40a3-8e01-a95e09e71978","dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"action":{"id":0,"name":"page.visit"},"format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"columnName":"string","grouping":{"type":"TOP","top":0},"groups":[{"title":"string","format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"type":"CLIENT","attribute":{"type":"SEGMENTATION","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08"}}]}]},"allowNull":true}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"reportMetrics\":[{\"metricId\":\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\",\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"action\":{\"id\":0,\"name\":\"page.visit\"},\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"columnName\":\"string\",\"grouping\":{\"type\":\"TOP\",\"top\":0},\"groups\":[{\"title\":\"string\",\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"type\":\"CLIENT\",\"attribute\":{\"type\":\"SEGMENTATION\",\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"}}]}]},\"allowNull\":true}"

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

            conn.request("PUT", "/analytics/%7Bnamespace%7D/reports/%7BreportId%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "title": "string",
                "description": "string",
                "filter": {
                  "matching": true,
                  "expressions": [
                    {
                      "type": "FUNNEL",
                      "matching": true,
                      "funnel": {
                        "completedWithin": {
                          "period": "YEARS",
                          "value": 0
                        },
                        "dateFilter": {
                          "type": "ABSOLUTE",
                          "from": "2019-08-24T14:15:22Z",
                          "to": "2019-08-24T14:15:22Z",
                          "filter": {
                            "type": "DAILY",
                            "nestingType": "IN_PLACE",
                            "from": "string",
                            "to": "string",
                            "inverted": false
                          }
                        },
                        "exact": false,
                        "steps": [
                          {
                            "title": "string",
                            "action": {
                              "id": 0,
                              "name": "page.visit"
                            },
                            "expressions": [
                              {
                                "attribute": {
                                  "type": "PARAM",
                                  "param": "string",
                                  "id": 0
                                },
                                "constraint": {
                                  "type": "BOOL",
                                  "logic": "IS_TRUE"
                                }
                              }
                            ]
                          }
                        ],
                        "title": "string"
                      }
                    }
                  ],
                  "expression": {}
                },
                "reportMetrics": [
                  {
                    "metricId": "c2cc9ad9-a69d-40a3-8e01-a95e09e71978",
                    "dateFilter": {
                      "type": "ABSOLUTE",
                      "from": "2019-08-24T14:15:22Z",
                      "to": "2019-08-24T14:15:22Z",
                      "filter": {
                        "type": "DAILY",
                        "nestingType": "IN_PLACE",
                        "from": "string",
                        "to": "string",
                        "inverted": false
                      }
                    },
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "format": {
                      "compactNumbers": false,
                      "currency": "EUR",
                      "dataFormat": "cash",
                      "fixedLength": 0,
                      "useSeparator": false
                    },
                    "columnName": "string",
                    "grouping": {
                      "type": "TOP",
                      "top": 0
                    },
                    "groups": [
                      {
                        "title": "string",
                        "format": {
                          "compactNumbers": false,
                          "currency": "EUR",
                          "dataFormat": "cash",
                          "fixedLength": 0,
                          "useSeparator": false
                        },
                        "type": "CLIENT",
                        "attribute": {
                          "type": "SEGMENTATION",
                          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
                        }
                      }
                    ]
                  }
                ]
              },
              "allowNull": true
            });

            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/analytics/%7Bnamespace%7D/reports/%7BreportId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/analytics/%7Bnamespace%7D/reports/%7BreportId%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({
              analysis: {
                title: 'string',
                description: 'string',
                filter: {
                  matching: true,
                  expressions: [
                    {
                      type: 'FUNNEL',
                      matching: true,
                      funnel: {
                        completedWithin: {period: 'YEARS', value: 0},
                        dateFilter: {
                          type: 'ABSOLUTE',
                          from: '2019-08-24T14:15:22Z',
                          to: '2019-08-24T14:15:22Z',
                          filter: {
                            type: 'DAILY',
                            nestingType: 'IN_PLACE',
                            from: 'string',
                            to: 'string',
                            inverted: false
                          }
                        },
                        exact: false,
                        steps: [
                          {
                            title: 'string',
                            action: {id: 0, name: 'page.visit'},
                            expressions: [
                              {
                                attribute: {type: 'PARAM', param: 'string', id: 0},
                                constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                              }
                            ]
                          }
                        ],
                        title: 'string'
                      }
                    }
                  ],
                  expression: {}
                },
                reportMetrics: [
                  {
                    metricId: 'c2cc9ad9-a69d-40a3-8e01-a95e09e71978',
                    dateFilter: {
                      type: 'ABSOLUTE',
                      from: '2019-08-24T14:15:22Z',
                      to: '2019-08-24T14:15:22Z',
                      filter: {
                        type: 'DAILY',
                        nestingType: 'IN_PLACE',
                        from: 'string',
                        to: 'string',
                        inverted: false
                      }
                    },
                    action: {id: 0, name: 'page.visit'},
                    format: {
                      compactNumbers: false,
                      currency: 'EUR',
                      dataFormat: 'cash',
                      fixedLength: 0,
                      useSeparator: false
                    },
                    columnName: 'string',
                    grouping: {type: 'TOP', top: 0},
                    groups: [
                      {
                        title: 'string',
                        format: {
                          compactNumbers: false,
                          currency: 'EUR',
                          dataFormat: 'cash',
                          fixedLength: 0,
                          useSeparator: false
                        },
                        type: 'CLIENT',
                        attribute: {type: 'SEGMENTATION', id: '497f6eca-6276-4993-bfeb-53cbbbba6f08'}
                      }
                    ]
                  }
                ]
              },
              allowNull: true
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/%7Bnamespace%7D/reports/%7BreportId%7D');
            $request->setMethod(HTTP_METH_PUT);

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

            $request->setBody('{"analysis":{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"reportMetrics":[{"metricId":"c2cc9ad9-a69d-40a3-8e01-a95e09e71978","dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"action":{"id":0,"name":"page.visit"},"format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"columnName":"string","grouping":{"type":"TOP","top":0},"groups":[{"title":"string","format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"type":"CLIENT","attribute":{"type":"SEGMENTATION","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08"}}]}]},"allowNull":true}');

            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/analytics/%7Bnamespace%7D/reports/%7BreportId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"reportMetrics\":[{\"metricId\":\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\",\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"action\":{\"id\":0,\"name\":\"page.visit\"},\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"columnName\":\"string\",\"grouping\":{\"type\":\"TOP\",\"top\":0},\"groups\":[{\"title\":\"string\",\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"type\":\"CLIENT\",\"attribute\":{\"type\":\"SEGMENTATION\",\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"}}]}]},\"allowNull\":true}")
              .asString();
    delete:
      tags:
        - "Analytics: Reports"
      summary: Delete report analysis
      operationId: analytics2-reports-delete
      parameters:
        - $ref: "#/components/parameters/analytics-reportIdAsPathParam"
        - $ref: "#/components/parameters/analytics-pathNamespace"
      responses:
        "204":
          description: Report analysis deleted
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Reports/operation/analytics2-reports-delete
      description: |
        

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_REPORTS_DELETE`, `ANALYTICS_BACKEND_REPORT_DELETE`

        **User role permission required:** `analytics: delete`
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/reports/%7BreportId%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", "/analytics/%7Bnamespace%7D/reports/%7BreportId%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/analytics/%7Bnamespace%7D/reports/%7BreportId%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": "/analytics/%7Bnamespace%7D/reports/%7BreportId%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/analytics/%7Bnamespace%7D/reports/%7BreportId%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/analytics/%7Bnamespace%7D/reports/%7BreportId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /analytics/{namespace}/trends:
    get:
      tags:
        - "Analytics: Trends"
      summary: List trends
      description: |
        Returns a paginated list of trends.

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-trends-list
      parameters:
        - $ref: "#/components/parameters/analytics-page"
        - $ref: "#/components/parameters/analytics-limit"
        - $ref: "#/components/parameters/analytics-search"
        - $ref: "#/components/parameters/analytics-sortBy"
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-directoryId"
        - $ref: "#/components/parameters/analytics-ids"
      responses:
        "200":
          description: List of trends
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: Array of trends
                    items:
                      $ref: "#/components/schemas/analytics-ListAnalyticsItemCommon"
                  meta:
                    $ref: "#/components/schemas/analytics-meta"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Trends/operation/analytics2-trends-list
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/analytics/%7Bnamespace%7D/trends?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=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", "/analytics/%7Bnamespace%7D/trends?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=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/analytics/%7Bnamespace%7D/trends?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=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": "/analytics/%7Bnamespace%7D/trends?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=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/analytics/%7Bnamespace%7D/trends');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_INTEGER_VALUE',
              'limit' => 'SOME_INTEGER_VALUE',
              'search' => 'SOME_STRING_VALUE',
              'sortBy' => 'name:asc',
              'directoryId' => 'SOME_STRING_VALUE',
              'ids' => '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/analytics/%7Bnamespace%7D/trends?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - "Analytics: Trends"
      summary: Create a trend
      description: |
        Create a trend.

        ---

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

        **User role permission required:** `analytics_trends: create`
      operationId: analytics2-trend-create
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-TrendRequest"
      responses:
        "200":
          description: Trend created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-uuid"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Trends/operation/analytics2-trend-create
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/trends \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"trend":{"aggregateDataBy":{"type":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"trendDefinitions":[{"title":"string","description":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}],"tabIndex":0,"aggregationType":"EVENT","chartType":"COLUMN"}]}}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"trend\":{\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"trendDefinitions\":[{\"title\":\"string\",\"description\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}],\"tabIndex\":0,\"aggregationType\":\"EVENT\",\"chartType\":\"COLUMN\"}]}}}"

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

            conn.request("POST", "/analytics/%7Bnamespace%7D/trends", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "title": "string",
                "description": "string",
                "filter": {
                  "matching": true,
                  "expressions": [
                    {
                      "type": "FUNNEL",
                      "matching": true,
                      "funnel": {
                        "completedWithin": {
                          "period": "YEARS",
                          "value": 0
                        },
                        "dateFilter": {
                          "type": "ABSOLUTE",
                          "from": "2019-08-24T14:15:22Z",
                          "to": "2019-08-24T14:15:22Z",
                          "filter": {
                            "type": "DAILY",
                            "nestingType": "IN_PLACE",
                            "from": "string",
                            "to": "string",
                            "inverted": false
                          }
                        },
                        "exact": false,
                        "steps": [
                          {
                            "title": "string",
                            "action": {
                              "id": 0,
                              "name": "page.visit"
                            },
                            "expressions": [
                              {
                                "attribute": {
                                  "type": "PARAM",
                                  "param": "string",
                                  "id": 0
                                },
                                "constraint": {
                                  "type": "BOOL",
                                  "logic": "IS_TRUE"
                                }
                              }
                            ]
                          }
                        ],
                        "title": "string"
                      }
                    }
                  ],
                  "expression": {}
                },
                "trend": {
                  "aggregateDataBy": {
                    "type": "YEARS",
                    "value": 0
                  },
                  "dateFilter": {
                    "type": "ABSOLUTE",
                    "from": "2019-08-24T14:15:22Z",
                    "to": "2019-08-24T14:15:22Z",
                    "filter": {
                      "type": "DAILY",
                      "nestingType": "IN_PLACE",
                      "from": "string",
                      "to": "string",
                      "inverted": false
                    }
                  },
                  "trendDefinitions": [
                    {
                      "title": "string",
                      "description": "string",
                      "action": {
                        "id": 0,
                        "name": "page.visit"
                      },
                      "expressions": [
                        {
                          "attribute": {
                            "type": "PARAM",
                            "param": "string",
                            "id": 0
                          },
                          "constraint": {
                            "type": "BOOL",
                            "logic": "IS_TRUE"
                          }
                        }
                      ],
                      "tabIndex": 0,
                      "aggregationType": "EVENT",
                      "chartType": "COLUMN"
                    }
                  ]
                }
              }
            });

            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/analytics/%7Bnamespace%7D/trends");
            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": "/analytics/%7Bnamespace%7D/trends",
              "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({
              analysis: {
                title: 'string',
                description: 'string',
                filter: {
                  matching: true,
                  expressions: [
                    {
                      type: 'FUNNEL',
                      matching: true,
                      funnel: {
                        completedWithin: {period: 'YEARS', value: 0},
                        dateFilter: {
                          type: 'ABSOLUTE',
                          from: '2019-08-24T14:15:22Z',
                          to: '2019-08-24T14:15:22Z',
                          filter: {
                            type: 'DAILY',
                            nestingType: 'IN_PLACE',
                            from: 'string',
                            to: 'string',
                            inverted: false
                          }
                        },
                        exact: false,
                        steps: [
                          {
                            title: 'string',
                            action: {id: 0, name: 'page.visit'},
                            expressions: [
                              {
                                attribute: {type: 'PARAM', param: 'string', id: 0},
                                constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                              }
                            ]
                          }
                        ],
                        title: 'string'
                      }
                    }
                  ],
                  expression: {}
                },
                trend: {
                  aggregateDataBy: {type: 'YEARS', value: 0},
                  dateFilter: {
                    type: 'ABSOLUTE',
                    from: '2019-08-24T14:15:22Z',
                    to: '2019-08-24T14:15:22Z',
                    filter: {
                      type: 'DAILY',
                      nestingType: 'IN_PLACE',
                      from: 'string',
                      to: 'string',
                      inverted: false
                    }
                  },
                  trendDefinitions: [
                    {
                      title: 'string',
                      description: 'string',
                      action: {id: 0, name: 'page.visit'},
                      expressions: [
                        {
                          attribute: {type: 'PARAM', param: 'string', id: 0},
                          constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                        }
                      ],
                      tabIndex: 0,
                      aggregationType: 'EVENT',
                      chartType: 'COLUMN'
                    }
                  ]
                }
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/%7Bnamespace%7D/trends');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"analysis":{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"trend":{"aggregateDataBy":{"type":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"trendDefinitions":[{"title":"string","description":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}],"tabIndex":0,"aggregationType":"EVENT","chartType":"COLUMN"}]}}}');

            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/analytics/%7Bnamespace%7D/trends")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"trend\":{\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"trendDefinitions\":[{\"title\":\"string\",\"description\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}],\"tabIndex\":0,\"aggregationType\":\"EVENT\",\"chartType\":\"COLUMN\"}]}}}")
              .asString();
  /analytics/{namespace}/trends/{trendId}:
    get:
      tags:
        - "Analytics: Trends"
      summary: Get trend details
      description: |
        Retrieve the definition of a single trend

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_TRENDS_READ`, `ANALYTICS_BACKEND_TREND_READ`

        **User role permission required:** `analytics_trends: read`
      operationId: analytics2-trend-get
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-trendIdAsPathParam"
      responses:
        "200":
          description: Details of a trend
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-Trend"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Trends/operation/analytics2-trend-get
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/trends/%7BtrendId%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", "/analytics/%7Bnamespace%7D/trends/%7BtrendId%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/analytics/%7Bnamespace%7D/trends/%7BtrendId%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": "/analytics/%7Bnamespace%7D/trends/%7BtrendId%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/analytics/%7Bnamespace%7D/trends/%7BtrendId%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/analytics/%7Bnamespace%7D/trends/%7BtrendId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    put:
      tags:
        - "Analytics: Trends"
      summary: Update trend
      description: |
        Update an existing trend

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_TRENDS_UPDATE`, `ANALYTICS_BACKEND_TREND_UPDATE`

        **User role permission required:** `analytics_trends: update`
      operationId: analytics2-trend-update
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-trendIdAsPathParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-TrendRequest"
      responses:
        "200":
          description: Trend updated
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Trends/operation/analytics2-trend-update
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/trends/%7BtrendId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"trend":{"aggregateDataBy":{"type":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"trendDefinitions":[{"title":"string","description":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}],"tabIndex":0,"aggregationType":"EVENT","chartType":"COLUMN"}]}}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"trend\":{\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"trendDefinitions\":[{\"title\":\"string\",\"description\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}],\"tabIndex\":0,\"aggregationType\":\"EVENT\",\"chartType\":\"COLUMN\"}]}}}"

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

            conn.request("PUT", "/analytics/%7Bnamespace%7D/trends/%7BtrendId%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "title": "string",
                "description": "string",
                "filter": {
                  "matching": true,
                  "expressions": [
                    {
                      "type": "FUNNEL",
                      "matching": true,
                      "funnel": {
                        "completedWithin": {
                          "period": "YEARS",
                          "value": 0
                        },
                        "dateFilter": {
                          "type": "ABSOLUTE",
                          "from": "2019-08-24T14:15:22Z",
                          "to": "2019-08-24T14:15:22Z",
                          "filter": {
                            "type": "DAILY",
                            "nestingType": "IN_PLACE",
                            "from": "string",
                            "to": "string",
                            "inverted": false
                          }
                        },
                        "exact": false,
                        "steps": [
                          {
                            "title": "string",
                            "action": {
                              "id": 0,
                              "name": "page.visit"
                            },
                            "expressions": [
                              {
                                "attribute": {
                                  "type": "PARAM",
                                  "param": "string",
                                  "id": 0
                                },
                                "constraint": {
                                  "type": "BOOL",
                                  "logic": "IS_TRUE"
                                }
                              }
                            ]
                          }
                        ],
                        "title": "string"
                      }
                    }
                  ],
                  "expression": {}
                },
                "trend": {
                  "aggregateDataBy": {
                    "type": "YEARS",
                    "value": 0
                  },
                  "dateFilter": {
                    "type": "ABSOLUTE",
                    "from": "2019-08-24T14:15:22Z",
                    "to": "2019-08-24T14:15:22Z",
                    "filter": {
                      "type": "DAILY",
                      "nestingType": "IN_PLACE",
                      "from": "string",
                      "to": "string",
                      "inverted": false
                    }
                  },
                  "trendDefinitions": [
                    {
                      "title": "string",
                      "description": "string",
                      "action": {
                        "id": 0,
                        "name": "page.visit"
                      },
                      "expressions": [
                        {
                          "attribute": {
                            "type": "PARAM",
                            "param": "string",
                            "id": 0
                          },
                          "constraint": {
                            "type": "BOOL",
                            "logic": "IS_TRUE"
                          }
                        }
                      ],
                      "tabIndex": 0,
                      "aggregationType": "EVENT",
                      "chartType": "COLUMN"
                    }
                  ]
                }
              }
            });

            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/analytics/%7Bnamespace%7D/trends/%7BtrendId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/analytics/%7Bnamespace%7D/trends/%7BtrendId%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({
              analysis: {
                title: 'string',
                description: 'string',
                filter: {
                  matching: true,
                  expressions: [
                    {
                      type: 'FUNNEL',
                      matching: true,
                      funnel: {
                        completedWithin: {period: 'YEARS', value: 0},
                        dateFilter: {
                          type: 'ABSOLUTE',
                          from: '2019-08-24T14:15:22Z',
                          to: '2019-08-24T14:15:22Z',
                          filter: {
                            type: 'DAILY',
                            nestingType: 'IN_PLACE',
                            from: 'string',
                            to: 'string',
                            inverted: false
                          }
                        },
                        exact: false,
                        steps: [
                          {
                            title: 'string',
                            action: {id: 0, name: 'page.visit'},
                            expressions: [
                              {
                                attribute: {type: 'PARAM', param: 'string', id: 0},
                                constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                              }
                            ]
                          }
                        ],
                        title: 'string'
                      }
                    }
                  ],
                  expression: {}
                },
                trend: {
                  aggregateDataBy: {type: 'YEARS', value: 0},
                  dateFilter: {
                    type: 'ABSOLUTE',
                    from: '2019-08-24T14:15:22Z',
                    to: '2019-08-24T14:15:22Z',
                    filter: {
                      type: 'DAILY',
                      nestingType: 'IN_PLACE',
                      from: 'string',
                      to: 'string',
                      inverted: false
                    }
                  },
                  trendDefinitions: [
                    {
                      title: 'string',
                      description: 'string',
                      action: {id: 0, name: 'page.visit'},
                      expressions: [
                        {
                          attribute: {type: 'PARAM', param: 'string', id: 0},
                          constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                        }
                      ],
                      tabIndex: 0,
                      aggregationType: 'EVENT',
                      chartType: 'COLUMN'
                    }
                  ]
                }
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/%7Bnamespace%7D/trends/%7BtrendId%7D');
            $request->setMethod(HTTP_METH_PUT);

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

            $request->setBody('{"analysis":{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"trend":{"aggregateDataBy":{"type":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"trendDefinitions":[{"title":"string","description":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}],"tabIndex":0,"aggregationType":"EVENT","chartType":"COLUMN"}]}}}');

            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/analytics/%7Bnamespace%7D/trends/%7BtrendId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"trend\":{\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"trendDefinitions\":[{\"title\":\"string\",\"description\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}],\"tabIndex\":0,\"aggregationType\":\"EVENT\",\"chartType\":\"COLUMN\"}]}}}")
              .asString();
    delete:
      tags:
        - "Analytics: Trends"
      summary: Delete trend
      description: |
        Delete a trend.

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_TRENDS_DELETE`, `ANALYTICS_BACKEND_TREND_DELETE`

        **User role permission required:** `analytics_trends: delete`
      operationId: analytics2-trend-delete
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-trendIdAsPathParam"
      responses:
        "204":
          description: Trend deleted
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Trends/operation/analytics2-trend-delete
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/trends/%7BtrendId%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", "/analytics/%7Bnamespace%7D/trends/%7BtrendId%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/analytics/%7Bnamespace%7D/trends/%7BtrendId%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": "/analytics/%7Bnamespace%7D/trends/%7BtrendId%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/analytics/%7Bnamespace%7D/trends/%7BtrendId%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/analytics/%7Bnamespace%7D/trends/%7BtrendId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /analytics/analytics/v2/trends/{trendId}/recalculate/override:
    post:
      tags:
        - "Analytics: Trends"
      summary: Calculate trend with parameter override
      description: |
        Recalculate a trend with new parameters and/or variable (dynamic key) values.

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-calculate-trend-with-override
      parameters:
        - $ref: "#/components/parameters/analytics-trendIdAsPathParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-OverrideQueryRequest"
      responses:
        "200":
          description: Trend calculation result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-TrendCalculationResponse"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Trends/operation/analytics2-calculate-trend-with-override
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/analytics/v2/trends/%7BtrendId%7D/recalculate/override \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"aggregateDataBy":{"type":"YEARS","value":0},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"variables":[{"name":"string","value":"string"}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"variables\":[{\"name\":\"string\",\"value\":\"string\"}]}"

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

            conn.request("POST", "/analytics/analytics/v2/trends/%7BtrendId%7D/recalculate/override", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "dateFilter": {
                "type": "ABSOLUTE",
                "from": "2019-08-24T14:15:22Z",
                "to": "2019-08-24T14:15:22Z",
                "filter": {
                  "type": "DAILY",
                  "nestingType": "IN_PLACE",
                  "from": "string",
                  "to": "string",
                  "inverted": false
                }
              },
              "aggregateDataBy": {
                "type": "YEARS",
                "value": 0
              },
              "filter": {
                "matching": true,
                "expressions": [
                  {
                    "type": "FUNNEL",
                    "matching": true,
                    "funnel": {
                      "completedWithin": {
                        "period": "YEARS",
                        "value": 0
                      },
                      "dateFilter": {
                        "type": "ABSOLUTE",
                        "from": "2019-08-24T14:15:22Z",
                        "to": "2019-08-24T14:15:22Z",
                        "filter": {
                          "type": "DAILY",
                          "nestingType": "IN_PLACE",
                          "from": "string",
                          "to": "string",
                          "inverted": false
                        }
                      },
                      "exact": false,
                      "steps": [
                        {
                          "title": "string",
                          "action": {
                            "id": 0,
                            "name": "page.visit"
                          },
                          "expressions": [
                            {
                              "attribute": {
                                "type": "PARAM",
                                "param": "string",
                                "id": 0
                              },
                              "constraint": {
                                "type": "BOOL",
                                "logic": "IS_TRUE"
                              }
                            }
                          ]
                        }
                      ],
                      "title": "string"
                    }
                  }
                ],
                "expression": {}
              },
              "variables": [
                {
                  "name": "string",
                  "value": "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/analytics/analytics/v2/trends/%7BtrendId%7D/recalculate/override");
            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": "/analytics/analytics/v2/trends/%7BtrendId%7D/recalculate/override",
              "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({
              dateFilter: {
                type: 'ABSOLUTE',
                from: '2019-08-24T14:15:22Z',
                to: '2019-08-24T14:15:22Z',
                filter: {
                  type: 'DAILY',
                  nestingType: 'IN_PLACE',
                  from: 'string',
                  to: 'string',
                  inverted: false
                }
              },
              aggregateDataBy: {type: 'YEARS', value: 0},
              filter: {
                matching: true,
                expressions: [
                  {
                    type: 'FUNNEL',
                    matching: true,
                    funnel: {
                      completedWithin: {period: 'YEARS', value: 0},
                      dateFilter: {
                        type: 'ABSOLUTE',
                        from: '2019-08-24T14:15:22Z',
                        to: '2019-08-24T14:15:22Z',
                        filter: {
                          type: 'DAILY',
                          nestingType: 'IN_PLACE',
                          from: 'string',
                          to: 'string',
                          inverted: false
                        }
                      },
                      exact: false,
                      steps: [
                        {
                          title: 'string',
                          action: {id: 0, name: 'page.visit'},
                          expressions: [
                            {
                              attribute: {type: 'PARAM', param: 'string', id: 0},
                              constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                            }
                          ]
                        }
                      ],
                      title: 'string'
                    }
                  }
                ],
                expression: {}
              },
              variables: [{name: 'string', value: 'string'}]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/analytics/v2/trends/%7BtrendId%7D/recalculate/override');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"aggregateDataBy":{"type":"YEARS","value":0},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"variables":[{"name":"string","value":"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/analytics/analytics/v2/trends/%7BtrendId%7D/recalculate/override")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"variables\":[{\"name\":\"string\",\"value\":\"string\"}]}")
              .asString();
  /analytics/analytics/v2/trends/preview:
    post:
      tags:
        - "Analytics: Trends"
      summary: Preview trend calculation
      operationId: analytics2-preview-trend
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                analysis:
                  $ref: "#/components/schemas/analytics-TrendAnalysis"
              required:
                - analysis
      responses:
        "200":
          description: Calculation result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-TrendCalculationResponse"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Trends/operation/analytics2-preview-trend
      description: |
        

        ---

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

        **User role permission required:** `analytics: read`
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/analytics/v2/trends/preview \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"trend":{"aggregateDataBy":{"type":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"trendDefinitions":[{"title":"string","description":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}],"tabIndex":0,"aggregationType":"EVENT","chartType":"COLUMN"}]}}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"trend\":{\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"trendDefinitions\":[{\"title\":\"string\",\"description\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}],\"tabIndex\":0,\"aggregationType\":\"EVENT\",\"chartType\":\"COLUMN\"}]}}}"

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

            conn.request("POST", "/analytics/analytics/v2/trends/preview", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "title": "string",
                "description": "string",
                "filter": {
                  "matching": true,
                  "expressions": [
                    {
                      "type": "FUNNEL",
                      "matching": true,
                      "funnel": {
                        "completedWithin": {
                          "period": "YEARS",
                          "value": 0
                        },
                        "dateFilter": {
                          "type": "ABSOLUTE",
                          "from": "2019-08-24T14:15:22Z",
                          "to": "2019-08-24T14:15:22Z",
                          "filter": {
                            "type": "DAILY",
                            "nestingType": "IN_PLACE",
                            "from": "string",
                            "to": "string",
                            "inverted": false
                          }
                        },
                        "exact": false,
                        "steps": [
                          {
                            "title": "string",
                            "action": {
                              "id": 0,
                              "name": "page.visit"
                            },
                            "expressions": [
                              {
                                "attribute": {
                                  "type": "PARAM",
                                  "param": "string",
                                  "id": 0
                                },
                                "constraint": {
                                  "type": "BOOL",
                                  "logic": "IS_TRUE"
                                }
                              }
                            ]
                          }
                        ],
                        "title": "string"
                      }
                    }
                  ],
                  "expression": {}
                },
                "trend": {
                  "aggregateDataBy": {
                    "type": "YEARS",
                    "value": 0
                  },
                  "dateFilter": {
                    "type": "ABSOLUTE",
                    "from": "2019-08-24T14:15:22Z",
                    "to": "2019-08-24T14:15:22Z",
                    "filter": {
                      "type": "DAILY",
                      "nestingType": "IN_PLACE",
                      "from": "string",
                      "to": "string",
                      "inverted": false
                    }
                  },
                  "trendDefinitions": [
                    {
                      "title": "string",
                      "description": "string",
                      "action": {
                        "id": 0,
                        "name": "page.visit"
                      },
                      "expressions": [
                        {
                          "attribute": {
                            "type": "PARAM",
                            "param": "string",
                            "id": 0
                          },
                          "constraint": {
                            "type": "BOOL",
                            "logic": "IS_TRUE"
                          }
                        }
                      ],
                      "tabIndex": 0,
                      "aggregationType": "EVENT",
                      "chartType": "COLUMN"
                    }
                  ]
                }
              }
            });

            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/analytics/analytics/v2/trends/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": "/analytics/analytics/v2/trends/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({
              analysis: {
                title: 'string',
                description: 'string',
                filter: {
                  matching: true,
                  expressions: [
                    {
                      type: 'FUNNEL',
                      matching: true,
                      funnel: {
                        completedWithin: {period: 'YEARS', value: 0},
                        dateFilter: {
                          type: 'ABSOLUTE',
                          from: '2019-08-24T14:15:22Z',
                          to: '2019-08-24T14:15:22Z',
                          filter: {
                            type: 'DAILY',
                            nestingType: 'IN_PLACE',
                            from: 'string',
                            to: 'string',
                            inverted: false
                          }
                        },
                        exact: false,
                        steps: [
                          {
                            title: 'string',
                            action: {id: 0, name: 'page.visit'},
                            expressions: [
                              {
                                attribute: {type: 'PARAM', param: 'string', id: 0},
                                constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                              }
                            ]
                          }
                        ],
                        title: 'string'
                      }
                    }
                  ],
                  expression: {}
                },
                trend: {
                  aggregateDataBy: {type: 'YEARS', value: 0},
                  dateFilter: {
                    type: 'ABSOLUTE',
                    from: '2019-08-24T14:15:22Z',
                    to: '2019-08-24T14:15:22Z',
                    filter: {
                      type: 'DAILY',
                      nestingType: 'IN_PLACE',
                      from: 'string',
                      to: 'string',
                      inverted: false
                    }
                  },
                  trendDefinitions: [
                    {
                      title: 'string',
                      description: 'string',
                      action: {id: 0, name: 'page.visit'},
                      expressions: [
                        {
                          attribute: {type: 'PARAM', param: 'string', id: 0},
                          constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                        }
                      ],
                      tabIndex: 0,
                      aggregationType: 'EVENT',
                      chartType: 'COLUMN'
                    }
                  ]
                }
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"analysis":{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"trend":{"aggregateDataBy":{"type":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"trendDefinitions":[{"title":"string","description":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}],"tabIndex":0,"aggregationType":"EVENT","chartType":"COLUMN"}]}}}');

            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/analytics/analytics/v2/trends/preview")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"trend\":{\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"trendDefinitions\":[{\"title\":\"string\",\"description\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}],\"tabIndex\":0,\"aggregationType\":\"EVENT\",\"chartType\":\"COLUMN\"}]}}}")
              .asString();
  /analytics/{namespace}/sankeys:
    get:
      tags:
        - "Analytics: Sankeys"
      summary: List Sankeys
      description: |
        Returns a paginated list of Sankey analyses.

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-sankeys-list
      parameters:
        - $ref: "#/components/parameters/analytics-page"
        - $ref: "#/components/parameters/analytics-limit"
        - $ref: "#/components/parameters/analytics-search"
        - $ref: "#/components/parameters/analytics-sortBy"
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-directoryId"
        - $ref: "#/components/parameters/analytics-ids"
      responses:
        "200":
          description: List of sankeys
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: List of sankeys
                    items:
                      $ref: "#/components/schemas/analytics-ListAnalyticsItemCommon"
                  meta:
                    $ref: "#/components/schemas/analytics-meta"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Sankeys/operation/analytics2-sankeys-list
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/analytics/%7Bnamespace%7D/sankeys?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=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", "/analytics/%7Bnamespace%7D/sankeys?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=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/analytics/%7Bnamespace%7D/sankeys?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=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": "/analytics/%7Bnamespace%7D/sankeys?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=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/analytics/%7Bnamespace%7D/sankeys');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_INTEGER_VALUE',
              'limit' => 'SOME_INTEGER_VALUE',
              'search' => 'SOME_STRING_VALUE',
              'sortBy' => 'name:asc',
              'directoryId' => 'SOME_STRING_VALUE',
              'ids' => '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/analytics/%7Bnamespace%7D/sankeys?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - "Analytics: Sankeys"
      summary: Create Sankey analysis
      description: |
        Create sankey analysis

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_SANKEYS_CREATE`, `ANALYTICS_BACKEND_SANKEY_CREATE`

        **User role permission required:** `analytics: create`
      operationId: analytics2-sankeys-create
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-SankeyRequest"
      responses:
        "200":
          description: ID of the created analysis
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-uuid"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Sankeys/operation/analytics2-sankeys-create
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/sankeys \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"title":"string","description":"string","sourceEvent":{"action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]},"reverseOrder":true,"numberOfSteps":0,"numberOfPaths":0,"drillDown":[{"eventName":"page.visit","attribute":{"type":"PARAM","param":"string","id":0},"layer":0}],"drillDownCount":null,"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"eventFilters":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"excludeEvents":true,"firstOccurrenceOnly":true}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"sourceEvent\":{\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]},\"reverseOrder\":true,\"numberOfSteps\":0,\"numberOfPaths\":0,\"drillDown\":[{\"eventName\":\"page.visit\",\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"layer\":0}],\"drillDownCount\":null,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"eventFilters\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"excludeEvents\":true,\"firstOccurrenceOnly\":true}}"

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

            conn.request("POST", "/analytics/%7Bnamespace%7D/sankeys", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "title": "string",
                "description": "string",
                "sourceEvent": {
                  "action": {
                    "id": 0,
                    "name": "page.visit"
                  },
                  "expressions": [
                    {
                      "attribute": {
                        "type": "PARAM",
                        "param": "string",
                        "id": 0
                      },
                      "constraint": {
                        "type": "BOOL",
                        "logic": "IS_TRUE"
                      }
                    }
                  ]
                },
                "reverseOrder": true,
                "numberOfSteps": 0,
                "numberOfPaths": 0,
                "drillDown": [
                  {
                    "eventName": "page.visit",
                    "attribute": {
                      "type": "PARAM",
                      "param": "string",
                      "id": 0
                    },
                    "layer": 0
                  }
                ],
                "drillDownCount": null,
                "dateFilter": {
                  "type": "ABSOLUTE",
                  "from": "2019-08-24T14:15:22Z",
                  "to": "2019-08-24T14:15:22Z",
                  "filter": {
                    "type": "DAILY",
                    "nestingType": "IN_PLACE",
                    "from": "string",
                    "to": "string",
                    "inverted": false
                  }
                },
                "filter": {
                  "matching": true,
                  "expressions": [
                    {
                      "type": "FUNNEL",
                      "matching": true,
                      "funnel": {
                        "completedWithin": {
                          "period": "YEARS",
                          "value": 0
                        },
                        "dateFilter": {
                          "type": "ABSOLUTE",
                          "from": "2019-08-24T14:15:22Z",
                          "to": "2019-08-24T14:15:22Z",
                          "filter": {
                            "type": "DAILY",
                            "nestingType": "IN_PLACE",
                            "from": "string",
                            "to": "string",
                            "inverted": false
                          }
                        },
                        "exact": false,
                        "steps": [
                          {
                            "title": "string",
                            "action": {
                              "id": 0,
                              "name": "page.visit"
                            },
                            "expressions": [
                              {
                                "attribute": {
                                  "type": "PARAM",
                                  "param": "string",
                                  "id": 0
                                },
                                "constraint": {
                                  "type": "BOOL",
                                  "logic": "IS_TRUE"
                                }
                              }
                            ]
                          }
                        ],
                        "title": "string"
                      }
                    }
                  ],
                  "expression": {}
                },
                "eventFilters": [
                  {
                    "title": "string",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "expressions": [
                      {
                        "attribute": {
                          "type": "PARAM",
                          "param": "string",
                          "id": 0
                        },
                        "constraint": {
                          "type": "BOOL",
                          "logic": "IS_TRUE"
                        }
                      }
                    ]
                  }
                ],
                "excludeEvents": true,
                "firstOccurrenceOnly": 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/analytics/%7Bnamespace%7D/sankeys");
            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": "/analytics/%7Bnamespace%7D/sankeys",
              "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({
              analysis: {
                title: 'string',
                description: 'string',
                sourceEvent: {
                  action: {id: 0, name: 'page.visit'},
                  expressions: [
                    {
                      attribute: {type: 'PARAM', param: 'string', id: 0},
                      constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                    }
                  ]
                },
                reverseOrder: true,
                numberOfSteps: 0,
                numberOfPaths: 0,
                drillDown: [
                  {
                    eventName: 'page.visit',
                    attribute: {type: 'PARAM', param: 'string', id: 0},
                    layer: 0
                  }
                ],
                drillDownCount: null,
                dateFilter: {
                  type: 'ABSOLUTE',
                  from: '2019-08-24T14:15:22Z',
                  to: '2019-08-24T14:15:22Z',
                  filter: {
                    type: 'DAILY',
                    nestingType: 'IN_PLACE',
                    from: 'string',
                    to: 'string',
                    inverted: false
                  }
                },
                filter: {
                  matching: true,
                  expressions: [
                    {
                      type: 'FUNNEL',
                      matching: true,
                      funnel: {
                        completedWithin: {period: 'YEARS', value: 0},
                        dateFilter: {
                          type: 'ABSOLUTE',
                          from: '2019-08-24T14:15:22Z',
                          to: '2019-08-24T14:15:22Z',
                          filter: {
                            type: 'DAILY',
                            nestingType: 'IN_PLACE',
                            from: 'string',
                            to: 'string',
                            inverted: false
                          }
                        },
                        exact: false,
                        steps: [
                          {
                            title: 'string',
                            action: {id: 0, name: 'page.visit'},
                            expressions: [
                              {
                                attribute: {type: 'PARAM', param: 'string', id: 0},
                                constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                              }
                            ]
                          }
                        ],
                        title: 'string'
                      }
                    }
                  ],
                  expression: {}
                },
                eventFilters: [
                  {
                    title: 'string',
                    action: {id: 0, name: 'page.visit'},
                    expressions: [
                      {
                        attribute: {type: 'PARAM', param: 'string', id: 0},
                        constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                      }
                    ]
                  }
                ],
                excludeEvents: true,
                firstOccurrenceOnly: true
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/%7Bnamespace%7D/sankeys');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"analysis":{"title":"string","description":"string","sourceEvent":{"action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]},"reverseOrder":true,"numberOfSteps":0,"numberOfPaths":0,"drillDown":[{"eventName":"page.visit","attribute":{"type":"PARAM","param":"string","id":0},"layer":0}],"drillDownCount":null,"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"eventFilters":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"excludeEvents":true,"firstOccurrenceOnly":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/analytics/%7Bnamespace%7D/sankeys")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"sourceEvent\":{\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]},\"reverseOrder\":true,\"numberOfSteps\":0,\"numberOfPaths\":0,\"drillDown\":[{\"eventName\":\"page.visit\",\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"layer\":0}],\"drillDownCount\":null,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"eventFilters\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"excludeEvents\":true,\"firstOccurrenceOnly\":true}}")
              .asString();
  /analytics/{namespace}/sankeys/{sankeyId}:
    get:
      tags:
        - "Analytics: Sankeys"
      summary: Get Sankey details
      description: |
        Retrieve the details of a Sankey analysis

        ---

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

        **User role permission required:** `analytics: read`
      operationId: analytics2-sankeys-get
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-sankeyIdAsPathParam"
      responses:
        "200":
          description: Sankey analysis details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-Sankey"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Sankeys/operation/analytics2-sankeys-get
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/sankeys/%7BsankeyId%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", "/analytics/%7Bnamespace%7D/sankeys/%7BsankeyId%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/analytics/%7Bnamespace%7D/sankeys/%7BsankeyId%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": "/analytics/%7Bnamespace%7D/sankeys/%7BsankeyId%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/analytics/%7Bnamespace%7D/sankeys/%7BsankeyId%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/analytics/%7Bnamespace%7D/sankeys/%7BsankeyId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    put:
      tags:
        - "Analytics: Sankeys"
      summary: Update Sankey
      description: |
        Update an existing Sankey analysis

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_SANKEYS_UPDATE`, `ANALYTICS_BACKEND_SANKEY_UPDATE`

        **User role permission required:** `analytics: update`
      operationId: analytics2-sankeys-update
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-sankeyIdAsPathParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-SankeyRequest"
      responses:
        "200":
          description: Analysis updated
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Sankeys/operation/analytics2-sankeys-update
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/sankeys/%7BsankeyId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"title":"string","description":"string","sourceEvent":{"action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]},"reverseOrder":true,"numberOfSteps":0,"numberOfPaths":0,"drillDown":[{"eventName":"page.visit","attribute":{"type":"PARAM","param":"string","id":0},"layer":0}],"drillDownCount":null,"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"eventFilters":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"excludeEvents":true,"firstOccurrenceOnly":true}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"sourceEvent\":{\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]},\"reverseOrder\":true,\"numberOfSteps\":0,\"numberOfPaths\":0,\"drillDown\":[{\"eventName\":\"page.visit\",\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"layer\":0}],\"drillDownCount\":null,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"eventFilters\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"excludeEvents\":true,\"firstOccurrenceOnly\":true}}"

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

            conn.request("PUT", "/analytics/%7Bnamespace%7D/sankeys/%7BsankeyId%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "title": "string",
                "description": "string",
                "sourceEvent": {
                  "action": {
                    "id": 0,
                    "name": "page.visit"
                  },
                  "expressions": [
                    {
                      "attribute": {
                        "type": "PARAM",
                        "param": "string",
                        "id": 0
                      },
                      "constraint": {
                        "type": "BOOL",
                        "logic": "IS_TRUE"
                      }
                    }
                  ]
                },
                "reverseOrder": true,
                "numberOfSteps": 0,
                "numberOfPaths": 0,
                "drillDown": [
                  {
                    "eventName": "page.visit",
                    "attribute": {
                      "type": "PARAM",
                      "param": "string",
                      "id": 0
                    },
                    "layer": 0
                  }
                ],
                "drillDownCount": null,
                "dateFilter": {
                  "type": "ABSOLUTE",
                  "from": "2019-08-24T14:15:22Z",
                  "to": "2019-08-24T14:15:22Z",
                  "filter": {
                    "type": "DAILY",
                    "nestingType": "IN_PLACE",
                    "from": "string",
                    "to": "string",
                    "inverted": false
                  }
                },
                "filter": {
                  "matching": true,
                  "expressions": [
                    {
                      "type": "FUNNEL",
                      "matching": true,
                      "funnel": {
                        "completedWithin": {
                          "period": "YEARS",
                          "value": 0
                        },
                        "dateFilter": {
                          "type": "ABSOLUTE",
                          "from": "2019-08-24T14:15:22Z",
                          "to": "2019-08-24T14:15:22Z",
                          "filter": {
                            "type": "DAILY",
                            "nestingType": "IN_PLACE",
                            "from": "string",
                            "to": "string",
                            "inverted": false
                          }
                        },
                        "exact": false,
                        "steps": [
                          {
                            "title": "string",
                            "action": {
                              "id": 0,
                              "name": "page.visit"
                            },
                            "expressions": [
                              {
                                "attribute": {
                                  "type": "PARAM",
                                  "param": "string",
                                  "id": 0
                                },
                                "constraint": {
                                  "type": "BOOL",
                                  "logic": "IS_TRUE"
                                }
                              }
                            ]
                          }
                        ],
                        "title": "string"
                      }
                    }
                  ],
                  "expression": {}
                },
                "eventFilters": [
                  {
                    "title": "string",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "expressions": [
                      {
                        "attribute": {
                          "type": "PARAM",
                          "param": "string",
                          "id": 0
                        },
                        "constraint": {
                          "type": "BOOL",
                          "logic": "IS_TRUE"
                        }
                      }
                    ]
                  }
                ],
                "excludeEvents": true,
                "firstOccurrenceOnly": true
              }
            });

            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/analytics/%7Bnamespace%7D/sankeys/%7BsankeyId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/analytics/%7Bnamespace%7D/sankeys/%7BsankeyId%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({
              analysis: {
                title: 'string',
                description: 'string',
                sourceEvent: {
                  action: {id: 0, name: 'page.visit'},
                  expressions: [
                    {
                      attribute: {type: 'PARAM', param: 'string', id: 0},
                      constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                    }
                  ]
                },
                reverseOrder: true,
                numberOfSteps: 0,
                numberOfPaths: 0,
                drillDown: [
                  {
                    eventName: 'page.visit',
                    attribute: {type: 'PARAM', param: 'string', id: 0},
                    layer: 0
                  }
                ],
                drillDownCount: null,
                dateFilter: {
                  type: 'ABSOLUTE',
                  from: '2019-08-24T14:15:22Z',
                  to: '2019-08-24T14:15:22Z',
                  filter: {
                    type: 'DAILY',
                    nestingType: 'IN_PLACE',
                    from: 'string',
                    to: 'string',
                    inverted: false
                  }
                },
                filter: {
                  matching: true,
                  expressions: [
                    {
                      type: 'FUNNEL',
                      matching: true,
                      funnel: {
                        completedWithin: {period: 'YEARS', value: 0},
                        dateFilter: {
                          type: 'ABSOLUTE',
                          from: '2019-08-24T14:15:22Z',
                          to: '2019-08-24T14:15:22Z',
                          filter: {
                            type: 'DAILY',
                            nestingType: 'IN_PLACE',
                            from: 'string',
                            to: 'string',
                            inverted: false
                          }
                        },
                        exact: false,
                        steps: [
                          {
                            title: 'string',
                            action: {id: 0, name: 'page.visit'},
                            expressions: [
                              {
                                attribute: {type: 'PARAM', param: 'string', id: 0},
                                constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                              }
                            ]
                          }
                        ],
                        title: 'string'
                      }
                    }
                  ],
                  expression: {}
                },
                eventFilters: [
                  {
                    title: 'string',
                    action: {id: 0, name: 'page.visit'},
                    expressions: [
                      {
                        attribute: {type: 'PARAM', param: 'string', id: 0},
                        constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                      }
                    ]
                  }
                ],
                excludeEvents: true,
                firstOccurrenceOnly: true
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/%7Bnamespace%7D/sankeys/%7BsankeyId%7D');
            $request->setMethod(HTTP_METH_PUT);

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

            $request->setBody('{"analysis":{"title":"string","description":"string","sourceEvent":{"action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]},"reverseOrder":true,"numberOfSteps":0,"numberOfPaths":0,"drillDown":[{"eventName":"page.visit","attribute":{"type":"PARAM","param":"string","id":0},"layer":0}],"drillDownCount":null,"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"eventFilters":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"excludeEvents":true,"firstOccurrenceOnly":true}}');

            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/analytics/%7Bnamespace%7D/sankeys/%7BsankeyId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"sourceEvent\":{\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]},\"reverseOrder\":true,\"numberOfSteps\":0,\"numberOfPaths\":0,\"drillDown\":[{\"eventName\":\"page.visit\",\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"layer\":0}],\"drillDownCount\":null,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"exact\":false,\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"title\":\"string\"}}],\"expression\":{}},\"eventFilters\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]}],\"excludeEvents\":true,\"firstOccurrenceOnly\":true}}")
              .asString();
    delete:
      tags:
        - "Analytics: Sankeys"
      summary: Delete Sankey
      description: |
        Delete a Sankey analysis

        ---

        **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 permissions required (at least one):** `ANALYTICS_BACKEND_SANKEYS_DELETE`, `ANALYTICS_BACKEND_SANKEY_DELETE`

        **User role permission required:** `analytics: delete`
      operationId: analytics2-sankeys-delete
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-sankeyIdAsPathParam"
      responses:
        "204":
          description: Deleted sankeys analysis
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/Analytics:-Sankeys/operation/analytics2-sankeys-delete
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/sankeys/%7BsankeyId%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", "/analytics/%7Bnamespace%7D/sankeys/%7BsankeyId%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/analytics/%7Bnamespace%7D/sankeys/%7BsankeyId%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": "/analytics/%7Bnamespace%7D/sankeys/%7BsankeyId%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/analytics/%7Bnamespace%7D/sankeys/%7BsankeyId%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/analytics/%7Bnamespace%7D/sankeys/%7BsankeyId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/transactions:
    post:
      summary: Create a transaction
      description: |
        Create a transaction record in the database.

        For each transaction, a `transaction.charge` event is generated automatically. In addition, each item in the `products` array produces a `product.buy` event.

        All monetary values must use the same currency and be greater
        than or equal to zero. `discountAmount` must be greater than zero
        or omitted.


        ---

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

        **API key permission required:** `API_TRANSACTION_CREATE`
      operationId: CreateATransaction
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-CreateatransactionRequest-apiv4"
        required: true
      responses:
        "202":
          description: Accepted
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                timestamp: 2020-10-28T12:14:45.364+00:00
                status: 400
                error: Bad Request
                message: |-
                  JSON parse error: Missing property: 'currency'; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Missing property: 'currency'
                   at [Source: (PushbackInputStream); line: 13, column: 14] (through reference chain: com.synerise.api.endpoint.transactions.domain.model.IdentifiedTransactionData["products"]->java.util.ArrayList[0]->com.synerise.api.endpoint.transactions.domain.model.ProductData["finalUnitPrice"])
                path: /transactions
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          $ref: "#/components/responses/api-service-404-pii"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/CreateATransaction
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/transactions \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"discountAmount":{"amount":0,"currency":"USD"},"metadata":{"promotionCode":"string","quantityToRedeem":0},"orderId":"be466362-71e9-4bdd-ad11-bfacead5276b","paymentInfo":{"method":"CASH"},"products":[{"finalUnitPrice":{"amount":3.25,"currency":"USD"},"name":"Soft drink","sku":"189784563455","categories":["string"],"image":"string","url":"string","netUnitPrice":{"amount":3.25,"currency":"USD"},"tax":0.1,"quantity":2.5,"regularPrice":{"amount":3.25,"currency":"USD"},"discountPrice":{"amount":15.5,"currency":"USD"},"discountPercent":0.1,"property1":null,"property2":null}],"recordedAt":"2019-02-07T09:53:56.999+00:00","revenue":{"amount":64.25,"currency":"USD"},"value":{"amount":112.25,"currency":"USD"},"source":"MOBILE","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"discountAmount\":{\"amount\":0,\"currency\":\"USD\"},\"metadata\":{\"promotionCode\":\"string\",\"quantityToRedeem\":0},\"orderId\":\"be466362-71e9-4bdd-ad11-bfacead5276b\",\"paymentInfo\":{\"method\":\"CASH\"},\"products\":[{\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"name\":\"Soft drink\",\"sku\":\"189784563455\",\"categories\":[\"string\"],\"image\":\"string\",\"url\":\"string\",\"netUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"tax\":0.1,\"quantity\":2.5,\"regularPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"discountPrice\":{\"amount\":15.5,\"currency\":\"USD\"},\"discountPercent\":0.1,\"property1\":null,\"property2\":null}],\"recordedAt\":\"2019-02-07T09:53:56.999+00:00\",\"revenue\":{\"amount\":64.25,\"currency\":\"USD\"},\"value\":{\"amount\":112.25,\"currency\":\"USD\"},\"source\":\"MOBILE\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\"}"

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

            conn.request("POST", "/v4/transactions", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "discountAmount": {
                "amount": 0,
                "currency": "USD"
              },
              "metadata": {
                "promotionCode": "string",
                "quantityToRedeem": 0
              },
              "orderId": "be466362-71e9-4bdd-ad11-bfacead5276b",
              "paymentInfo": {
                "method": "CASH"
              },
              "products": [
                {
                  "finalUnitPrice": {
                    "amount": 3.25,
                    "currency": "USD"
                  },
                  "name": "Soft drink",
                  "sku": "189784563455",
                  "categories": [
                    "string"
                  ],
                  "image": "string",
                  "url": "string",
                  "netUnitPrice": {
                    "amount": 3.25,
                    "currency": "USD"
                  },
                  "tax": 0.1,
                  "quantity": 2.5,
                  "regularPrice": {
                    "amount": 3.25,
                    "currency": "USD"
                  },
                  "discountPrice": {
                    "amount": 15.5,
                    "currency": "USD"
                  },
                  "discountPercent": 0.1,
                  "property1": null,
                  "property2": null
                }
              ],
              "recordedAt": "2019-02-07T09:53:56.999+00:00",
              "revenue": {
                "amount": 64.25,
                "currency": "USD"
              },
              "value": {
                "amount": 112.25,
                "currency": "USD"
              },
              "source": "MOBILE",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00"
            });

            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/v4/transactions");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/transactions",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              discountAmount: {amount: 0, currency: 'USD'},
              metadata: {promotionCode: 'string', quantityToRedeem: 0},
              orderId: 'be466362-71e9-4bdd-ad11-bfacead5276b',
              paymentInfo: {method: 'CASH'},
              products: [
                {
                  finalUnitPrice: {amount: 3.25, currency: 'USD'},
                  name: 'Soft drink',
                  sku: '189784563455',
                  categories: ['string'],
                  image: 'string',
                  url: 'string',
                  netUnitPrice: {amount: 3.25, currency: 'USD'},
                  tax: 0.1,
                  quantity: 2.5,
                  regularPrice: {amount: 3.25, currency: 'USD'},
                  discountPrice: {amount: 15.5, currency: 'USD'},
                  discountPercent: 0.1,
                  property1: null,
                  property2: null
                }
              ],
              recordedAt: '2019-02-07T09:53:56.999+00:00',
              revenue: {amount: 64.25, currency: 'USD'},
              value: {amount: 112.25, currency: 'USD'},
              source: 'MOBILE',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"discountAmount":{"amount":0,"currency":"USD"},"metadata":{"promotionCode":"string","quantityToRedeem":0},"orderId":"be466362-71e9-4bdd-ad11-bfacead5276b","paymentInfo":{"method":"CASH"},"products":[{"finalUnitPrice":{"amount":3.25,"currency":"USD"},"name":"Soft drink","sku":"189784563455","categories":["string"],"image":"string","url":"string","netUnitPrice":{"amount":3.25,"currency":"USD"},"tax":0.1,"quantity":2.5,"regularPrice":{"amount":3.25,"currency":"USD"},"discountPrice":{"amount":15.5,"currency":"USD"},"discountPercent":0.1,"property1":null,"property2":null}],"recordedAt":"2019-02-07T09:53:56.999+00:00","revenue":{"amount":64.25,"currency":"USD"},"value":{"amount":112.25,"currency":"USD"},"source":"MOBILE","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00"}');

            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/v4/transactions")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"discountAmount\":{\"amount\":0,\"currency\":\"USD\"},\"metadata\":{\"promotionCode\":\"string\",\"quantityToRedeem\":0},\"orderId\":\"be466362-71e9-4bdd-ad11-bfacead5276b\",\"paymentInfo\":{\"method\":\"CASH\"},\"products\":[{\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"name\":\"Soft drink\",\"sku\":\"189784563455\",\"categories\":[\"string\"],\"image\":\"string\",\"url\":\"string\",\"netUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"tax\":0.1,\"quantity\":2.5,\"regularPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"discountPrice\":{\"amount\":15.5,\"currency\":\"USD\"},\"discountPercent\":0.1,\"property1\":null,\"property2\":null}],\"recordedAt\":\"2019-02-07T09:53:56.999+00:00\",\"revenue\":{\"amount\":64.25,\"currency\":\"USD\"},\"value\":{\"amount\":112.25,\"currency\":\"USD\"},\"source\":\"MOBILE\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\"}")
              .asString();
  /v4/transactions/batch:
    post:
      summary: Batch add or update transactions
      description: |
        Enqueue a number of add/update operations in the Synerise
        application database. 

        For each transaction, a `transaction.charge` event is generated automatically. In addition, each item in the `products` array produces a `product.buy` event.

        If you don't have some information about a transaction, don't insert a null-value parameter - omit the parameter entirely. Sending a null value <strong>deletes an attribute</strong> (if it's a custom attribute) or <strong>sets it to null/default value</strong> (if the attribute is Synerise-native).



        The body contains an array of objects to update. The objects are
        the same as in the *Update transaction* and *Create transaction*
        endpoints.



        All monetary values must use the same currency and be greater
        than or equal to zero. `discountAmount` must be greater than zero
        or omitted.


        ---

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

        **API key permission required:** `API_BATCH_TRANSACTION_CREATE`
      operationId: BatchAddOrUpdateTransactions
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: An array of transactions to post or update
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/api-service-CreateatransactionRequest-apiv4"
              description: ""
        required: true
      responses:
        "202":
          description: Accepted
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                error: Bad Request
                status: 400
                timestamp: 2020-10-28T12:24:24.444Z
                path: /transactions
                message: Some fields did not pass validation
                errors:
                  - code: 14191
                    field: client
                    message: Client cannot have null value
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/BatchAddOrUpdateTransactions
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/transactions/batch \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '[{"client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"discountAmount":{"amount":0,"currency":"USD"},"metadata":{"promotionCode":"string","quantityToRedeem":0},"orderId":"be466362-71e9-4bdd-ad11-bfacead5276b","paymentInfo":{"method":"CASH"},"products":[{"finalUnitPrice":{"amount":3.25,"currency":"USD"},"name":"Soft drink","sku":"189784563455","categories":["string"],"image":"string","url":"string","netUnitPrice":{"amount":3.25,"currency":"USD"},"tax":0.1,"quantity":2.5,"regularPrice":{"amount":3.25,"currency":"USD"},"discountPrice":{"amount":15.5,"currency":"USD"},"discountPercent":0.1,"property1":null,"property2":null}],"recordedAt":"2019-02-07T09:53:56.999+00:00","revenue":{"amount":64.25,"currency":"USD"},"value":{"amount":112.25,"currency":"USD"},"source":"MOBILE","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00"}]'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "[{\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"discountAmount\":{\"amount\":0,\"currency\":\"USD\"},\"metadata\":{\"promotionCode\":\"string\",\"quantityToRedeem\":0},\"orderId\":\"be466362-71e9-4bdd-ad11-bfacead5276b\",\"paymentInfo\":{\"method\":\"CASH\"},\"products\":[{\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"name\":\"Soft drink\",\"sku\":\"189784563455\",\"categories\":[\"string\"],\"image\":\"string\",\"url\":\"string\",\"netUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"tax\":0.1,\"quantity\":2.5,\"regularPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"discountPrice\":{\"amount\":15.5,\"currency\":\"USD\"},\"discountPercent\":0.1,\"property1\":null,\"property2\":null}],\"recordedAt\":\"2019-02-07T09:53:56.999+00:00\",\"revenue\":{\"amount\":64.25,\"currency\":\"USD\"},\"value\":{\"amount\":112.25,\"currency\":\"USD\"},\"source\":\"MOBILE\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\"}]"

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

            conn.request("POST", "/v4/transactions/batch", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              {
                "client": {
                  "customId": "string",
                  "id": 433230297,
                  "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                  "email": "string"
                },
                "discountAmount": {
                  "amount": 0,
                  "currency": "USD"
                },
                "metadata": {
                  "promotionCode": "string",
                  "quantityToRedeem": 0
                },
                "orderId": "be466362-71e9-4bdd-ad11-bfacead5276b",
                "paymentInfo": {
                  "method": "CASH"
                },
                "products": [
                  {
                    "finalUnitPrice": {
                      "amount": 3.25,
                      "currency": "USD"
                    },
                    "name": "Soft drink",
                    "sku": "189784563455",
                    "categories": [
                      "string"
                    ],
                    "image": "string",
                    "url": "string",
                    "netUnitPrice": {
                      "amount": 3.25,
                      "currency": "USD"
                    },
                    "tax": 0.1,
                    "quantity": 2.5,
                    "regularPrice": {
                      "amount": 3.25,
                      "currency": "USD"
                    },
                    "discountPrice": {
                      "amount": 15.5,
                      "currency": "USD"
                    },
                    "discountPercent": 0.1,
                    "property1": null,
                    "property2": null
                  }
                ],
                "recordedAt": "2019-02-07T09:53:56.999+00:00",
                "revenue": {
                  "amount": 64.25,
                  "currency": "USD"
                },
                "value": {
                  "amount": 112.25,
                  "currency": "USD"
                },
                "source": "MOBILE",
                "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00"
              }
            ]);

            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/v4/transactions/batch");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/transactions/batch",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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([
              {
                client: {
                  customId: 'string',
                  id: 433230297,
                  uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                  email: 'string'
                },
                discountAmount: {amount: 0, currency: 'USD'},
                metadata: {promotionCode: 'string', quantityToRedeem: 0},
                orderId: 'be466362-71e9-4bdd-ad11-bfacead5276b',
                paymentInfo: {method: 'CASH'},
                products: [
                  {
                    finalUnitPrice: {amount: 3.25, currency: 'USD'},
                    name: 'Soft drink',
                    sku: '189784563455',
                    categories: ['string'],
                    image: 'string',
                    url: 'string',
                    netUnitPrice: {amount: 3.25, currency: 'USD'},
                    tax: 0.1,
                    quantity: 2.5,
                    regularPrice: {amount: 3.25, currency: 'USD'},
                    discountPrice: {amount: 15.5, currency: 'USD'},
                    discountPercent: 0.1,
                    property1: null,
                    property2: null
                  }
                ],
                recordedAt: '2019-02-07T09:53:56.999+00:00',
                revenue: {amount: 64.25, currency: 'USD'},
                value: {amount: 112.25, currency: 'USD'},
                source: 'MOBILE',
                eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00'
              }
            ]));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('[{"client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"discountAmount":{"amount":0,"currency":"USD"},"metadata":{"promotionCode":"string","quantityToRedeem":0},"orderId":"be466362-71e9-4bdd-ad11-bfacead5276b","paymentInfo":{"method":"CASH"},"products":[{"finalUnitPrice":{"amount":3.25,"currency":"USD"},"name":"Soft drink","sku":"189784563455","categories":["string"],"image":"string","url":"string","netUnitPrice":{"amount":3.25,"currency":"USD"},"tax":0.1,"quantity":2.5,"regularPrice":{"amount":3.25,"currency":"USD"},"discountPrice":{"amount":15.5,"currency":"USD"},"discountPercent":0.1,"property1":null,"property2":null}],"recordedAt":"2019-02-07T09:53:56.999+00:00","revenue":{"amount":64.25,"currency":"USD"},"value":{"amount":112.25,"currency":"USD"},"source":"MOBILE","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00"}]');

            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/v4/transactions/batch")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[{\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"discountAmount\":{\"amount\":0,\"currency\":\"USD\"},\"metadata\":{\"promotionCode\":\"string\",\"quantityToRedeem\":0},\"orderId\":\"be466362-71e9-4bdd-ad11-bfacead5276b\",\"paymentInfo\":{\"method\":\"CASH\"},\"products\":[{\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"name\":\"Soft drink\",\"sku\":\"189784563455\",\"categories\":[\"string\"],\"image\":\"string\",\"url\":\"string\",\"netUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"tax\":0.1,\"quantity\":2.5,\"regularPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"discountPrice\":{\"amount\":15.5,\"currency\":\"USD\"},\"discountPercent\":0.1,\"property1\":null,\"property2\":null}],\"recordedAt\":\"2019-02-07T09:53:56.999+00:00\",\"revenue\":{\"amount\":64.25,\"currency\":\"USD\"},\"value\":{\"amount\":112.25,\"currency\":\"USD\"},\"source\":\"MOBILE\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\"}]")
              .asString();
  /v4/clients:
    post:
      summary: Create or update a Profile
      description: |
        Create a new profile in the Synerise application database or update an existing one. If you don't have some information about the profile, don't insert a null-value parameter - omit the parameter entirely.

        This is an asynchronous operation. After the request body is validated, the request is added to the queue (HTTP 202).


        ---

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

        **User role permission required:** `client_management: create`
      operationId: CreateAClientInCrm
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: |
          
          In the request body, you must provide at least one of those identifiers: 
          - `email`  
            If [non-unique emails](https://hub.synerise.com/docs/settings/configuration/non-unique-emails/) are enabled, email is NOT an identifier.
          - `phone`  
            Phone is treated as an identifier only if no other identifier is provided. If this is the case and non-unique emails are disabled, an anonymous profile is created with a randomized email placeholder.
          - `customId`
          - `uuid`
        content:
          application/json:
            schema:
              type: object
              allOf:
                - $ref: "#/components/schemas/api-service-CreateClientRequestBody-apiv4"
      responses:
        "202":
          description: Accepted, queued for processing
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                error: Bad Request
                status: 400
                timestamp: 2019-03-18T13:15:39.84Z
                path: /clients
                message: Some fields did not pass validation
                errors:
                  - code: 12082
                    field: countryCode
                    message: Country Code must have 0 or 3 characters as per ISO format.
                    rejectedValue: string
                  - code: 120
                    field: avatarUrl
                    message: "120"
                    rejectedValue: string
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/CreateAClientInCrm
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/clients \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}"

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

            conn.request("POST", "/v4/clients", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "string",
              "phone": "+48111222333",
              "customId": "string",
              "firstName": "string",
              "lastName": "string",
              "displayName": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "avatarUrl": "string",
              "birthDate": "1987-10-24",
              "company": "string",
              "city": "string",
              "address": "string",
              "zipCode": "string",
              "province": "string",
              "countryCode": "PL",
              "sex": "FEMALE",
              "agreements": {
                "email": false,
                "sms": false,
                "push": false,
                "webPush": false,
                "bluetooth": false,
                "rfid": false,
                "wifi": false
              },
              "attributes": {
                "property1": null,
                "property2": null
              },
              "tags": [
                "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/v4/clients");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/clients",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              email: 'string',
              phone: '+48111222333',
              customId: 'string',
              firstName: 'string',
              lastName: 'string',
              displayName: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              avatarUrl: 'string',
              birthDate: '1987-10-24',
              company: 'string',
              city: 'string',
              address: 'string',
              zipCode: 'string',
              province: 'string',
              countryCode: 'PL',
              sex: 'FEMALE',
              agreements: {
                email: false,
                sms: false,
                push: false,
                webPush: false,
                bluetooth: false,
                rfid: false,
                wifi: false
              },
              attributes: {property1: null, property2: null},
              tags: ['string']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["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/v4/clients")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}")
              .asString();
  /v4/clients/merge/from/custom-ids/{sourceCustomIDs}/to/custom-id/{targetCustomID}:
    post:
      summary: Merge profiles by customId
      description: |
        Moves profile UUIDs to a single profile (which must already exist) and removes the profiles that were merged.  

        The event history of the source profiles is moved to the target profile.

        The attributes (data from the `attributes` object) that don't exist in the target profile are copied to the target profile. If an attribute already exists in the target profile, the value from the source profile is lost.

        The properties and tags of the source profiles are lost, even if they don't have a value in the target profile.

         <p style='color:red'><strong>WARNING:</strong> This operation is irreversible. Use it carefully.</p>
         <p style='color:red'><strong>WARNING:</strong> You should not try to merge more than 10-20 profiles at once.</p>

         For more details, see the [Developer Guide](https://hub.synerise.com/developers/api/clients/profiles/merging-profiles/).


        ---

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

        **API key permission required:** `API_MERGEBYCUSTOMID_CLIENT_UPDATE`
      operationId: MergeClientsByCustomId
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientCustomIds-apiv4"
        - $ref: "#/components/parameters/api-service-pathTargetCustomId-apiv4"
        - $ref: "#/components/parameters/api-service-acceptHeader-apiv4"
        - $ref: "#/components/parameters/api-service-contentTypeHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      responses:
        "200":
          description: Request completed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-inResponseClientDetails-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Source and/or target profile(s) not found.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/MergeClientsByCustomId
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api.synerise.com/v4/clients/merge/from/custom-ids/customIdExample,customIdExample2,customIdExample3,customIdExample4,customIdExample5/to/custom-id/customIdExample' \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("POST", "/v4/clients/merge/from/custom-ids/customIdExample,customIdExample2,customIdExample3,customIdExample4,customIdExample5/to/custom-id/customIdExample", 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/v4/clients/merge/from/custom-ids/customIdExample,customIdExample2,customIdExample3,customIdExample4,customIdExample5/to/custom-id/customIdExample");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "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": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/clients/merge/from/custom-ids/customIdExample,customIdExample2,customIdExample3,customIdExample4,customIdExample5/to/custom-id/customIdExample",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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/v4/clients/merge/from/custom-ids/customIdExample,customIdExample2,customIdExample3,customIdExample4,customIdExample5/to/custom-id/customIdExample');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              '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/v4/clients/merge/from/custom-ids/customIdExample,customIdExample2,customIdExample3,customIdExample4,customIdExample5/to/custom-id/customIdExample")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/clients/merge/from/ids/{fromClientIds}/to/id/{toClientId}:
    post:
      summary: Merge profiles by clientId
      description: |
        Moves profile UUIDs to a single profile (which must already exist) and removes the profiles that were merged.  

        The event history of the source profiles is moved to the target profile.

        The attributes (data from the `attributes` object) that don't exist in the target profile are copied to the target profile. If an attribute already exists in the target profile, the value from the source profile is lost.

        The properties and tags of the source profiles are lost, even if they don't have a value in the target profile.

         <p style='color:red'><strong>WARNING:</strong> This operation is irreversible. Use it carefully.</p>
         <p style='color:red'><strong>WARNING:</strong> You should not try to merge more than 10-20 profiles at once.</p>

         For more details, see the [Developer Guide](https://hub.synerise.com/developers/api/clients/profiles/merging-profiles/).


        ---

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

        **API key permission required:** `API_MERGE_BY_ID_CLIENT_UPDATE`
      operationId: MergeClientsByClientId
      parameters:
        - $ref: "#/components/parameters/api-service-pathFromClientIds-apiv4"
        - $ref: "#/components/parameters/api-service-pathToClientId-apiv4"
        - $ref: "#/components/parameters/api-service-acceptHeader-apiv4"
        - $ref: "#/components/parameters/api-service-contentTypeHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      responses:
        "200":
          description: Request completed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-inResponseClientDetails-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Source and/or target profile(s) not found.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/MergeClientsByClientId
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api.synerise.com/v4/clients/merge/from/ids/434428563,33322211,232212342/to/id/434428563' \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("POST", "/v4/clients/merge/from/ids/434428563,33322211,232212342/to/id/434428563", 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/v4/clients/merge/from/ids/434428563,33322211,232212342/to/id/434428563");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "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": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/clients/merge/from/ids/434428563,33322211,232212342/to/id/434428563",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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/v4/clients/merge/from/ids/434428563,33322211,232212342/to/id/434428563');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              '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/v4/clients/merge/from/ids/434428563,33322211,232212342/to/id/434428563")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/clients/batch:
    post:
      summary: Batch add or update profiles
      description: |2
         Enqueue a number of add/update operations in the Synerise application database. <br/><br/>If you don't have some information about a profile, don't insert a null-value parameter - omit the parameter entirely. Sending a null value <strong>deletes an attribute</strong> (if it's a custom attribute) or <strong>sets it to null/default value</strong> (if the attribute is Synerise-native).


        The body contains an array of objects to update. The objects are the same as in the *Create a Profile* and *Update a Profile* endpoints.

        <span style='color:red'><strong>IMPORTANT:</strong></span> The request body cannot contain more than 1000 items or exceed 1 MB in size.

        This is an asynchronous operation. After the request body is validated, the request is added to the queue (HTTP 202).

        ---

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

        **User role permission required:** `client_management: create`
      operationId: BatchAddOrUpdateClients
      parameters:
        - $ref: "#/components/parameters/api-service-acceptHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: |
          
          Each profile must have at least one of the following identifiers:
          - `email`  
            If [non-unique emails](https://hub.synerise.com/docs/settings/configuration/non-unique-emails/) are enabled, email is NOT an identifier.
          - `phone`  
            Phone number is treated as an identifier only if no other identifier is provided. Then, if a profile with this phone number does not exist and non-unique emails are disabled, an anonymous profile is created.
          - `customId`
          - `uuid`
          - `clientId` (can be used only when updating an existing profile)
        content:
          application/json:
            schema:
              type: array
              minItems: 1
              maxItems: 1000
              items:
                type: object
                properties:
                  clientId:
                    type: integer
                    format: int64
                    description: |
                      This ID can be used only for updating an existing profile.


                      If a profile does not exist and `clientId` is the only provided identifier, the operation returns HTTP 202 and **a profile is not created**. If another identifier is provided, a profile is created with that identifier and a `clientId` generated by the system.
                allOf:
                  - $ref: "#/components/schemas/api-service-CreateClientRequestBody-apiv4"
        required: true
      responses:
        "202":
          description: "Request accepted. IMPORTANT: this does not mean that all profiles were created/updated successfully. The data is sent for further processing in other elements of the infrastructure."
        "207":
          description: Invalid data in some entries. Correct entries are sent for further processing, the invalid ones are rejected.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/api-service-Error-apiv4"
              example:
                - rejectedValue: de73b3490c4-bb8c0d8
                  field: list[0].uuid
                  status: 400
                  message: UUID must be well-formed value as per RFC 4122
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/BatchAddOrUpdateClients
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/clients/batch \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '[{"clientId":0,"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}]'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "[{\"clientId\":0,\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}]"

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

            conn.request("POST", "/v4/clients/batch", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              {
                "clientId": 0,
                "email": "string",
                "phone": "+48111222333",
                "customId": "string",
                "firstName": "string",
                "lastName": "string",
                "displayName": "string",
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "avatarUrl": "string",
                "birthDate": "1987-10-24",
                "company": "string",
                "city": "string",
                "address": "string",
                "zipCode": "string",
                "province": "string",
                "countryCode": "PL",
                "sex": "FEMALE",
                "agreements": {
                  "email": false,
                  "sms": false,
                  "push": false,
                  "webPush": false,
                  "bluetooth": false,
                  "rfid": false,
                  "wifi": false
                },
                "attributes": {
                  "property1": null,
                  "property2": null
                },
                "tags": [
                  "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/v4/clients/batch");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/clients/batch",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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([
              {
                clientId: 0,
                email: 'string',
                phone: '+48111222333',
                customId: 'string',
                firstName: 'string',
                lastName: 'string',
                displayName: 'string',
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                avatarUrl: 'string',
                birthDate: '1987-10-24',
                company: 'string',
                city: 'string',
                address: 'string',
                zipCode: 'string',
                province: 'string',
                countryCode: 'PL',
                sex: 'FEMALE',
                agreements: {
                  email: false,
                  sms: false,
                  push: false,
                  webPush: false,
                  bluetooth: false,
                  rfid: false,
                  wifi: false
                },
                attributes: {property1: null, property2: null},
                tags: ['string']
              }
            ]));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('[{"clientId":0,"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["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/v4/clients/batch")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[{\"clientId\":0,\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}]")
              .asString();
  /v4/clients/tags:
    get:
      summary: Get all tags
      description: |
        
        Retrieve all tags that can be assigned to profiles.

        This endpoint is available from version 4.1.0

        ---

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

        **User role permission required:** `client_tags: read`
      operationId: GetAllTags
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      responses:
        "200":
          description: A list of tags
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/api-service-Tag-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Tags
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Tags/operation/GetAllTags
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/clients/tags \
              --header 'Api-Version: 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 = {
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/clients/tags", 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/v4/clients/tags");
            xhr.setRequestHeader("Api-Version", "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": "/v4/clients/tags",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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/v4/clients/tags');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Api-Version' => 'SOME_STRING_VALUE',
              '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/v4/clients/tags")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/clients/{clientId}:
    get:
      summary: Get profile data
      description: |
        Retrieve profile data by profile ID. If PII protection is enabled and your API key/user doesn't have the required permissions, this endpoint can only return test profiles; other profiles return error 404.

        ---

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

        **User role permission required:** `client_info: read`
      operationId: GetClientData
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientId-apiv4"
        - $ref: "#/components/parameters/api-service-contentTypeHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      responses:
        "200":
          description: Details of a single profile
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-inResponseClientDetails-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          $ref: "#/components/responses/api-service-404-pii"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/GetClientData
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/clients/434428563 \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = {
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/clients/434428563", 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/v4/clients/434428563");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "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": "/v4/clients/434428563",
              "headers": {
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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/v4/clients/434428563');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              '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/v4/clients/434428563")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Update a profile (identify by ID)
      description: |
        Change the details of a profile in the Synerise application database. <br/><br/>Sending a null value <strong>deletes an attribute</strong> (if it's a custom attribute) or <strong>sets it to null/default value</strong> (if the attribute is Synerise-native).

        The `attributes` object can be used to add custom attributes of your choice. For example, `"hasDog":true`.

        The `tags` array contains custom tags of your choice.

        This is an asynchronous operation. After the request body is validated, the request is added to the queue (HTTP 202).

        ---

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

        **User role permission required:** `client_info: update`
      operationId: UpdateAClient
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientId-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-CreateClientRequestBody-apiv4"
        required: true
      responses:
        "202":
          description: Accepted, queued for processing
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                error: Bad Request
                status: 400
                timestamp: 2019-03-21T08:37:34.526Z
                path: /clients/1234
                message: Some fields did not pass validation
                errors:
                  - code: 12053
                    field: uuid
                    message: UUID must be well-formed value as per RFC 4122
                    rejectedValue: "4321"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                timestamp: 2018-06-07T09:48:56.522+00:00
                status: 404
                error: Not Found
                message: Client 525446575 not found
                path: /clients/525446575
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/UpdateAClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/clients/434428563 \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}"

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

            conn.request("POST", "/v4/clients/434428563", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "string",
              "phone": "+48111222333",
              "customId": "string",
              "firstName": "string",
              "lastName": "string",
              "displayName": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "avatarUrl": "string",
              "birthDate": "1987-10-24",
              "company": "string",
              "city": "string",
              "address": "string",
              "zipCode": "string",
              "province": "string",
              "countryCode": "PL",
              "sex": "FEMALE",
              "agreements": {
                "email": false,
                "sms": false,
                "push": false,
                "webPush": false,
                "bluetooth": false,
                "rfid": false,
                "wifi": false
              },
              "attributes": {
                "property1": null,
                "property2": null
              },
              "tags": [
                "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/v4/clients/434428563");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/clients/434428563",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              email: 'string',
              phone: '+48111222333',
              customId: 'string',
              firstName: 'string',
              lastName: 'string',
              displayName: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              avatarUrl: 'string',
              birthDate: '1987-10-24',
              company: 'string',
              city: 'string',
              address: 'string',
              zipCode: 'string',
              province: 'string',
              countryCode: 'PL',
              sex: 'FEMALE',
              agreements: {
                email: false,
                sms: false,
                push: false,
                webPush: false,
                bluetooth: false,
                rfid: false,
                wifi: false
              },
              attributes: {property1: null, property2: null},
              tags: ['string']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["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/v4/clients/434428563")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}")
              .asString();
    delete:
      summary: Delete a profile
      description: |
        Delete a profile from the database.

        ---

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

        **User role permission required:** `client_info: delete`
      operationId: DeleteAClient
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientId-apiv4"
        - $ref: "#/components/parameters/api-service-acceptHeader-apiv4"
        - $ref: "#/components/parameters/api-service-contentTypeHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      responses:
        "202":
          description: Accepted
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                timestamp: 2018-06-07T09:48:56.522+00:00
                status: 404
                error: Not Found
                message: Client 525446575 not found
                path: /clients/525446575
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/DeleteAClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/v4/clients/434428563 \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("DELETE", "/v4/clients/434428563", 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/v4/clients/434428563");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "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": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/clients/434428563",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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/v4/clients/434428563');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              '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/v4/clients/434428563")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/clients/by-email/{clientEmail}:
    post:
      summary: Update a profile (identify by email)
      description: |
        Change the details of a profile in the Synerise application database. <br/><br/>Sending a null value <strong>deletes an attribute</strong> (if it's a custom attribute) or <strong>sets it to null/default value</strong> (if the attribute is Synerise-native).

        The `attributes` object can be used to add custom attributes of your choice. For example, `"hasDog":true`.

        The `tags` array contains custom tags of your choice.

        This is an asynchronous operation. After the request body is validated, the request is added to the queue (HTTP 202).

        ---

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

        **User role permission required:** `client_info: update`
      operationId: UpdateAClientByEmail
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientEmail-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-CreateClientRequestBody-apiv4"
        required: true
      responses:
        "202":
          description: Accepted, queued for processing
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                error: Bad Request
                status: 400
                timestamp: 2019-03-21T08:37:34.526Z
                path: /clients/by-email/client@synerise.com
                message: Some fields did not pass validation
                errors:
                  - code: 12053
                    field: uuid
                    message: UUID must be well-formed value as per RFC 4122
                    rejectedValue: "4321"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                timestamp: 2018-06-07T09:48:56.522+00:00
                status: 404
                error: Not Found
                message: "No client record found for email: client@synerise.com"
                path: /clients/by-email/client@synerise.com
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/UpdateAClientByEmail
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/clients/by-email/clientemail@synerise.com \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}"

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

            conn.request("POST", "/v4/clients/by-email/clientemail@synerise.com", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "string",
              "phone": "+48111222333",
              "customId": "string",
              "firstName": "string",
              "lastName": "string",
              "displayName": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "avatarUrl": "string",
              "birthDate": "1987-10-24",
              "company": "string",
              "city": "string",
              "address": "string",
              "zipCode": "string",
              "province": "string",
              "countryCode": "PL",
              "sex": "FEMALE",
              "agreements": {
                "email": false,
                "sms": false,
                "push": false,
                "webPush": false,
                "bluetooth": false,
                "rfid": false,
                "wifi": false
              },
              "attributes": {
                "property1": null,
                "property2": null
              },
              "tags": [
                "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/v4/clients/by-email/clientemail@synerise.com");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/clients/by-email/clientemail@synerise.com",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              email: 'string',
              phone: '+48111222333',
              customId: 'string',
              firstName: 'string',
              lastName: 'string',
              displayName: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              avatarUrl: 'string',
              birthDate: '1987-10-24',
              company: 'string',
              city: 'string',
              address: 'string',
              zipCode: 'string',
              province: 'string',
              countryCode: 'PL',
              sex: 'FEMALE',
              agreements: {
                email: false,
                sms: false,
                push: false,
                webPush: false,
                bluetooth: false,
                rfid: false,
                wifi: false
              },
              attributes: {property1: null, property2: null},
              tags: ['string']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/clients/by-email/clientemail@synerise.com');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["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/v4/clients/by-email/clientemail@synerise.com")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}")
              .asString();
  /v4/clients/by-customid/{customId}:
    post:
      summary: Update a profile (identify by customId)
      description: |
        Change the details of a profile in the Synerise application database. <br/><br/>Sending a null value <strong>deletes an attribute</strong> (if it's a custom attribute) or <strong>sets it to null/default value</strong> (if the attribute is Synerise-native).
         
        The `attributes` object can be used to add custom attributes of your choice. For example, `"hasDog":true`.

        The `tags` array contains custom tags of your choice.

        This is an asynchronous operation. After the request body is validated, the request is added to the queue (HTTP 202).

        ---

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

        **User role permission required:** `client_info: update`
      operationId: UpdateAClientByCustomId
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientCustomId-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-CreateClientRequestBody-apiv4"
        required: true
      responses:
        "202":
          description: Accepted, queued for processing
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                error: Bad Request
                status: 400
                timestamp: 2019-03-21T08:37:34.526Z
                path: /clients/by-customid/customId1234
                message: Some fields did not pass validation
                errors:
                  - code: 12053
                    field: uuid
                    message: UUID must be well-formed value as per RFC 4122
                    rejectedValue: "4321"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                timestamp: 2018-06-07T09:48:56.522+00:00
                status: 404
                error: Not Found
                message: "No client record found for customId: customId1234"
                path: /clients/by-customid/customId1234
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/UpdateAClientByCustomId
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/clients/by-customid/customIdExample \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}"

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

            conn.request("POST", "/v4/clients/by-customid/customIdExample", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "string",
              "phone": "+48111222333",
              "customId": "string",
              "firstName": "string",
              "lastName": "string",
              "displayName": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "avatarUrl": "string",
              "birthDate": "1987-10-24",
              "company": "string",
              "city": "string",
              "address": "string",
              "zipCode": "string",
              "province": "string",
              "countryCode": "PL",
              "sex": "FEMALE",
              "agreements": {
                "email": false,
                "sms": false,
                "push": false,
                "webPush": false,
                "bluetooth": false,
                "rfid": false,
                "wifi": false
              },
              "attributes": {
                "property1": null,
                "property2": null
              },
              "tags": [
                "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/v4/clients/by-customid/customIdExample");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/clients/by-customid/customIdExample",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              email: 'string',
              phone: '+48111222333',
              customId: 'string',
              firstName: 'string',
              lastName: 'string',
              displayName: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              avatarUrl: 'string',
              birthDate: '1987-10-24',
              company: 'string',
              city: 'string',
              address: 'string',
              zipCode: 'string',
              province: 'string',
              countryCode: 'PL',
              sex: 'FEMALE',
              agreements: {
                email: false,
                sms: false,
                push: false,
                webPush: false,
                bluetooth: false,
                rfid: false,
                wifi: false
              },
              attributes: {property1: null, property2: null},
              tags: ['string']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/clients/by-customid/customIdExample');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["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/v4/clients/by-customid/customIdExample")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}")
              .asString();
  /v4/clients/by-custom-id/{customId}:
    delete:
      summary: Delete a profile (identify by customId)
      description: |
        Delete a profile from the database.

        ---

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

        **User role permission required:** `client_info: delete`
      operationId: DeleteAClientByCustomId
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientCustomId-apiv4"
        - $ref: "#/components/parameters/api-service-contentTypeHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      responses:
        "202":
          description: Accepted
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                timestamp: 2018-06-07T09:48:56.522+00:00
                status: 404
                error: Not Found
                message: "No client record found for customId: customId1234"
                path: /clients/by-customid/customId1234
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/DeleteAClientByCustomId
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/v4/clients/by-custom-id/customIdExample \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = {
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("DELETE", "/v4/clients/by-custom-id/customIdExample", 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/v4/clients/by-custom-id/customIdExample");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "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": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/clients/by-custom-id/customIdExample",
              "headers": {
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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/v4/clients/by-custom-id/customIdExample');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              '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/v4/clients/by-custom-id/customIdExample")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/clients/{clientId}/linked-devices:
    post:
      summary: Link a device by profile ID
      description: |2
         Assign a device to a profile ID. A profile may have many devices assigned.

        ---

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

        **User role permission required:** `client_info: update`
      operationId: LinkAClientDeviceByClientId
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientId-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-LinkaClientdeviceRequest-apiv4"
        required: true
      responses:
        "200":
          description: Request accepted
          headers: {}
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                error: Bad Request
                status: 400
                timestamp: 2020-10-29T12:34:02.222Z
                path: /clients/1245757/linked-devices
                message: Some fields did not pass validation
                errors:
                  - code: 12301
                    field: deviceId
                    message: "12301"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Profile not found
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile devices
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-devices/operation/LinkAClientDeviceByClientId
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/clients/434428563/linked-devices \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"deviceId":"string","registrationId":"string","type":"android","bluetoothAddress":"string","macAddress":"string","manufacturer":"string","model":"string","osVersion":"string","product":"a51ul_htc_europe","screenHeight":0,"screenWidth":0,"publicKey":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}"

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

            conn.request("POST", "/v4/clients/434428563/linked-devices", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "deviceId": "string",
              "registrationId": "string",
              "type": "android",
              "bluetoothAddress": "string",
              "macAddress": "string",
              "manufacturer": "string",
              "model": "string",
              "osVersion": "string",
              "product": "a51ul_htc_europe",
              "screenHeight": 0,
              "screenWidth": 0,
              "publicKey": "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/v4/clients/434428563/linked-devices");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/clients/434428563/linked-devices",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              deviceId: 'string',
              registrationId: 'string',
              type: 'android',
              bluetoothAddress: 'string',
              macAddress: 'string',
              manufacturer: 'string',
              model: 'string',
              osVersion: 'string',
              product: 'a51ul_htc_europe',
              screenHeight: 0,
              screenWidth: 0,
              publicKey: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/clients/434428563/linked-devices');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"deviceId":"string","registrationId":"string","type":"android","bluetoothAddress":"string","macAddress":"string","manufacturer":"string","model":"string","osVersion":"string","product":"a51ul_htc_europe","screenHeight":0,"screenWidth":0,"publicKey":"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/v4/clients/434428563/linked-devices")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}")
              .asString();
  /v4/clients/{identifierType}/{identifierValue}:
    get:
      summary: Fetch profile data
      description: |2
         Get the details of a single profile. If PII protection is enabled and your API key/user doesn't have the required permissions, this endpoint can only return test profiles; other profiles return error 404.

        ---

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

        **User role permission required:** `client_info: read`
      operationId: FindAClient
      parameters:
        - name: identifierType
          in: path
          description: The type of profile identifier to use for the request
          required: true
          schema:
            type: string
            example: by-email
            enum:
              - by-custom-id
              - by-phone
              - by-uuid
              - by-email
        - name: identifierValue
          in: path
          description: The value of the selected identifier. The value must be URL-encoded.
          required: true
          schema:
            type: string
            example: address@domain.com
        - $ref: "#/components/parameters/api-service-contentTypeHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      responses:
        "200":
          description: Details of a single profile
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-inResponseClientDetails-apiv4"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                path: /clients/by-custom-id/444555
                message: Api-Version header is required
                error: Bad Request
                timestamp: 2018-06-07T09:33:59.183Z
                status: 400
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          $ref: "#/components/responses/api-service-404-pii"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/FindAClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/clients/by-email/address@domain.com \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = {
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/clients/by-email/address@domain.com", 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/v4/clients/by-email/address@domain.com");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "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": "/v4/clients/by-email/address@domain.com",
              "headers": {
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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/v4/clients/by-email/address@domain.com');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              '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/v4/clients/by-email/address@domain.com")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/clients/batch/by-phone/{phoneNumber}:
    get:
      summary: Batch fetch profiles by phone number
      description: |2
         Returns a detailed list of profiles associated with the provided phone number. The number saved in the profile must exactly match the number from the request. If no profiles match the criteria, an empty list is returned.

        ---

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

        **User role permission required:** `client_info: read`
      operationId: FindClientsByPhone
      parameters:
        - name: phoneNumber
          in: path
          description: The phone number to search for in profiles. Must be an exact match. The value must be URL-encoded.
          required: true
          schema:
            type: string
            example: 12065550100
        - $ref: "#/components/parameters/api-service-contentTypeHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      responses:
        "200":
          description: Returns an array of profile details.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-inResponseClientDetailsArray-apiv4"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                path: /clients/by-phone/+12065550100/batch
                message: Api-Version header is required
                error: Bad Request
                timestamp: 2018-06-07T09:33:59.183Z
                status: 400
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          $ref: "#/components/responses/api-service-404-pii"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/FindClientsByPhone
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/clients/batch/by-phone/12065550100 \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = {
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/clients/batch/by-phone/12065550100", 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/v4/clients/batch/by-phone/12065550100");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "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": "/v4/clients/batch/by-phone/12065550100",
              "headers": {
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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/v4/clients/batch/by-phone/12065550100');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              '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/v4/clients/batch/by-phone/12065550100")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/clients/{identifierType}/{identifierValue}/linked-devices:
    post:
      summary: Link a device by other parameters
      description: |2
         Assign a device to a profile UUID. A profile may have many devices assigned.

        ---

        **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=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:** `API_BY_IDENTIFY_DEVICE_CLIENT_UPDATE`

        **User role permission required:** `client_info: update`
      operationId: LinkAClientDeviceByClientUuid
      parameters:
        - name: identifierType
          in: path
          required: true
          description: The profile identifier to use for the request
          schema:
            type: string
            enum:
              - by-customId
              - by-uuid
        - $ref: "#/components/parameters/api-service-pathIdentifierValue-apiv4"
        - $ref: "#/components/parameters/api-service-acceptHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-LinkaClientdeviceRequest-apiv4"
        required: true
      responses:
        "200":
          description: Request accepted
          headers: {}
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                error: Bad Request
                status: 400
                timestamp: 2020-10-29T12:34:02.222Z
                path: /clients/by-uuid/779465fc-a0c5-41e5-9be2-51c00b2588b4/linked-devices
                message: Some fields did not pass validation
                errors:
                  - code: 12301
                    field: deviceId
                    message: "12301"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Profile not found
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile devices
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-devices/operation/LinkAClientDeviceByClientUuid
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/clients/%7BidentifierType%7D/%7BidentifierValue%7D/linked-devices \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"deviceId":"string","registrationId":"string","type":"android","bluetoothAddress":"string","macAddress":"string","manufacturer":"string","model":"string","osVersion":"string","product":"a51ul_htc_europe","screenHeight":0,"screenWidth":0,"publicKey":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}"

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

            conn.request("POST", "/v4/clients/%7BidentifierType%7D/%7BidentifierValue%7D/linked-devices", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "deviceId": "string",
              "registrationId": "string",
              "type": "android",
              "bluetoothAddress": "string",
              "macAddress": "string",
              "manufacturer": "string",
              "model": "string",
              "osVersion": "string",
              "product": "a51ul_htc_europe",
              "screenHeight": 0,
              "screenWidth": 0,
              "publicKey": "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/v4/clients/%7BidentifierType%7D/%7BidentifierValue%7D/linked-devices");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/clients/%7BidentifierType%7D/%7BidentifierValue%7D/linked-devices",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              deviceId: 'string',
              registrationId: 'string',
              type: 'android',
              bluetoothAddress: 'string',
              macAddress: 'string',
              manufacturer: 'string',
              model: 'string',
              osVersion: 'string',
              product: 'a51ul_htc_europe',
              screenHeight: 0,
              screenWidth: 0,
              publicKey: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/clients/%7BidentifierType%7D/%7BidentifierValue%7D/linked-devices');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"deviceId":"string","registrationId":"string","type":"android","bluetoothAddress":"string","macAddress":"string","manufacturer":"string","model":"string","osVersion":"string","product":"a51ul_htc_europe","screenHeight":0,"screenWidth":0,"publicKey":"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/v4/clients/%7BidentifierType%7D/%7BidentifierValue%7D/linked-devices")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}")
              .asString();
  /v4/my-account/linked-devices:
    post:
      summary: Link a device to currently logged in profile
      description: |2
         Assign a device to the profile that is currently logged in. A Profile may have many devices assigned.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: LinkAClientDeviceToCurrentlyLoggedInClient
      parameters:
        - $ref: "#/components/parameters/api-service-acceptHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-LinkaClientdeviceRequest-apiv4"
        required: true
      responses:
        "200":
          description: Request accepted
          headers: {}
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile devices
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-devices/operation/LinkAClientDeviceToCurrentlyLoggedInClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/my-account/linked-devices \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"deviceId":"string","registrationId":"string","type":"android","bluetoothAddress":"string","macAddress":"string","manufacturer":"string","model":"string","osVersion":"string","product":"a51ul_htc_europe","screenHeight":0,"screenWidth":0,"publicKey":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}"

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

            conn.request("POST", "/v4/my-account/linked-devices", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "deviceId": "string",
              "registrationId": "string",
              "type": "android",
              "bluetoothAddress": "string",
              "macAddress": "string",
              "manufacturer": "string",
              "model": "string",
              "osVersion": "string",
              "product": "a51ul_htc_europe",
              "screenHeight": 0,
              "screenWidth": 0,
              "publicKey": "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/v4/my-account/linked-devices");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/my-account/linked-devices",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              deviceId: 'string',
              registrationId: 'string',
              type: 'android',
              bluetoothAddress: 'string',
              macAddress: 'string',
              manufacturer: 'string',
              model: 'string',
              osVersion: 'string',
              product: 'a51ul_htc_europe',
              screenHeight: 0,
              screenWidth: 0,
              publicKey: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/my-account/linked-devices');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"deviceId":"string","registrationId":"string","type":"android","bluetoothAddress":"string","macAddress":"string","manufacturer":"string","model":"string","osVersion":"string","product":"a51ul_htc_europe","screenHeight":0,"screenWidth":0,"publicKey":"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/v4/my-account/linked-devices")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}")
              .asString();
  /v4/my-account/personal-information:
    get:
      tags:
        - Profile account management
      summary: Get Profile's own data
      description: |
        A Profile can retrieve its details from the database.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, ANONYMOUS_CLIENT_CONDITIONAL
      operationId: getAccountDataGET
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
        - $ref: "#/components/parameters/api-service-contentTypeHeader-apiv4"
      responses:
        "200":
          description: Profile information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-inResponseClientDetails-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/getAccountDataGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/my-account/personal-information \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = {
                'Api-Version': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/my-account/personal-information", 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/v4/my-account/personal-information");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-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": "/v4/my-account/personal-information",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "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/v4/my-account/personal-information');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Api-Version' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              '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/v4/my-account/personal-information")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - Profile account management
      summary: Update Profile's own data
      description: |
        A Profile can update its own details.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: updateAccountDataUsingPOST
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-ClientChangeset-apiv4"
      responses:
        "202":
          description: Accepted
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                error: Bad Request
                status: 400
                timestamp: 2020-10-29T13:08:16.235Z
                path: /my-account/personal-information
                message: Some fields did not pass validation
                errors:
                  - code: 120
                    field: avatarUrl
                    message: "120"
                    rejectedValue: "548869"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/updateAccountDataUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/my-account/personal-information \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"address":"string","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"avatarUrl":"string","birthDate":"1987-10-24","city":"string","company":"string","countryCode":"PL","customId":"string","displayName":"string","email":"string","firstName":"string","lastName":"string","phone":"+48111222333","province":"string","sex":"FEMALE","zipCode":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"address\":\"string\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"city\":\"string\",\"company\":\"string\",\"countryCode\":\"PL\",\"customId\":\"string\",\"displayName\":\"string\",\"email\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"phone\":\"+48111222333\",\"province\":\"string\",\"sex\":\"FEMALE\",\"zipCode\":\"string\"}"

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

            conn.request("POST", "/v4/my-account/personal-information", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "address": "string",
              "agreements": {
                "email": false,
                "sms": false,
                "push": false,
                "webPush": false,
                "bluetooth": false,
                "rfid": false,
                "wifi": false
              },
              "attributes": {
                "property1": null,
                "property2": null
              },
              "avatarUrl": "string",
              "birthDate": "1987-10-24",
              "city": "string",
              "company": "string",
              "countryCode": "PL",
              "customId": "string",
              "displayName": "string",
              "email": "string",
              "firstName": "string",
              "lastName": "string",
              "phone": "+48111222333",
              "province": "string",
              "sex": "FEMALE",
              "zipCode": "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/v4/my-account/personal-information");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/my-account/personal-information",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              address: 'string',
              agreements: {
                email: false,
                sms: false,
                push: false,
                webPush: false,
                bluetooth: false,
                rfid: false,
                wifi: false
              },
              attributes: {property1: null, property2: null},
              avatarUrl: 'string',
              birthDate: '1987-10-24',
              city: 'string',
              company: 'string',
              countryCode: 'PL',
              customId: 'string',
              displayName: 'string',
              email: 'string',
              firstName: 'string',
              lastName: 'string',
              phone: '+48111222333',
              province: 'string',
              sex: 'FEMALE',
              zipCode: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/my-account/personal-information');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"address":"string","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"avatarUrl":"string","birthDate":"1987-10-24","city":"string","company":"string","countryCode":"PL","customId":"string","displayName":"string","email":"string","firstName":"string","lastName":"string","phone":"+48111222333","province":"string","sex":"FEMALE","zipCode":"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/v4/my-account/personal-information")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"address\":\"string\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"city\":\"string\",\"company\":\"string\",\"countryCode\":\"PL\",\"customId\":\"string\",\"displayName\":\"string\",\"email\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"phone\":\"+48111222333\",\"province\":\"string\",\"sex\":\"FEMALE\",\"zipCode\":\"string\"}")
              .asString();
  /v4/my-account/phone-update/request:
    post:
      summary: Request profile phone number change
      description: |
        A Profile can request a phone number update. The confirmation code is sent in a text message.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: RequestClientPhoneNumberChange
      parameters:
        - $ref: "#/components/parameters/api-service-acceptHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              required:
                - phone
              type: object
              properties:
                phone:
                  type: string
                  description: |
                    Current phone number of the profile. 

                    Must match the pattern (ECMA flavor): `/(^\+[0-9 \-()/]{6,19}$)|(^[0-9 \-()/]{6,20}$)/`
                  example: "+48111222333"
        required: true
      responses:
        "202":
          description: Request accepted'
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile account management
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/RequestClientPhoneNumberChange
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/my-account/phone-update/request \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"phone":"+48111222333"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"phone\":\"+48111222333\"}"

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

            conn.request("POST", "/v4/my-account/phone-update/request", payload, headers)

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

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

            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/v4/my-account/phone-update/request");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/my-account/phone-update/request",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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({phone: '+48111222333'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/my-account/phone-update/request');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"phone":"+48111222333"}');

            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/v4/my-account/phone-update/request")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"phone\":\"+48111222333\"}")
              .asString();
  /v4/my-account/phone-update/confirmation:
    post:
      summary: Confirm profile phone number change
      description: |
        Use a code to confirm the phone number change and provide the new number.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: ConfirmClientPhoneNumberChange
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              required:
                - phone
                - confirmationCode
              type: object
              properties:
                phone:
                  type: string
                  description: |
                    New phone number

                    Must match the pattern (ECMA flavor): `/(^\+[0-9 \-()/]{6,19}$)|(^[0-9 \-()/]{6,20}$)/`
                  example: "+48111222333"
                confirmationCode:
                  description: Confirmation code received by text message
                  type: string
                  example: 73AC1
                deviceId:
                  $ref: "#/components/schemas/api-service-inBodyClientDeviceId-apiv4"
                smsAgreement:
                  type: boolean
                  description: Permission to receive marketing information by SMS
        required: true
      responses:
        "202":
          description: Request accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile account management
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/ConfirmClientPhoneNumberChange
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/my-account/phone-update/confirmation \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"phone":"+48111222333","confirmationCode":"73AC1","deviceId":"string","smsAgreement":true}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"phone\":\"+48111222333\",\"confirmationCode\":\"73AC1\",\"deviceId\":\"string\",\"smsAgreement\":true}"

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

            conn.request("POST", "/v4/my-account/phone-update/confirmation", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "phone": "+48111222333",
              "confirmationCode": "73AC1",
              "deviceId": "string",
              "smsAgreement": 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/v4/my-account/phone-update/confirmation");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/my-account/phone-update/confirmation",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              phone: '+48111222333',
              confirmationCode: '73AC1',
              deviceId: 'string',
              smsAgreement: true
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/my-account/phone-update/confirmation');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"phone":"+48111222333","confirmationCode":"73AC1","deviceId":"string","smsAgreement":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/v4/my-account/phone-update/confirmation")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"phone\":\"+48111222333\",\"confirmationCode\":\"73AC1\",\"deviceId\":\"string\",\"smsAgreement\":true}")
              .asString();
  /v4/tags:
    post:
      tags:
        - Tags
      summary: Create a tag
      description: |
        Create a new tag that can be assigned to profiles. If you try to create a tag that already exists, the response is the existing tag.

        ---

        **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_TAGS_CREATE`

        **User role permission required:** `client_tags: create`
      operationId: createTagUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-TagCreate-apiv4"
      responses:
        "200":
          description: Tag created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-TagResponse-apiv4"
        "400":
          description: Invalid or incomplete data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                error: Bad Request
                status: 400
                timestamp: 2020-10-29T11:02:25.939Z
                path: /tags
                message: Some fields did not pass validation
                errors:
                  - code: 16213
                    field: name
                    message: Scripts are not allowed
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Tags/operation/createTagUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/tags \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"nice tag","color":"#0768ff"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"name\":\"nice tag\",\"color\":\"#0768ff\"}"

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

            conn.request("POST", "/v4/tags", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "name": "nice tag",
              "color": "#0768ff"
            });

            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/v4/tags");
            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": "/v4/tags",
              "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: 'nice tag', color: '#0768ff'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"name":"nice tag","color":"#0768ff"}');

            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/v4/tags")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"nice tag\",\"color\":\"#0768ff\"}")
              .asString();
  /v4/tags/{tagID}:
    put:
      tags:
        - Tags
      summary: Update a tag
      description: |
        Update a tag. This method currently only allows modifying the `color` field.

        If the tag has been already deleted, the response is a 404 error.

        **Important**: This method doesn't update global tags (not related to any workspace). If you try to update a global tag, the response is a 404 error.


        ---

        **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_TAGS_CREATE`

        **User role permission required:** `client_tags: create`
      operationId: updateTagPUT
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-TagUpdate-apiv4"
      parameters:
        - $ref: "#/components/parameters/api-service-pathTagId-apiv4"
      responses:
        "200":
          description: Tag updated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-TagResponse-apiv4"
        "400":
          description: Invalid or incomplete data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Tag doesn't exist or it is a global tag (not related to any workspace).
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Tags/operation/updateTagPUT
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/v4/tags/645 \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"color":"#0768ff"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"color\":\"#0768ff\"}"

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

            conn.request("PUT", "/v4/tags/645", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "color": "#0768ff"
            });

            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/v4/tags/645");
            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": "/v4/tags/645",
              "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({color: '#0768ff'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/tags/645');
            $request->setMethod(HTTP_METH_PUT);

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

            $request->setBody('{"color":"#0768ff"}');

            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/v4/tags/645")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"color\":\"#0768ff\"}")
              .asString();
    delete:
      tags:
        - Tags
      summary: Remove a tag
      description: |
        Remove a tag definition from the workspace.

        If the tag has been already deleted, the response is a 404 error.

        **Important**: This method does not remove global tag (not related to any workspace). In this case, the response is a 404 error.

        **Note**: After removing a tag definition, the tag is still cached for a while. In that time, it is still possible for a while to remove or add this tag in profiles.


        ---

        **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_TAGS_CREATE`

        **User role permission required:** `client_tags: create`
      operationId: deleteTagDELETE
      parameters:
        - $ref: "#/components/parameters/api-service-pathTagId-apiv4"
      responses:
        "202":
          description: Tag removed
        "400":
          description: Invalid or incomplete data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Tag doesn't exist, was already deleted, or is a global tag (not related to any workspace).
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Tags/operation/deleteTagDELETE
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/v4/tags/645 \
              --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", "/v4/tags/645", 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/v4/tags/645");
            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": "/v4/tags/645",
              "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/v4/tags/645');
            $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/v4/tags/645")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/clients/{clientId}/tags:
    get:
      tags:
        - Tags
      summary: Get profile tags
      description: |
        Retrieve a list of tags assigned to a profile.

        ---

        **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_TAGS_READ`

        **User role permission required:** `client_tags: read`
      operationId: getClientTagsUsingGET
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientId-apiv4"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/api-service-Tag-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Tags/operation/getClientTagsUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/clients/434428563/tags \
              --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", "/v4/clients/434428563/tags", 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/v4/clients/434428563/tags");
            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": "/v4/clients/434428563/tags",
              "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/v4/clients/434428563/tags');
            $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/v4/clients/434428563/tags")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/clients/{clientId}/tags/{tagID}:
    post:
      tags:
        - Tags
      summary: Assign tag to profile
      description: |
        Assign a tag to a profile.

        ---

        **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_ASSIGN_TAGS_EXECUTE`

        **User role permission required:** `client_tags: execute`
      operationId: assignTagPOST
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientId-apiv4"
        - $ref: "#/components/parameters/api-service-pathTagId-apiv4"
      responses:
        "200":
          description: Tag assigned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-TagAssociation-apiv4"
        "400":
          description: Profile not found or data malformed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Tag not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Tags/operation/assignTagPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/clients/434428563/tags/645
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            conn.request("POST", "/v4/clients/434428563/tags/645")

            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/v4/clients/434428563/tags/645");

            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": "/v4/clients/434428563/tags/645",
              "headers": {}
            };

            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/v4/clients/434428563/tags/645');
            $request->setMethod(HTTP_METH_POST);

            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/v4/clients/434428563/tags/645")
              .asString();
    delete:
      tags:
        - Tags
      summary: Remove tag from profile
      operationId: removeClientTagDELETE
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientId-apiv4"
        - $ref: "#/components/parameters/api-service-pathTagId-apiv4"
      responses:
        "202":
          description: Tag removed
        "400":
          description: Profile not found or data malformed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Tag not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Tags/operation/removeClientTagDELETE
      description: |
        

        ---

        **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_ASSIGN_TAGS_EXECUTE`

        **User role permission required:** `client_tags: execute`
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/v4/clients/434428563/tags/645
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            conn.request("DELETE", "/v4/clients/434428563/tags/645")

            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/v4/clients/434428563/tags/645");

            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": "/v4/clients/434428563/tags/645",
              "headers": {}
            };

            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/v4/clients/434428563/tags/645');
            $request->setMethod(HTTP_METH_DELETE);

            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/v4/clients/434428563/tags/645")
              .asString();
  /v4/events/by-client/{clientId}:
    get:
      deprecated: true
      summary: Get Profile events as Workspace
      description: |
        **This endpoint is deprecated. Use [/activities-api/events/by/{identifierType}](https://developers.synerise.com/DataManagement/DataManagement.html#operation/getEventsByIdentifier) instead.**  

        Retrieve a list of events saved in a Profile.


        ---

        **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_LISTING_BY_CLIENT_EVENTS_READ`

        **User role permission required:** `client_activities: read`
      operationId: GetClientEvents
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientId-apiv4"
        - $ref: "#/components/parameters/api-service-contentTypeHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
        - $ref: "#/components/parameters/api-service-queryDateFrom-apiv4"
        - $ref: "#/components/parameters/api-service-queryDateTo-apiv4"
        - $ref: "#/components/parameters/api-service-queryAction-apiv4"
        - $ref: "#/components/parameters/api-service-queryEventsLimit-apiv4"
      responses:
        "200":
          description: A list of events
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/api-service-GetClientevents-HTTP200-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/GetClientEvents
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/events/by-client/434428563?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=SOME_INTEGER_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = {
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/events/by-client/434428563?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=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/v4/events/by-client/434428563?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=SOME_INTEGER_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "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": "/v4/events/by-client/434428563?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=SOME_INTEGER_VALUE",
              "headers": {
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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/v4/events/by-client/434428563');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'time[from]' => 'SOME_STRING_VALUE',
              'time[to]' => 'SOME_STRING_VALUE',
              'action' => 'transaction.charge',
              'limit' => 'SOME_INTEGER_VALUE'
            ]);

            $request->setHeaders([
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              '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/v4/events/by-client/434428563?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=SOME_INTEGER_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/events:
    get:
      deprecated: true
      summary: Get Profile's own events
      description: |
        **This endpoint is deprecated. Use [/activities-api/events](https://developers.synerise.com/DataManagement/DataManagement.html#operation/getEvents) instead.**  

        A Profile can retrieve a list of its own events saved in the database.


        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: GetClientOwnEvents
      parameters:
        - $ref: "#/components/parameters/api-service-contentTypeHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
        - $ref: "#/components/parameters/api-service-queryDateFrom-apiv4"
        - $ref: "#/components/parameters/api-service-queryDateTo-apiv4"
        - $ref: "#/components/parameters/api-service-queryAction-apiv4"
        - $ref: "#/components/parameters/api-service-queryEventsLimit-apiv4"
      responses:
        "200":
          description: A list of events
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/api-service-GetClientevents-HTTP200-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                timestamp: 2018-06-07T09:50:43.947+00:00
                status: 500
                error: Internal Server Error
                message: Duration between time[from] and time[to] cannot be greater than 7 days
                path: /events/by-client/525446574
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/GetClientOwnEvents
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/events?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=SOME_INTEGER_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = {
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/events?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=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/v4/events?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=SOME_INTEGER_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "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": "/v4/events?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=SOME_INTEGER_VALUE",
              "headers": {
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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/v4/events');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'time[from]' => 'SOME_STRING_VALUE',
              'time[to]' => 'SOME_STRING_VALUE',
              'action' => 'transaction.charge',
              'limit' => 'SOME_INTEGER_VALUE'
            ]);

            $request->setHeaders([
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              '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/v4/events?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=SOME_INTEGER_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/events/application-started:
    post:
      summary: Application started
      description: |
        Send a 'client application started' event.

        This endpoint is available from API version 4.1.2.

        When you send an event to this endpoint, the `action` field is set to `client.applicationStarted` by the backend.

        ---

        **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=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:** `API_APPLICATION_STARTED_EVENTS_CREATE`
      operationId: ApplicationStarted
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-ApplicationstartedRequest-apiv4"
        required: true
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                timestamp: 2018-06-07T09:53:56.999+00:00
                status: 500
                error: Internal Server Error
                message: Error occurred during event publication
                path: /events/application-started
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ApplicationStarted
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/application-started \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"applicationName":"string","version":"string"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"applicationName\":\"string\",\"version\":\"string\"}}"

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

            conn.request("POST", "/v4/events/application-started", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {
                "applicationName": "string",
                "version": "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/v4/events/application-started");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/application-started",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {applicationName: 'string', version: 'string'}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/application-started');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"applicationName":"string","version":"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/v4/events/application-started")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"applicationName\":\"string\",\"version\":\"string\"}}")
              .asString();
  /v4/events/registered:
    post:
      summary: Profile account registered
      description: |
        Send a 'profile account registered' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.

        When you send an event to this endpoint, the `action` field is set to `client.register` by the backend.

        ---

        **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=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:** `API_REGISTERED_EVENTS_CREATE`
      operationId: ClientRegistered
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientRegistered
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/registered \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}"

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

            conn.request("POST", "/v4/events/registered", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {}
            });

            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/v4/events/registered");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/registered",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}');

            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/v4/events/registered")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}")
              .asString();
  /v4/events/logged-in:
    post:
      summary: Profile logged in
      description: |
        Send a 'profile logged in' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.

        When you send an event to this endpoint, the `action` field is set to `client.login` by the backend.

        ---

        **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=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:** `API_LOGGED_IN_EVENTS_CREATE`
      operationId: ClientLoggedIn
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientLoggedIn
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/logged-in \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}"

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

            conn.request("POST", "/v4/events/logged-in", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {}
            });

            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/v4/events/logged-in");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/logged-in",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/logged-in');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}');

            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/v4/events/logged-in")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}")
              .asString();
  /v4/events/logged-out:
    post:
      summary: Profile logged out
      description: |
        Send a 'profile logged out' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.

        When you send an event to this endpoint, the `action` field is set to `client.logout` by the backend.

        ---

        **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=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:** `API_LOGGED_OUT_EVENTS_CREATE`
      operationId: ClientLoggedOut
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientLoggedOut
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/logged-out \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}"

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

            conn.request("POST", "/v4/events/logged-out", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {}
            });

            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/v4/events/logged-out");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/logged-out",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/logged-out');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}');

            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/v4/events/logged-out")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}")
              .asString();
  /v4/events/added-to-cart:
    post:
      summary: Item added to cart
      description: |
        Send an 'item added to cart' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.


        When you send an event to this endpoint, the `action` field is set to `product.addToCart` by the backend.

        ---

        **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=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:** `API_ADDED_TO_CART_EVENTS_CREATE`
      operationId: ClientAddedProductToCart
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-ClientCartEventRequest-apiv4"
        required: true
      responses:
        "202":
          description: Accepted
        "400":
          description: "Bad request: input data missing or malformed"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                error: Bad Request
                status: 400
                timestamp: 2018-06-07T09:55:20.563Z
                message: Some fields did not pass validation
                path: /events/added-to-cart
                errors:
                  - path: label
                    message: cannot be empty
                    rejectedValue: ""
                  - path: label
                    message: length must be between 1 and 64
                    rejectedValue: ""
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientAddedProductToCart
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/added-to-cart \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"sku":"189784563455","name":"Soft drink","category":"Beverages","categories":["string"],"offline":true,"source":"MOBILE","regularUnitPrice":{"amount":0,"currency":"USD"},"discountedUnitPrice":{"amount":0,"currency":"USD"},"finalUnitPrice":{"amount":3.25,"currency":"USD"},"ItemUrlAddress":"string","producer":"string","quantity":0}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"sku\":\"189784563455\",\"name\":\"Soft drink\",\"category\":\"Beverages\",\"categories\":[\"string\"],\"offline\":true,\"source\":\"MOBILE\",\"regularUnitPrice\":{\"amount\":0,\"currency\":\"USD\"},\"discountedUnitPrice\":{\"amount\":0,\"currency\":\"USD\"},\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"ItemUrlAddress\":\"string\",\"producer\":\"string\",\"quantity\":0}}"

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

            conn.request("POST", "/v4/events/added-to-cart", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {
                "sku": "189784563455",
                "name": "Soft drink",
                "category": "Beverages",
                "categories": [
                  "string"
                ],
                "offline": true,
                "source": "MOBILE",
                "regularUnitPrice": {
                  "amount": 0,
                  "currency": "USD"
                },
                "discountedUnitPrice": {
                  "amount": 0,
                  "currency": "USD"
                },
                "finalUnitPrice": {
                  "amount": 3.25,
                  "currency": "USD"
                },
                "ItemUrlAddress": "string",
                "producer": "string",
                "quantity": 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/v4/events/added-to-cart");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/added-to-cart",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {
                sku: '189784563455',
                name: 'Soft drink',
                category: 'Beverages',
                categories: ['string'],
                offline: true,
                source: 'MOBILE',
                regularUnitPrice: {amount: 0, currency: 'USD'},
                discountedUnitPrice: {amount: 0, currency: 'USD'},
                finalUnitPrice: {amount: 3.25, currency: 'USD'},
                ItemUrlAddress: 'string',
                producer: 'string',
                quantity: 0
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/added-to-cart');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"sku":"189784563455","name":"Soft drink","category":"Beverages","categories":["string"],"offline":true,"source":"MOBILE","regularUnitPrice":{"amount":0,"currency":"USD"},"discountedUnitPrice":{"amount":0,"currency":"USD"},"finalUnitPrice":{"amount":3.25,"currency":"USD"},"ItemUrlAddress":"string","producer":"string","quantity":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/v4/events/added-to-cart")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"sku\":\"189784563455\",\"name\":\"Soft drink\",\"category\":\"Beverages\",\"categories\":[\"string\"],\"offline\":true,\"source\":\"MOBILE\",\"regularUnitPrice\":{\"amount\":0,\"currency\":\"USD\"},\"discountedUnitPrice\":{\"amount\":0,\"currency\":\"USD\"},\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"ItemUrlAddress\":\"string\",\"producer\":\"string\",\"quantity\":0}}")
              .asString();
  /v4/events/removed-from-cart:
    post:
      summary: Item removed from cart
      description: |
        Send an 'item removed from cart' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.


        When you send an event to this endpoint, the `action` field is set to `product.removeFromCart` by the backend.

        ---

        **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=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:** `API_REMOVED_FROM_CART_EVENTS_CREATE`
      operationId: ClientRemovedProductFromCart
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-ClientCartEventRequest-apiv4"
        required: true
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientRemovedProductFromCart
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/removed-from-cart \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"sku":"189784563455","name":"Soft drink","category":"Beverages","categories":["string"],"offline":true,"source":"MOBILE","regularUnitPrice":{"amount":0,"currency":"USD"},"discountedUnitPrice":{"amount":0,"currency":"USD"},"finalUnitPrice":{"amount":3.25,"currency":"USD"},"ItemUrlAddress":"string","producer":"string","quantity":0}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"sku\":\"189784563455\",\"name\":\"Soft drink\",\"category\":\"Beverages\",\"categories\":[\"string\"],\"offline\":true,\"source\":\"MOBILE\",\"regularUnitPrice\":{\"amount\":0,\"currency\":\"USD\"},\"discountedUnitPrice\":{\"amount\":0,\"currency\":\"USD\"},\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"ItemUrlAddress\":\"string\",\"producer\":\"string\",\"quantity\":0}}"

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

            conn.request("POST", "/v4/events/removed-from-cart", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {
                "sku": "189784563455",
                "name": "Soft drink",
                "category": "Beverages",
                "categories": [
                  "string"
                ],
                "offline": true,
                "source": "MOBILE",
                "regularUnitPrice": {
                  "amount": 0,
                  "currency": "USD"
                },
                "discountedUnitPrice": {
                  "amount": 0,
                  "currency": "USD"
                },
                "finalUnitPrice": {
                  "amount": 3.25,
                  "currency": "USD"
                },
                "ItemUrlAddress": "string",
                "producer": "string",
                "quantity": 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/v4/events/removed-from-cart");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/removed-from-cart",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {
                sku: '189784563455',
                name: 'Soft drink',
                category: 'Beverages',
                categories: ['string'],
                offline: true,
                source: 'MOBILE',
                regularUnitPrice: {amount: 0, currency: 'USD'},
                discountedUnitPrice: {amount: 0, currency: 'USD'},
                finalUnitPrice: {amount: 3.25, currency: 'USD'},
                ItemUrlAddress: 'string',
                producer: 'string',
                quantity: 0
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/removed-from-cart');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"sku":"189784563455","name":"Soft drink","category":"Beverages","categories":["string"],"offline":true,"source":"MOBILE","regularUnitPrice":{"amount":0,"currency":"USD"},"discountedUnitPrice":{"amount":0,"currency":"USD"},"finalUnitPrice":{"amount":3.25,"currency":"USD"},"ItemUrlAddress":"string","producer":"string","quantity":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/v4/events/removed-from-cart")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"sku\":\"189784563455\",\"name\":\"Soft drink\",\"category\":\"Beverages\",\"categories\":[\"string\"],\"offline\":true,\"source\":\"MOBILE\",\"regularUnitPrice\":{\"amount\":0,\"currency\":\"USD\"},\"discountedUnitPrice\":{\"amount\":0,\"currency\":\"USD\"},\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"ItemUrlAddress\":\"string\",\"producer\":\"string\",\"quantity\":0}}")
              .asString();
  /v4/events/added-to-favorites:
    post:
      summary: Product added to favorites
      description: |
        Send an 'item added to favorites' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.


        When you send an event to this endpoint, the `action` field is set to `product.addToFavorite` by the backend.

        ---

        **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=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:** `API_ADDED_TO_FAVORITES_EVENTS_CREATE`
      operationId: ClientAddedProductToFavorites
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
        required: true
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientAddedProductToFavorites
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/added-to-favorites \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}"

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

            conn.request("POST", "/v4/events/added-to-favorites", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {}
            });

            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/v4/events/added-to-favorites");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/added-to-favorites",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/added-to-favorites');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}');

            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/v4/events/added-to-favorites")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}")
              .asString();
  /v4/events/product-view:
    post:
      summary: Item viewed
      description: |
        Send an 'item viewed' event.

        When you send an event to this endpoint, the `action` field is set to `product.view` by the backend.

        ---

        **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=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:** `API_PRODUCT_VIEW_EVENTS_CREATE`
      operationId: ClientViewedProduct
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      type: object
                      additionalProperties: true
                      description: |
                        Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

                        Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

                          <span style="color:red"><strong>WARNING:</strong></span>
                          - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
                          - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
                          <code>modifiedBy</code><br>
                          <code>apiKey</code><br>
                          <code>eventUUID</code><br>
                          <code>ip</code><br>
                          <code>time</code><br>
                          <code>businessProfileId</code>
                      properties:
                        productId:
                          $ref: "#/components/schemas/api-service-ItemSku-apiv4"
                        name:
                          $ref: "#/components/schemas/api-service-ItemName-apiv4"
                        fromRecommendation:
                          $ref: "#/components/schemas/api-service-FromRecommendation-apiv4"
                        source:
                          $ref: "#/components/schemas/api-service-eventSource-apiv4"
                        category:
                          $ref: "#/components/schemas/api-service-ItemCategory-apiv4"
                        url:
                          $ref: "#/components/schemas/api-service-ItemUrlAddress-apiv4"
                        campaignHash:
                          $ref: "#/components/schemas/api-service-CampaignHash-apiv4"
        required: true
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientViewedProduct
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/product-view \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"productId":"189784563455","name":"Soft drink","fromRecommendation":true,"source":"MOBILE","category":"Beverages","url":"string","campaignHash":"21e0d4b0-bd4e-497b-817b-4fr660284918"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"productId\":\"189784563455\",\"name\":\"Soft drink\",\"fromRecommendation\":true,\"source\":\"MOBILE\",\"category\":\"Beverages\",\"url\":\"string\",\"campaignHash\":\"21e0d4b0-bd4e-497b-817b-4fr660284918\"}}"

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

            conn.request("POST", "/v4/events/product-view", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {
                "productId": "189784563455",
                "name": "Soft drink",
                "fromRecommendation": true,
                "source": "MOBILE",
                "category": "Beverages",
                "url": "string",
                "campaignHash": "21e0d4b0-bd4e-497b-817b-4fr660284918"
              }
            });

            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/v4/events/product-view");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/product-view",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {
                productId: '189784563455',
                name: 'Soft drink',
                fromRecommendation: true,
                source: 'MOBILE',
                category: 'Beverages',
                url: 'string',
                campaignHash: '21e0d4b0-bd4e-497b-817b-4fr660284918'
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/product-view');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"productId":"189784563455","name":"Soft drink","fromRecommendation":true,"source":"MOBILE","category":"Beverages","url":"string","campaignHash":"21e0d4b0-bd4e-497b-817b-4fr660284918"}}');

            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/v4/events/product-view")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"productId\":\"189784563455\",\"name\":\"Soft drink\",\"fromRecommendation\":true,\"source\":\"MOBILE\",\"category\":\"Beverages\",\"url\":\"string\",\"campaignHash\":\"21e0d4b0-bd4e-497b-817b-4fr660284918\"}}")
              .asString();
  /v4/events/assigned-to-company:
    post:
      summary: Profile assigned to company
      description: |
        Send a 'profile assigned to company' event.

        When you send an event to this endpoint, the `action` field is set to `client.assignToCompany` by the backend.

        ---

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

        **User role permission required:** `client_activities: create`
      operationId: ClientAssignedToCompany
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  required:
                    - params
                  properties:
                    params:
                      type: object
                      additionalProperties: true
                      description: |
                        Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

                        Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

                          <span style="color:red"><strong>WARNING:</strong></span>
                          - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
                          - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
                          <code>modifiedBy</code><br>
                          <code>apiKey</code><br>
                          <code>eventUUID</code><br>
                          <code>ip</code><br>
                          <code>time</code><br>
                          <code>businessProfileId</code>
                      properties:
                        companyId:
                          type: number
                          description: Company ID
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientAssignedToCompany
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/assigned-to-company \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"companyId":0}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"companyId\":0}}"

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

            conn.request("POST", "/v4/events/assigned-to-company", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {
                "companyId": 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/v4/events/assigned-to-company");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/assigned-to-company",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {companyId: 0}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/assigned-to-company');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"companyId":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/v4/events/assigned-to-company")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"companyId\":0}}")
              .asString();
  /v4/events/appeared-in-location:
    post:
      summary: Profile logged location
      description: |
        Send an event when a profile submits its location. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.

        When you send an event to this endpoint, the `action` field is set to `client.location` by the backend.

        ---

        **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=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:** `API_APPEARED_IN_LOCATION_EVENTS_CREATE`
      operationId: ClientAppearedInLocation
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      type: object
                      additionalProperties: true
                      description: |
                        Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

                        Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

                          <span style="color:red"><strong>WARNING:</strong></span>
                          - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
                          - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
                          <code>modifiedBy</code><br>
                          <code>apiKey</code><br>
                          <code>eventUUID</code><br>
                          <code>ip</code><br>
                          <code>time</code><br>
                          <code>businessProfileId</code>
                      required:
                        - lat
                        - lon
                      properties:
                        lat:
                          type: number
                          description: Latitude
                          example: 50.021102
                        lon:
                          type: number
                          description: Longitude
                          example: 19.886218
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientAppearedInLocation
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/appeared-in-location \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"lat":50.021102,"lon":19.886218}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"lat\":50.021102,\"lon\":19.886218}}"

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

            conn.request("POST", "/v4/events/appeared-in-location", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {
                "lat": 50.021102,
                "lon": 19.886218
              }
            });

            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/v4/events/appeared-in-location");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/appeared-in-location",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {lat: 50.021102, lon: 19.886218}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/appeared-in-location');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"lat":50.021102,"lon":19.886218}}');

            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/v4/events/appeared-in-location")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"lat\":50.021102,\"lon\":19.886218}}")
              .asString();
  /v4/events/push/received:
    post:
      summary: Push notification received
      description: |
        Record a 'push notification was received' event. It is used for push message interaction tracking.

        This endpoint is available from API version 4.1.2.

        When you send an event to this endpoint, the `action` field is set to `push.receiveInBackground` by the backend.

        ---

        **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=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:** `API_PUSH_RECIVED_EVENTS_CREATE`
      operationId: ClientReceivedPushNotification
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientReceivedPushNotification
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/push/received \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}"

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

            conn.request("POST", "/v4/events/push/received", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {}
            });

            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/v4/events/push/received");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/push/received",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/push/received');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}');

            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/v4/events/push/received")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}")
              .asString();
  /v4/events/push/viewed:
    post:
      summary: Push notification viewed
      description: |
        Record a 'push notification was viewed' event. It is used for push message interaction tracking.

        When you send an event to this endpoint, the `action` field is set to `push.view` by the backend.

        ---

        **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=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:** `API_PUSH_VIEWED_EVENTS_CREATE`
      operationId: ClientViewedPushNotification
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientViewedPushNotification
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/push/viewed \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}"

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

            conn.request("POST", "/v4/events/push/viewed", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {}
            });

            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/v4/events/push/viewed");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/push/viewed",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/push/viewed');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}');

            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/v4/events/push/viewed")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}")
              .asString();
  /v4/events/push/clicked:
    post:
      summary: Push notification clicked
      description: |
        Send a 'Push notification was clicked' event. It's used for push message interaction tracking.

        When you send an event to this endpoint, the `action` field is set to `push.click` by the backend.

        ---

        **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=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:** `API_PUSH_CLICKED_EVENTS_CREATE`
      operationId: ClientClickedPushNotification
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientClickedPushNotification
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/push/clicked \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}"

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

            conn.request("POST", "/v4/events/push/clicked", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {}
            });

            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/v4/events/push/clicked");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/push/clicked",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/push/clicked');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}');

            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/v4/events/push/clicked")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}")
              .asString();
  /v4/events/push/cancelled:
    post:
      summary: Push notifications cancelled
      description: |
        Send a 'push notifications cancelled' event. It's used for push message interaction tracking.

        When you send an event to this endpoint, the `action` field is set to `push.cancel` by the backend.

        ---

        **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=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:** `API_PUSH_CANCELLED_EVENTS_CREATE`
      operationId: ClientCancelledPushNotifications
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientCancelledPushNotifications
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/push/cancelled \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}"

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

            conn.request("POST", "/v4/events/push/cancelled", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {}
            });

            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/v4/events/push/cancelled");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/push/cancelled",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/push/cancelled');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}');

            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/v4/events/push/cancelled")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}")
              .asString();
  /v4/events/cancelled-transaction:
    post:
      summary: Transaction cancelled
      description: |
        Send a 'transaction cancelled' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.

        When you send an event to this endpoint, the `action` field is set to `transaction.cancel` by the backend.

        ---

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

        **API key permission required:** `API_CANCELLED_TRANSACTION_EVENTS_CREATE`
      operationId: ClientCancelledTransaction
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      type: object
                      description: |
                        Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

                        Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

                          <span style="color:red"><strong>WARNING:</strong></span>
                          - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
                          - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
                          <code>modifiedBy</code><br>
                          <code>apiKey</code><br>
                          <code>eventUUID</code><br>
                          <code>ip</code><br>
                          <code>time</code><br>
                          <code>businessProfileId</code>
                      additionalProperties: true
                      properties:
                        orderId:
                          $ref: "#/components/schemas/api-service-OrderId-apiv4"
                        orderStatus:
                          $ref: "#/components/schemas/api-service-OrderStatus-apiv4"
                        discountAmount:
                          $ref: "#/components/schemas/api-service-DiscountAmount-apiv4"
                        discountPercent:
                          $ref: "#/components/schemas/api-service-DiscountPercent-apiv4"
                        discountCode:
                          $ref: "#/components/schemas/api-service-DiscountCode-apiv4"
                        value:
                          $ref: "#/components/schemas/api-service-Value-apiv4"
                        revenue:
                          $ref: "#/components/schemas/api-service-Revenue-apiv4"
                        products:
                          $ref: "#/components/schemas/api-service-Products-apiv4"
                        source:
                          $ref: "#/components/schemas/api-service-eventSource-apiv4"
                        paymentInfo:
                          $ref: "#/components/schemas/api-service-PaymentInfo-apiv4"
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientCancelledTransaction
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/cancelled-transaction \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"orderId":"be466362-71e9-4bdd-ad11-bfacead5276b","orderStatus":"string","discountAmount":{"amount":0,"currency":"USD"},"discountPercent":0.1,"discountCode":"string","value":{"amount":112.25,"currency":"USD"},"revenue":{"amount":64.25,"currency":"USD"},"products":[{"finalUnitPrice":{"amount":3.25,"currency":"USD"},"name":"Soft drink","sku":"189784563455","categories":["string"],"image":"string","url":"string","netUnitPrice":{"amount":3.25,"currency":"USD"},"tax":0.1,"quantity":2.5,"regularPrice":{"amount":3.25,"currency":"USD"},"discountPrice":{"amount":15.5,"currency":"USD"},"discountPercent":0.1,"property1":null,"property2":null}],"source":"MOBILE","paymentInfo":{"method":"CASH"}}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"orderId\":\"be466362-71e9-4bdd-ad11-bfacead5276b\",\"orderStatus\":\"string\",\"discountAmount\":{\"amount\":0,\"currency\":\"USD\"},\"discountPercent\":0.1,\"discountCode\":\"string\",\"value\":{\"amount\":112.25,\"currency\":\"USD\"},\"revenue\":{\"amount\":64.25,\"currency\":\"USD\"},\"products\":[{\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"name\":\"Soft drink\",\"sku\":\"189784563455\",\"categories\":[\"string\"],\"image\":\"string\",\"url\":\"string\",\"netUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"tax\":0.1,\"quantity\":2.5,\"regularPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"discountPrice\":{\"amount\":15.5,\"currency\":\"USD\"},\"discountPercent\":0.1,\"property1\":null,\"property2\":null}],\"source\":\"MOBILE\",\"paymentInfo\":{\"method\":\"CASH\"}}}"

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

            conn.request("POST", "/v4/events/cancelled-transaction", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {
                "orderId": "be466362-71e9-4bdd-ad11-bfacead5276b",
                "orderStatus": "string",
                "discountAmount": {
                  "amount": 0,
                  "currency": "USD"
                },
                "discountPercent": 0.1,
                "discountCode": "string",
                "value": {
                  "amount": 112.25,
                  "currency": "USD"
                },
                "revenue": {
                  "amount": 64.25,
                  "currency": "USD"
                },
                "products": [
                  {
                    "finalUnitPrice": {
                      "amount": 3.25,
                      "currency": "USD"
                    },
                    "name": "Soft drink",
                    "sku": "189784563455",
                    "categories": [
                      "string"
                    ],
                    "image": "string",
                    "url": "string",
                    "netUnitPrice": {
                      "amount": 3.25,
                      "currency": "USD"
                    },
                    "tax": 0.1,
                    "quantity": 2.5,
                    "regularPrice": {
                      "amount": 3.25,
                      "currency": "USD"
                    },
                    "discountPrice": {
                      "amount": 15.5,
                      "currency": "USD"
                    },
                    "discountPercent": 0.1,
                    "property1": null,
                    "property2": null
                  }
                ],
                "source": "MOBILE",
                "paymentInfo": {
                  "method": "CASH"
                }
              }
            });

            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/v4/events/cancelled-transaction");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/cancelled-transaction",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {
                orderId: 'be466362-71e9-4bdd-ad11-bfacead5276b',
                orderStatus: 'string',
                discountAmount: {amount: 0, currency: 'USD'},
                discountPercent: 0.1,
                discountCode: 'string',
                value: {amount: 112.25, currency: 'USD'},
                revenue: {amount: 64.25, currency: 'USD'},
                products: [
                  {
                    finalUnitPrice: {amount: 3.25, currency: 'USD'},
                    name: 'Soft drink',
                    sku: '189784563455',
                    categories: ['string'],
                    image: 'string',
                    url: 'string',
                    netUnitPrice: {amount: 3.25, currency: 'USD'},
                    tax: 0.1,
                    quantity: 2.5,
                    regularPrice: {amount: 3.25, currency: 'USD'},
                    discountPrice: {amount: 15.5, currency: 'USD'},
                    discountPercent: 0.1,
                    property1: null,
                    property2: null
                  }
                ],
                source: 'MOBILE',
                paymentInfo: {method: 'CASH'}
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/cancelled-transaction');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"orderId":"be466362-71e9-4bdd-ad11-bfacead5276b","orderStatus":"string","discountAmount":{"amount":0,"currency":"USD"},"discountPercent":0.1,"discountCode":"string","value":{"amount":112.25,"currency":"USD"},"revenue":{"amount":64.25,"currency":"USD"},"products":[{"finalUnitPrice":{"amount":3.25,"currency":"USD"},"name":"Soft drink","sku":"189784563455","categories":["string"],"image":"string","url":"string","netUnitPrice":{"amount":3.25,"currency":"USD"},"tax":0.1,"quantity":2.5,"regularPrice":{"amount":3.25,"currency":"USD"},"discountPrice":{"amount":15.5,"currency":"USD"},"discountPercent":0.1,"property1":null,"property2":null}],"source":"MOBILE","paymentInfo":{"method":"CASH"}}}');

            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/v4/events/cancelled-transaction")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"orderId\":\"be466362-71e9-4bdd-ad11-bfacead5276b\",\"orderStatus\":\"string\",\"discountAmount\":{\"amount\":0,\"currency\":\"USD\"},\"discountPercent\":0.1,\"discountCode\":\"string\",\"value\":{\"amount\":112.25,\"currency\":\"USD\"},\"revenue\":{\"amount\":64.25,\"currency\":\"USD\"},\"products\":[{\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"name\":\"Soft drink\",\"sku\":\"189784563455\",\"categories\":[\"string\"],\"image\":\"string\",\"url\":\"string\",\"netUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"tax\":0.1,\"quantity\":2.5,\"regularPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"discountPrice\":{\"amount\":15.5,\"currency\":\"USD\"},\"discountPercent\":0.1,\"property1\":null,\"property2\":null}],\"source\":\"MOBILE\",\"paymentInfo\":{\"method\":\"CASH\"}}}")
              .asString();
  /v4/events/hit-timer:
    post:
      summary: Timer hit
      description: |
        Send a 'timer' event.


        Timers are used for analytics. For example, if you send a event when a profiles starts doing something and another one when they finish, you can collect data about average activity time. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.


        When you send an event to this endpoint, the `action` field is set to `client.hitTimer` by the backend.

        ---

        **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=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:** `API_HIT_TIMER_EVENTS_CREATE`
      operationId: ClientHitTimer
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
        required: true
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientHitTimer
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/hit-timer \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}"

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

            conn.request("POST", "/v4/events/hit-timer", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {}
            });

            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/v4/events/hit-timer");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/hit-timer",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/hit-timer');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}');

            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/v4/events/hit-timer")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}")
              .asString();
  /v4/events/searched:
    post:
      summary: Search requested
      description: |
        Send a 'search requested' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.


        When you send an event to this endpoint, the `action` field is set to `client.search` by the backend.

        ---

        **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=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:** `API_SEARCHED_EVENTS_CREATE`
      operationId: ClientSearched
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
        required: true
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientSearched
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/searched \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}"

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

            conn.request("POST", "/v4/events/searched", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {}
            });

            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/v4/events/searched");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/searched",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}');

            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/v4/events/searched")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}")
              .asString();
  /v4/events/shared:
    post:
      summary: Content shared
      description: |
        Send a 'content shared' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.


        When you send an event to this endpoint, the `action` field is set to `client.shared` by the backend.

        ---

        **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=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:** `API_SHARED_EVENTS_CREATE`
      operationId: ClientShared
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientShared
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/shared \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}"

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

            conn.request("POST", "/v4/events/shared", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {}
            });

            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/v4/events/shared");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/shared",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}');

            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/v4/events/shared")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}")
              .asString();
  /v4/events/recommendation-seen:
    post:
      summary: Recommendation viewed
      deprecated: true
      description: |
        This endpoint is deprecated. Use the [AI Events](https://developers.synerise.com/DataManagement/DataManagement.html#tag/AI-Events) endpoints instead.

        Send a 'recommendation was viewed' event.


        When you send an event to this endpoint, the `action` field is set to `recommendation.view` by the backend.

        ---

        **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=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>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <span title="Deprecated">AI API key (legacy)</span>

        **API key permission required:** `API_RECOMENDATION_SEEN_EVENTS_CREATE`
      operationId: RecommendationSeen
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      $ref: "#/components/schemas/api-service-recommendationEventParams-apiv4"
        required: true
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/RecommendationSeen
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/recommendation-seen \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"productId":"189784563455","name":"Soft drink","source":"MOBILE","campaignHash":"21e0d4b0-bd4e-497b-817b-4fr660284918","url":"string","category":"Beverages"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"productId\":\"189784563455\",\"name\":\"Soft drink\",\"source\":\"MOBILE\",\"campaignHash\":\"21e0d4b0-bd4e-497b-817b-4fr660284918\",\"url\":\"string\",\"category\":\"Beverages\"}}"

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

            conn.request("POST", "/v4/events/recommendation-seen", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {
                "productId": "189784563455",
                "name": "Soft drink",
                "source": "MOBILE",
                "campaignHash": "21e0d4b0-bd4e-497b-817b-4fr660284918",
                "url": "string",
                "category": "Beverages"
              }
            });

            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/v4/events/recommendation-seen");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/recommendation-seen",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {
                productId: '189784563455',
                name: 'Soft drink',
                source: 'MOBILE',
                campaignHash: '21e0d4b0-bd4e-497b-817b-4fr660284918',
                url: 'string',
                category: 'Beverages'
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/recommendation-seen');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"productId":"189784563455","name":"Soft drink","source":"MOBILE","campaignHash":"21e0d4b0-bd4e-497b-817b-4fr660284918","url":"string","category":"Beverages"}}');

            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/v4/events/recommendation-seen")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"productId\":\"189784563455\",\"name\":\"Soft drink\",\"source\":\"MOBILE\",\"campaignHash\":\"21e0d4b0-bd4e-497b-817b-4fr660284918\",\"url\":\"string\",\"category\":\"Beverages\"}}")
              .asString();
  /v4/events/recommendation-click:
    post:
      summary: Recommendation clicked
      deprecated: true
      description: |
        Send a 'recommendation clicked' event.
        This endpoint is deprecated. Use the [AI Events](https://developers.synerise.com/DataManagement/DataManagement.html#tag/AI-Events) endpoints instead.


        When you send an event to this endpoint, the `action` field is set to `recommendation.click` by the backend.

        ---

        **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=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>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <span title="Deprecated">AI API key (legacy)</span>

        **API key permission required:** `API_RECOMMENDATION_CLICK_EVENTS_CREATE`
      operationId: RecommendationClicked
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      $ref: "#/components/schemas/api-service-recommendationEventParams-apiv4"
        required: true
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/RecommendationClicked
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/recommendation-click \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"productId":"189784563455","name":"Soft drink","source":"MOBILE","campaignHash":"21e0d4b0-bd4e-497b-817b-4fr660284918","url":"string","category":"Beverages"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"productId\":\"189784563455\",\"name\":\"Soft drink\",\"source\":\"MOBILE\",\"campaignHash\":\"21e0d4b0-bd4e-497b-817b-4fr660284918\",\"url\":\"string\",\"category\":\"Beverages\"}}"

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

            conn.request("POST", "/v4/events/recommendation-click", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {
                "productId": "189784563455",
                "name": "Soft drink",
                "source": "MOBILE",
                "campaignHash": "21e0d4b0-bd4e-497b-817b-4fr660284918",
                "url": "string",
                "category": "Beverages"
              }
            });

            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/v4/events/recommendation-click");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/recommendation-click",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {
                productId: '189784563455',
                name: 'Soft drink',
                source: 'MOBILE',
                campaignHash: '21e0d4b0-bd4e-497b-817b-4fr660284918',
                url: 'string',
                category: 'Beverages'
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/recommendation-click');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"productId":"189784563455","name":"Soft drink","source":"MOBILE","campaignHash":"21e0d4b0-bd4e-497b-817b-4fr660284918","url":"string","category":"Beverages"}}');

            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/v4/events/recommendation-click")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"productId\":\"189784563455\",\"name\":\"Soft drink\",\"source\":\"MOBILE\",\"campaignHash\":\"21e0d4b0-bd4e-497b-817b-4fr660284918\",\"url\":\"string\",\"category\":\"Beverages\"}}")
              .asString();
  /v4/events/visited-screen:
    post:
      summary: Mobile app screen visited
      description: |
        Send a 'screen in a mobile app was visited' event. This can be used for mobile screen usage tracking. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.

        When you send an event to this endpoint, the `action` field is set to `screen.view` by the backend.

        ---

        **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=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:** `API_VISITED_SCREEN_EVENTS_CREATE`
      operationId: ClientVisitedScreen
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientVisitedScreen
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/visited-screen \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}"

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

            conn.request("POST", "/v4/events/visited-screen", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {}
            });

            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/v4/events/visited-screen");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/visited-screen",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/visited-screen');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}');

            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/v4/events/visited-screen")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}")
              .asString();
  /v4/events/custom:
    post:
      summary: Custom event
      description: |
        Send a custom event.

        <span style="color:red"><strong>WARNING:</strong></span> This endpoint doesn't create `product.buy` events from `transaction.charge` events! Use [Create a transaction](#operation/CreateATransaction) or [Batch add or update transactions](#operation/BatchAddOrUpdateTransactions) instead.

        If you don't have a value for a field, omit that field. Do not send null values.


        ---

        **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=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>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `API_CUSTOM_EVENTS_CREATE`

        **User role permission required:** `client_activities: create`
      operationId: CustomEvent
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  required:
                    - action
                  properties:
                    action:
                      $ref: "#/components/schemas/api-service-EventAction-apiv4"
                    params:
                      $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/CustomEvent
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/custom \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","action":"context.action","params":{}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"action\":\"context.action\",\"params\":{}}"

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

            conn.request("POST", "/v4/events/custom", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "action": "context.action",
              "params": {}
            });

            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/v4/events/custom");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/custom",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              action: 'context.action',
              params: {}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","action":"context.action","params":{}}');

            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/v4/events/custom")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"action\":\"context.action\",\"params\":{}}")
              .asString();
  /v4/events/batch:
    post:
      summary: Batch send events
      description: |
        Send a batch of events as an array of objects. You can send up to a 1000 events and the size of the request can't be more than 1 MB.

        <span style="color:red"><strong>WARNING:</strong></span> This endpoint doesn't create `product.buy` events from `transaction.charge` events! Use [Create a transaction](#operation/CreateATransaction) or [Batch add or update transactions](#operation/BatchAddOrUpdateTransactions) instead.

        If you don't have a value for a field, omit that field. Do not
        send null values.


        ---

        **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=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:** `API_BATCH_EVENTS_CREATE`
      operationId: BatchSendEvents
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: <span style="color:red"><strong>IMPORTANT:</strong> In a request, all events must use the same type of profile identifier. For example, if you want to send some events identified by email and others by customId, you must send them in separate batches.<span>
        content:
          application/json:
            schema:
              type: array
              maxItems: 1000
              items:
                anyOf:
                  - title: Custom event
                    allOf:
                      - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                      - type: object
                        required:
                          - action
                          - type
                        properties:
                          type:
                            $ref: "#/components/schemas/api-service-EventType-apiv4"
                          action:
                            $ref: "#/components/schemas/api-service-EventAction-apiv4"
                          params:
                            $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
                  - title: Pre-defined event
                    allOf:
                      - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                      - type: object
                        required:
                          - type
                        properties:
                          type:
                            $ref: "#/components/schemas/api-service-EventType-apiv4"
                          params:
                            $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
        required: true
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/BatchSendEvents
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/batch \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '[{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","type":"string","action":"context.action","params":{}}]'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "[{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"type\":\"string\",\"action\":\"context.action\",\"params\":{}}]"

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

            conn.request("POST", "/v4/events/batch", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              {
                "label": "Human-readable label",
                "client": {
                  "customId": "string",
                  "id": 433230297,
                  "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                  "email": "string"
                },
                "time": "2019-02-07T09:53:56.999+00:00",
                "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
                "type": "string",
                "action": "context.action",
                "params": {}
              }
            ]);

            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/v4/events/batch");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/batch",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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([
              {
                label: 'Human-readable label',
                client: {
                  customId: 'string',
                  id: 433230297,
                  uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                  email: 'string'
                },
                time: '2019-02-07T09:53:56.999+00:00',
                eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
                type: 'string',
                action: 'context.action',
                params: {}
              }
            ]));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('[{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","type":"string","action":"context.action","params":{}}]');

            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/v4/events/batch")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"type\":\"string\",\"action\":\"context.action\",\"params\":{}}]")
              .asString();
  /v4/server/time:
    get:
      summary: Get server time
      description: |
        Get current server time, needed to send events with a correct timestamp.

        ---

        **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=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>

        **Authentication:** Not required
      operationId: getServerTime
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  serverTime:
                    type: string
                    format: date-time
                    description: Current server time in ISO 8601
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/getServerTime
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/server/time \
              --header 'Api-Version: 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 = {
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/server/time", 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/v4/server/time");
            xhr.setRequestHeader("Api-Version", "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": "/v4/server/time",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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/v4/server/time');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Api-Version' => 'SOME_STRING_VALUE',
              '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/v4/server/time")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/auth/refresh/profile:
    get:
      summary: Refresh a Workspace token
      description: |
        Retrieve a refreshed JWT Token to prolong the Workspace session.

        ---

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

        **Authentication:** Not required
      operationId: RefreshABusinessProfileToken
      parameters:
        - $ref: "#/components/parameters/api-service-contentTypeHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      responses:
        "200":
          description: New authorization token
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-JWTtoken-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
      deprecated: true
      security:
        - JWT: []
      tags:
        - Authorization (deprecated)
      x-snr-doc-urls:
        - /api-reference/authorization#tag/Authorization-(deprecated)/operation/RefreshABusinessProfileToken
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/auth/refresh/profile \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = {
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/auth/refresh/profile", 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/v4/auth/refresh/profile");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "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": "/v4/auth/refresh/profile",
              "headers": {
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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/v4/auth/refresh/profile');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              '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/v4/auth/refresh/profile")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/auth/login/profile:
    post:
      summary: Log in as Workspace
      description: |
        This endpoint is deprecated. Use [this endpoint](#operation/profileLogin) instead.

        ---

        **Authentication:** Not required
      operationId: LogInAsBusinessProfile
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              required:
                - apiKey
              type: object
              properties:
                apiKey:
                  type: string
                  description: Workspace (formerly Business Profile) API key
                  example: 64c09614-1b2a-42f7-804d-f647243eb1ab
        required: true
      responses:
        "200":
          description: Workspace authorization token
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-JWTtoken-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
      deprecated: true
      tags:
        - Authorization (deprecated)
      x-snr-doc-urls:
        - /api-reference/authorization#tag/Authorization-(deprecated)/operation/LogInAsBusinessProfile
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/auth/login/profile \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'content-type: application/json' \
              --data '{"apiKey":"64c09614-1b2a-42f7-804d-f647243eb1ab"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"apiKey\":\"64c09614-1b2a-42f7-804d-f647243eb1ab\"}"

            headers = {
                'Api-Version': "SOME_STRING_VALUE",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/auth/login/profile", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "apiKey": "64c09614-1b2a-42f7-804d-f647243eb1ab"
            });

            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/v4/auth/login/profile");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/auth/login/profile",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({apiKey: '64c09614-1b2a-42f7-804d-f647243eb1ab'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/auth/login/profile');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Api-Version' => 'SOME_STRING_VALUE',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"apiKey":"64c09614-1b2a-42f7-804d-f647243eb1ab"}');

            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/v4/auth/login/profile")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("content-type", "application/json")
              .body("{\"apiKey\":\"64c09614-1b2a-42f7-804d-f647243eb1ab\"}")
              .asString();
  /v4/events/ai-compat/batch:
    post:
      security:
        - JWT: []
        - TrackerKey: []
      tags:
        - AI Events
      summary: Batch upload AI events
      description: |
        Upload a batch of events to the AI engine. A request can only include events of one type.

        ---

        **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=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>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <span title="Deprecated">AI API key (legacy)</span>

        **API key permission required:** `API_BATCH_EVENTS_CREATE`
      operationId: publishAiCompatBatchUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-AiCompatBatchEventRequest-apiv4"
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/AI-Events/operation/publishAiCompatBatchUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/ai-compat/batch \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"eventType":"item.search.click","items":[{"correlationId":"string","clientUUID":"07243772-008a-42e1-ba37-c3807cebde8f","position":0,"searchType":"full-text-search","item":"string","EventTimestamp":"2019-02-07T09:53:56.999+00:00","property1":null,"property2":null}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"eventType\":\"item.search.click\",\"items\":[{\"correlationId\":\"string\",\"clientUUID\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"position\":0,\"searchType\":\"full-text-search\",\"item\":\"string\",\"EventTimestamp\":\"2019-02-07T09:53:56.999+00:00\",\"property1\":null,\"property2\":null}]}"

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

            conn.request("POST", "/v4/events/ai-compat/batch", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "eventType": "item.search.click",
              "items": [
                {
                  "correlationId": "string",
                  "clientUUID": "07243772-008a-42e1-ba37-c3807cebde8f",
                  "position": 0,
                  "searchType": "full-text-search",
                  "item": "string",
                  "EventTimestamp": "2019-02-07T09:53:56.999+00:00",
                  "property1": null,
                  "property2": 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/v4/events/ai-compat/batch");
            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": "/v4/events/ai-compat/batch",
              "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({
              eventType: 'item.search.click',
              items: [
                {
                  correlationId: 'string',
                  clientUUID: '07243772-008a-42e1-ba37-c3807cebde8f',
                  position: 0,
                  searchType: 'full-text-search',
                  item: 'string',
                  EventTimestamp: '2019-02-07T09:53:56.999+00:00',
                  property1: null,
                  property2: null
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/ai-compat/batch');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"eventType":"item.search.click","items":[{"correlationId":"string","clientUUID":"07243772-008a-42e1-ba37-c3807cebde8f","position":0,"searchType":"full-text-search","item":"string","EventTimestamp":"2019-02-07T09:53:56.999+00:00","property1":null,"property2":null}]}');

            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/v4/events/ai-compat/batch")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"eventType\":\"item.search.click\",\"items\":[{\"correlationId\":\"string\",\"clientUUID\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"position\":0,\"searchType\":\"full-text-search\",\"item\":\"string\",\"EventTimestamp\":\"2019-02-07T09:53:56.999+00:00\",\"property1\":null,\"property2\":null}]}")
              .asString();
  /v4/events/ai-compat/item.search.click:
    post:
      security:
        - JWT: []
        - TrackerKey: []
      tags:
        - AI Events
      summary: Item clicked in search
      description: |
        Upload an item.search.click event to the AI engine.

        ---

        **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=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>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <span title="Deprecated">AI API key (legacy)</span>

        **API key permission required:** `API_ITEM_SEARCH_CLICK_EVENT_CREATE`
      operationId: publishAiCompatItemSearchClickUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-ItemSearchClickEventDataCompat-apiv4"
      responses:
        "204":
          description: No Content
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/AI-Events/operation/publishAiCompatItemSearchClickUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/ai-compat/item.search.click \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"correlationId":"string","clientUUID":"07243772-008a-42e1-ba37-c3807cebde8f","position":0,"searchType":"full-text-search","item":"string","EventTimestamp":"2019-02-07T09:53:56.999+00:00","property1":null,"property2":null}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"correlationId\":\"string\",\"clientUUID\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"position\":0,\"searchType\":\"full-text-search\",\"item\":\"string\",\"EventTimestamp\":\"2019-02-07T09:53:56.999+00:00\",\"property1\":null,\"property2\":null}"

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

            conn.request("POST", "/v4/events/ai-compat/item.search.click", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "correlationId": "string",
              "clientUUID": "07243772-008a-42e1-ba37-c3807cebde8f",
              "position": 0,
              "searchType": "full-text-search",
              "item": "string",
              "EventTimestamp": "2019-02-07T09:53:56.999+00:00",
              "property1": null,
              "property2": 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/v4/events/ai-compat/item.search.click");
            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": "/v4/events/ai-compat/item.search.click",
              "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({
              correlationId: 'string',
              clientUUID: '07243772-008a-42e1-ba37-c3807cebde8f',
              position: 0,
              searchType: 'full-text-search',
              item: 'string',
              EventTimestamp: '2019-02-07T09:53:56.999+00:00',
              property1: null,
              property2: null
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/ai-compat/item.search.click');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"correlationId":"string","clientUUID":"07243772-008a-42e1-ba37-c3807cebde8f","position":0,"searchType":"full-text-search","item":"string","EventTimestamp":"2019-02-07T09:53:56.999+00:00","property1":null,"property2":null}');

            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/v4/events/ai-compat/item.search.click")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"correlationId\":\"string\",\"clientUUID\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"position\":0,\"searchType\":\"full-text-search\",\"item\":\"string\",\"EventTimestamp\":\"2019-02-07T09:53:56.999+00:00\",\"property1\":null,\"property2\":null}")
              .asString();
  /v4/events/ai-compat/suggestion.search.click:
    post:
      security:
        - JWT: []
        - TrackerKey: []
      tags:
        - AI Events
      summary: Suggestion clicked in search
      description: |
        Upload a suggestion.search.click event to the AI engine.

        ---

        **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=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>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <span title="Deprecated">AI API key (legacy)</span>

        **API key permission required:** `API_SUGGESTION_SEARCH_CLICK_EVENT_CREATE`
      operationId: publishAiCompatSuggestionSearchClickUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-SuggestionSearchClickEventDataCompat-apiv4"
      responses:
        "204":
          description: No Content
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/AI-Events/operation/publishAiCompatSuggestionSearchClickUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/ai-compat/suggestion.search.click \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"correlationId":"string","clientUUID":"07243772-008a-42e1-ba37-c3807cebde8f","position":0,"searchType":"full-text-search","EventTimestamp":"2019-02-07T09:53:56.999+00:00","suggestion":"string","property1":null,"property2":null}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"correlationId\":\"string\",\"clientUUID\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"position\":0,\"searchType\":\"full-text-search\",\"EventTimestamp\":\"2019-02-07T09:53:56.999+00:00\",\"suggestion\":\"string\",\"property1\":null,\"property2\":null}"

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

            conn.request("POST", "/v4/events/ai-compat/suggestion.search.click", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "correlationId": "string",
              "clientUUID": "07243772-008a-42e1-ba37-c3807cebde8f",
              "position": 0,
              "searchType": "full-text-search",
              "EventTimestamp": "2019-02-07T09:53:56.999+00:00",
              "suggestion": "string",
              "property1": null,
              "property2": 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/v4/events/ai-compat/suggestion.search.click");
            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": "/v4/events/ai-compat/suggestion.search.click",
              "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({
              correlationId: 'string',
              clientUUID: '07243772-008a-42e1-ba37-c3807cebde8f',
              position: 0,
              searchType: 'full-text-search',
              EventTimestamp: '2019-02-07T09:53:56.999+00:00',
              suggestion: 'string',
              property1: null,
              property2: null
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/ai-compat/suggestion.search.click');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"correlationId":"string","clientUUID":"07243772-008a-42e1-ba37-c3807cebde8f","position":0,"searchType":"full-text-search","EventTimestamp":"2019-02-07T09:53:56.999+00:00","suggestion":"string","property1":null,"property2":null}');

            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/v4/events/ai-compat/suggestion.search.click")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"correlationId\":\"string\",\"clientUUID\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"position\":0,\"searchType\":\"full-text-search\",\"EventTimestamp\":\"2019-02-07T09:53:56.999+00:00\",\"suggestion\":\"string\",\"property1\":null,\"property2\":null}")
              .asString();
  /v4/events/ai-compat/product.search.click:
    post:
      deprecated: true
      security:
        - JWT: []
        - TrackerKey: []
      tags:
        - AI Events
      summary: Product clicked in search
      description: |
        Upload a product.search.click event to the AI engine.

        ---

        **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=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>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <span title="Deprecated">AI API key (legacy)</span>

        **API key permission required:** `API_PRODUCT_SEARCH_CLICK_EVENT_CREATE`
      operationId: publishAiCompatProductSearchClickUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-ProductSearchClickEventDataCompat-apiv4"
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/AI-Events/operation/publishAiCompatProductSearchClickUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/ai-compat/product.search.click \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"correlationId":"string","clientUUID":"07243772-008a-42e1-ba37-c3807cebde8f","position":0,"searchType":"full-text-search","productId":"string","EventTimestamp":"2019-02-07T09:53:56.999+00:00","property1":null,"property2":null}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"correlationId\":\"string\",\"clientUUID\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"position\":0,\"searchType\":\"full-text-search\",\"productId\":\"string\",\"EventTimestamp\":\"2019-02-07T09:53:56.999+00:00\",\"property1\":null,\"property2\":null}"

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

            conn.request("POST", "/v4/events/ai-compat/product.search.click", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "correlationId": "string",
              "clientUUID": "07243772-008a-42e1-ba37-c3807cebde8f",
              "position": 0,
              "searchType": "full-text-search",
              "productId": "string",
              "EventTimestamp": "2019-02-07T09:53:56.999+00:00",
              "property1": null,
              "property2": 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/v4/events/ai-compat/product.search.click");
            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": "/v4/events/ai-compat/product.search.click",
              "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({
              correlationId: 'string',
              clientUUID: '07243772-008a-42e1-ba37-c3807cebde8f',
              position: 0,
              searchType: 'full-text-search',
              productId: 'string',
              EventTimestamp: '2019-02-07T09:53:56.999+00:00',
              property1: null,
              property2: null
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/ai-compat/product.search.click');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"correlationId":"string","clientUUID":"07243772-008a-42e1-ba37-c3807cebde8f","position":0,"searchType":"full-text-search","productId":"string","EventTimestamp":"2019-02-07T09:53:56.999+00:00","property1":null,"property2":null}');

            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/v4/events/ai-compat/product.search.click")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"correlationId\":\"string\",\"clientUUID\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"position\":0,\"searchType\":\"full-text-search\",\"productId\":\"string\",\"EventTimestamp\":\"2019-02-07T09:53:56.999+00:00\",\"property1\":null,\"property2\":null}")
              .asString();
  /v4/events/ai-compat/recommendation.click:
    post:
      security:
        - JWT: []
        - TrackerKey: []
      tags:
        - AI Events
      summary: Item clicked in recommendation
      description: |
        Upload a recommendation.click event to the AI engine.

        ---

        **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=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>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <span title="Deprecated">AI API key (legacy)</span>

        **API key permission required:** `API_RECOMMENDATION_CLICK_EVENT_CREATE`
      operationId: publishAiCompatRecommendationClickUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-RecommendationClickEventDataCompat-apiv4"
      responses:
        "204":
          description: No Content
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/AI-Events/operation/publishAiCompatRecommendationClickUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/ai-compat/recommendation.click \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"correlationId":"string","clientUUID":"07243772-008a-42e1-ba37-c3807cebde8f","item":"string","campaignId":"string","sessionId":"string","EventTimestamp":"2019-02-07T09:53:56.999+00:00","property1":null,"property2":null}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"correlationId\":\"string\",\"clientUUID\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"item\":\"string\",\"campaignId\":\"string\",\"sessionId\":\"string\",\"EventTimestamp\":\"2019-02-07T09:53:56.999+00:00\",\"property1\":null,\"property2\":null}"

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

            conn.request("POST", "/v4/events/ai-compat/recommendation.click", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "correlationId": "string",
              "clientUUID": "07243772-008a-42e1-ba37-c3807cebde8f",
              "item": "string",
              "campaignId": "string",
              "sessionId": "string",
              "EventTimestamp": "2019-02-07T09:53:56.999+00:00",
              "property1": null,
              "property2": 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/v4/events/ai-compat/recommendation.click");
            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": "/v4/events/ai-compat/recommendation.click",
              "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({
              correlationId: 'string',
              clientUUID: '07243772-008a-42e1-ba37-c3807cebde8f',
              item: 'string',
              campaignId: 'string',
              sessionId: 'string',
              EventTimestamp: '2019-02-07T09:53:56.999+00:00',
              property1: null,
              property2: null
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/ai-compat/recommendation.click');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"correlationId":"string","clientUUID":"07243772-008a-42e1-ba37-c3807cebde8f","item":"string","campaignId":"string","sessionId":"string","EventTimestamp":"2019-02-07T09:53:56.999+00:00","property1":null,"property2":null}');

            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/v4/events/ai-compat/recommendation.click")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"correlationId\":\"string\",\"clientUUID\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"item\":\"string\",\"campaignId\":\"string\",\"sessionId\":\"string\",\"EventTimestamp\":\"2019-02-07T09:53:56.999+00:00\",\"property1\":null,\"property2\":null}")
              .asString();
  /v4/events/ai-compat/recommendation.view:
    post:
      security:
        - JWT: []
        - TrackerKey: []
      tags:
        - AI Events
      summary: Recommendation viewed
      description: |
        Upload a recommendation.view event to the AI engine.

        ---

        **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=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>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <span title="Deprecated">AI API key (legacy)</span>

        **API key permission required:** `API_RECOMMENDATION_VIEW_EVENT_CREATE`
      operationId: publishAiCompatRecommendationViewUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-RecommendationViewEventDataCompat-apiv4"
      responses:
        "204":
          description: No Content
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/AI-Events/operation/publishAiCompatRecommendationViewUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/ai-compat/recommendation.view \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"correlationId":"string","clientUUID":"07243772-008a-42e1-ba37-c3807cebde8f","items":["string"],"EventTimestamp":"2019-02-07T09:53:56.999+00:00","campaignId":"string","property1":null,"property2":null}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"correlationId\":\"string\",\"clientUUID\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"items\":[\"string\"],\"EventTimestamp\":\"2019-02-07T09:53:56.999+00:00\",\"campaignId\":\"string\",\"property1\":null,\"property2\":null}"

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

            conn.request("POST", "/v4/events/ai-compat/recommendation.view", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "correlationId": "string",
              "clientUUID": "07243772-008a-42e1-ba37-c3807cebde8f",
              "items": [
                "string"
              ],
              "EventTimestamp": "2019-02-07T09:53:56.999+00:00",
              "campaignId": "string",
              "property1": null,
              "property2": 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/v4/events/ai-compat/recommendation.view");
            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": "/v4/events/ai-compat/recommendation.view",
              "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({
              correlationId: 'string',
              clientUUID: '07243772-008a-42e1-ba37-c3807cebde8f',
              items: ['string'],
              EventTimestamp: '2019-02-07T09:53:56.999+00:00',
              campaignId: 'string',
              property1: null,
              property2: null
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/ai-compat/recommendation.view');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"correlationId":"string","clientUUID":"07243772-008a-42e1-ba37-c3807cebde8f","items":["string"],"EventTimestamp":"2019-02-07T09:53:56.999+00:00","campaignId":"string","property1":null,"property2":null}');

            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/v4/events/ai-compat/recommendation.view")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"correlationId\":\"string\",\"clientUUID\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"items\":[\"string\"],\"EventTimestamp\":\"2019-02-07T09:53:56.999+00:00\",\"campaignId\":\"string\",\"property1\":null,\"property2\":null}")
              .asString();
  /v4/events/recommendation-view:
    post:
      security:
        - JWT: []
      tags:
        - Events
      summary: Recommendation viewed
      description: |
        A recommendation was displayed to a customer.

        ---

        **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=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>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <span title="Deprecated">AI API key (legacy)</span>

        **API key permission required:** `API_RECOMMENDATION_VIEW_EVENT_CREATE`
      operationId: publishRecommendationViewEventUsingPOST
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-RecommendationViewEventData-apiv4"
      responses:
        "200":
          description: OK
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/publishRecommendationViewEventUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/recommendation-view \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"params":{"items":["string"],"correlationId":"string","campaignId":"string"},"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"params\":{\"items\":[\"string\"],\"correlationId\":\"string\",\"campaignId\":\"string\"},\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\"}"

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

            conn.request("POST", "/v4/events/recommendation-view", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "params": {
                "items": [
                  "string"
                ],
                "correlationId": "string",
                "campaignId": "string"
              },
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00"
            });

            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/v4/events/recommendation-view");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/recommendation-view",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              params: {items: ['string'], correlationId: 'string', campaignId: 'string'},
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/recommendation-view');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"params":{"items":["string"],"correlationId":"string","campaignId":"string"},"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00"}');

            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/v4/events/recommendation-view")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"params\":{\"items\":[\"string\"],\"correlationId\":\"string\",\"campaignId\":\"string\"},\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\"}")
              .asString();
  /v4/events/item-search-click:
    post:
      security:
        - JWT: []
      tags:
        - Events
      summary: Search result clicked
      description: |
        An item in a search result was clicked or tapped.

        ---

        **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=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>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <span title="Deprecated">AI API key (legacy)</span>

        **API key permission required:** `API_ITEM_SEARCH_CLICK_EVENT_CREATE`
      operationId: publishItemSearchClickEventUsingPOST
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-ItemSearchClickEventData-apiv4"
      responses:
        "200":
          description: OK
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/publishItemSearchClickEventUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/item-search-click \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"params":{"item":"string","correlationId":"string","position":0,"searchType":"full-text-search"},"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"params\":{\"item\":\"string\",\"correlationId\":\"string\",\"position\":0,\"searchType\":\"full-text-search\"},\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\"}"

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

            conn.request("POST", "/v4/events/item-search-click", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "params": {
                "item": "string",
                "correlationId": "string",
                "position": 0,
                "searchType": "full-text-search"
              },
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00"
            });

            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/v4/events/item-search-click");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/item-search-click",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              params: {
                item: 'string',
                correlationId: 'string',
                position: 0,
                searchType: 'full-text-search'
              },
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/item-search-click');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"params":{"item":"string","correlationId":"string","position":0,"searchType":"full-text-search"},"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00"}');

            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/v4/events/item-search-click")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"params\":{\"item\":\"string\",\"correlationId\":\"string\",\"position\":0,\"searchType\":\"full-text-search\"},\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\"}")
              .asString();
  /automation-brain/diagrams:
    get:
      security:
        - JWT: []
      tags:
        - Workflows
      summary: Get list of workflows
      operationId: getPaginatedDiagrams
      description: |
        Retrieve a paginated list of workflows.

        ---

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

        **User role permission required:** `automation_2_journeys: read`
      parameters:
        - $ref: "#/components/parameters/automation-brain-page"
        - $ref: "#/components/parameters/automation-brain-limit"
        - $ref: "#/components/parameters/automation-brain-filterByStatus"
        - $ref: "#/components/parameters/automation-brain-sortDiagrams"
        - $ref: "#/components/parameters/automation-brain-sortByDiagrams"
        - $ref: "#/components/parameters/automation-brain-sortingOrder"
        - $ref: "#/components/parameters/automation-brain-search"
        - $ref: "#/components/parameters/automation-brain-directoryId"
      responses:
        "200":
          description: A page of workflows
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-PaginatedDiagrams"
        "400":
          $ref: "#/components/responses/automation-brain-400"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
        "404":
          $ref: "#/components/responses/automation-brain-404"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Workflows/operation/getPaginatedDiagrams
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/automation-brain/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=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", "/automation-brain/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=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/automation-brain/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=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": "/automation-brain/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=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/automation-brain/diagrams');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_NUMBER_VALUE',
              'limit' => 'SOME_NUMBER_VALUE',
              'status' => 'SOME_STRING_VALUE',
              'sort' => 'SOME_STRING_VALUE',
              'sortBy' => 'createdTime:desc',
              'order' => 'SOME_STRING_VALUE',
              'search' => 'SOME_STRING_VALUE',
              'directoryId' => '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/automation-brain/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/v2/diagrams:
    get:
      security:
        - JWT: []
      tags:
        - Workflows
      summary: Get list of workflows
      operationId: getPaginatedDiagramsV2
      description: |
        Retrieve a paginated list of workflows.

        ---

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

        **User role permission required:** `automation_2_journeys: read`
      parameters:
        - $ref: "#/components/parameters/automation-brain-page"
        - $ref: "#/components/parameters/automation-brain-limit50"
        - $ref: "#/components/parameters/automation-brain-filterByStatus"
        - $ref: "#/components/parameters/automation-brain-sortDiagrams"
        - $ref: "#/components/parameters/automation-brain-sortByDiagrams"
        - $ref: "#/components/parameters/automation-brain-sortingOrder"
        - $ref: "#/components/parameters/automation-brain-search"
        - $ref: "#/components/parameters/automation-brain-directoryId"
        - $ref: "#/components/parameters/automation-brain-tagIds"
      responses:
        "200":
          description: A page of workflows
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-PaginatedDiagramsV2"
        "400":
          $ref: "#/components/responses/automation-brain-400"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
        "404":
          $ref: "#/components/responses/automation-brain-404"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Workflows/operation/getPaginatedDiagramsV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/automation-brain/v2/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&tags=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", "/automation-brain/v2/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&tags=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/automation-brain/v2/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&tags=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": "/automation-brain/v2/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&tags=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/automation-brain/v2/diagrams');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_NUMBER_VALUE',
              'limit' => 'SOME_NUMBER_VALUE',
              'status' => 'SOME_STRING_VALUE',
              'sort' => 'SOME_STRING_VALUE',
              'sortBy' => 'createdTime:desc',
              'order' => 'SOME_STRING_VALUE',
              'search' => 'SOME_STRING_VALUE',
              'directoryId' => 'SOME_STRING_VALUE',
              'tags' => '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/automation-brain/v2/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&tags=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/diagrams/{diagramId}/run:
    post:
      security:
        - JWT: []
      tags:
        - Workflows
      summary: Run/resume workflow
      operationId: runAutomationDiagram
      description: |
        Run a or resume workflow.

        ---

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

        **User role permission required:** `automation_2_journeys: execute`
      parameters:
        - $ref: "#/components/parameters/automation-brain-diagramId"
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/automation-brain-DiagramActionRequest"
      responses:
        "200":
          description: Workflow run/resumed or was already running
          content:
            text/plain:
              schema:
                type: string
                enum:
                  - OK
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
        "404":
          $ref: "#/components/responses/automation-brain-404"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Workflows/operation/runAutomationDiagram
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/run \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"scheduleAction":"On"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"scheduleAction\":\"On\"}"

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

            conn.request("POST", "/automation-brain/diagrams/%7BdiagramId%7D/run", payload, headers)

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

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

            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/automation-brain/diagrams/%7BdiagramId%7D/run");
            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": "/automation-brain/diagrams/%7BdiagramId%7D/run",
              "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({scheduleAction: 'On'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/run');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"scheduleAction":"On"}');

            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/automation-brain/diagrams/%7BdiagramId%7D/run")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"scheduleAction\":\"On\"}")
              .asString();
  /automation-brain/diagrams/{diagramId}/pause:
    post:
      security:
        - JWT: []
      tags:
        - Workflows
      summary: Pause workflow
      operationId: pauseAutomationDiagram
      description: |
        Pause a workflow.

        ---

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

        **User role permission required:** `automation_2_journeys: execute`
      parameters:
        - $ref: "#/components/parameters/automation-brain-diagramId"
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/automation-brain-DiagramActionRequest"
      responses:
        "200":
          description: Diagram paused or was already paused
          content:
            text/plain:
              schema:
                type: string
                enum:
                  - OK
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
        "404":
          $ref: "#/components/responses/automation-brain-404"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Workflows/operation/pauseAutomationDiagram
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/pause \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"scheduleAction":"On"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"scheduleAction\":\"On\"}"

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

            conn.request("POST", "/automation-brain/diagrams/%7BdiagramId%7D/pause", payload, headers)

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

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

            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/automation-brain/diagrams/%7BdiagramId%7D/pause");
            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": "/automation-brain/diagrams/%7BdiagramId%7D/pause",
              "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({scheduleAction: 'On'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/pause');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"scheduleAction":"On"}');

            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/automation-brain/diagrams/%7BdiagramId%7D/pause")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"scheduleAction\":\"On\"}")
              .asString();
  /automation-brain/diagrams/{diagramId}/stop:
    post:
      security:
        - JWT: []
      tags:
        - Workflows
      summary: Stop workflow
      operationId: stopAutomationDiagram
      description: |
        Stop a workflow.

        <span style="color:red"><strong>WARNING:</strong> A stopped workflow can't be restarted.</span>


        ---

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

        **User role permission required:** `automation_2_journeys: execute`
      parameters:
        - $ref: "#/components/parameters/automation-brain-diagramId"
      responses:
        "200":
          description: Workflow stopped or was already stopped
          content:
            text/plain:
              schema:
                type: string
                enum:
                  - OK
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
        "404":
          $ref: "#/components/responses/automation-brain-404"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Workflows/operation/stopAutomationDiagram
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/stop \
              --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", "/automation-brain/diagrams/%7BdiagramId%7D/stop", 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/automation-brain/diagrams/%7BdiagramId%7D/stop");
            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": "/automation-brain/diagrams/%7BdiagramId%7D/stop",
              "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/automation-brain/diagrams/%7BdiagramId%7D/stop');
            $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/automation-brain/diagrams/%7BdiagramId%7D/stop")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/diagrams/{diagramId}/schedule-on:
    post:
      security:
        - JWT: []
      tags:
        - Workflows
      summary: Enable schedule for workflow
      operationId: scheduleOnAutomationDiagram
      description: |
        Enable schedule for workflow.

        ---

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

        **User role permission required:** `automation_2_journeys: execute`
      parameters:
        - $ref: "#/components/parameters/automation-brain-diagramId"
      responses:
        "200":
          description: Workflow scheduled or was already scheduled
          content:
            text/plain:
              schema:
                type: string
                enum:
                  - OK
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
        "404":
          $ref: "#/components/responses/automation-brain-404"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Workflows/operation/scheduleOnAutomationDiagram
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-on \
              --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", "/automation-brain/diagrams/%7BdiagramId%7D/schedule-on", 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/automation-brain/diagrams/%7BdiagramId%7D/schedule-on");
            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": "/automation-brain/diagrams/%7BdiagramId%7D/schedule-on",
              "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/automation-brain/diagrams/%7BdiagramId%7D/schedule-on');
            $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/automation-brain/diagrams/%7BdiagramId%7D/schedule-on")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/diagrams/{diagramId}/schedule-off:
    post:
      security:
        - JWT: []
      tags:
        - Workflows
      summary: Disable schedule for workflow
      operationId: scheduleOffAutomationDiagram
      description: |
        Disable schedule for workflow.

        ---

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

        **User role permission required:** `automation_2_journeys: execute`
      parameters:
        - $ref: "#/components/parameters/automation-brain-diagramId"
      responses:
        "200":
          description: Workflow unscheduled or was already unscheduled
          content:
            text/plain:
              schema:
                type: string
                enum:
                  - OK
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
        "404":
          $ref: "#/components/responses/automation-brain-404"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Workflows/operation/scheduleOffAutomationDiagram
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-off \
              --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", "/automation-brain/diagrams/%7BdiagramId%7D/schedule-off", 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/automation-brain/diagrams/%7BdiagramId%7D/schedule-off");
            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": "/automation-brain/diagrams/%7BdiagramId%7D/schedule-off",
              "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/automation-brain/diagrams/%7BdiagramId%7D/schedule-off');
            $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/automation-brain/diagrams/%7BdiagramId%7D/schedule-off")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/diagrams/{diagramId}/statistics:
    get:
      security:
        - JWT: []
      tags:
        - Workflows
      summary: Get workflow statistics with node details
      operationId: getDiagramStatistics
      description: |
        Retrieve workflow execution statistics, including node statistics and metadata (name, type).

        ---

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

        **User role permission required:** `automation_2_journeys: read`
      parameters:
        - $ref: "#/components/parameters/automation-brain-diagramId"
        - name: timePeriod
          in: query
          description: Time period for the statistics
          required: false
          schema:
            type: string
            enum:
              - currentHour
              - currentDay
              - previousHour
              - previousDay
      responses:
        "200":
          description: Diagram statistics with node info
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-ExternalDiagramStatsWithInfo"
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "403":
          description: Insufficient permissions to perform this action
        "404":
          description: Diagram not found
      x-snr-doc-urls:
        - /api-reference/automation#tag/Workflows/operation/getDiagramStatistics
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/statistics?timePeriod=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", "/automation-brain/diagrams/%7BdiagramId%7D/statistics?timePeriod=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/automation-brain/diagrams/%7BdiagramId%7D/statistics?timePeriod=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": "/automation-brain/diagrams/%7BdiagramId%7D/statistics?timePeriod=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/automation-brain/diagrams/%7BdiagramId%7D/statistics');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'timePeriod' => '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/automation-brain/diagrams/%7BdiagramId%7D/statistics?timePeriod=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/diagrams/{diagramId}/blocks/{blockId}/statistics:
    get:
      security:
        - JWT: []
      tags:
        - Workflows
      summary: Get node statistics
      operationId: getBlockStatistics
      description: |
        Retrieve execution statistics for a single block enriched with block metadata (name, type).

        ---

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

        **User role permission required:** `automation_2_journeys: read`
      parameters:
        - $ref: "#/components/parameters/automation-brain-diagramId"
        - name: blockId
          in: path
          description: UUID of the node
          required: true
          schema:
            type: string
        - name: timePeriod
          in: query
          description: Time period for statistics
          required: false
          schema:
            type: string
            enum:
              - currentHour
              - currentDay
              - previousHour
              - previousDay
      responses:
        "200":
          description: Block statistics with block info
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-ExternalBlockStatsWithInfo"
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "403":
          description: Insufficient permissions to perform this action
        "404":
          description: Diagram or block not found
      x-snr-doc-urls:
        - /api-reference/automation#tag/Workflows/operation/getBlockStatistics
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/blocks/%7BblockId%7D/statistics?timePeriod=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", "/automation-brain/diagrams/%7BdiagramId%7D/blocks/%7BblockId%7D/statistics?timePeriod=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/automation-brain/diagrams/%7BdiagramId%7D/blocks/%7BblockId%7D/statistics?timePeriod=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": "/automation-brain/diagrams/%7BdiagramId%7D/blocks/%7BblockId%7D/statistics?timePeriod=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/automation-brain/diagrams/%7BdiagramId%7D/blocks/%7BblockId%7D/statistics');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'timePeriod' => '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/automation-brain/diagrams/%7BdiagramId%7D/blocks/%7BblockId%7D/statistics?timePeriod=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /brickworks/v1/schemas:
    get:
      tags:
        - "Brickworks: Schemas"
      summary: Get schemas
      description: |
        Retrieve a list of schemas. You can paginate the results, filter by schema type, and search for a phrase in schema names.

        ---

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

        **User role permission required:** `assets_brickworks: read`
      operationId: getSchemas
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/brickworks-service-queryLimit"
        - $ref: "#/components/parameters/brickworks-service-queryPage"
        - $ref: "#/components/parameters/brickworks-service-querySearch"
        - $ref: "#/components/parameters/brickworks-service-querySortBy"
        - $ref: "#/components/parameters/brickworks-service-querySchemaTypes"
      responses:
        "200":
          description: Schema objects
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/brickworks-service-SchemaPagingResult"
        "400":
          $ref: "#/components/responses/brickworks-service-GenericBadRequestError"
        "401":
          $ref: "#/components/responses/brickworks-service-GenericUnauthorizedError"
        "403":
          $ref: "#/components/responses/brickworks-service-GenericForbiddenError"
        "404":
          $ref: "#/components/responses/brickworks-service-GenericNotFoundError"
        "409":
          $ref: "#/components/responses/brickworks-service-GenericConflictError"
        "422":
          $ref: "#/components/responses/brickworks-service-GenericUnprocessableContentError"
        "500":
          $ref: "#/components/responses/brickworks-service-GenericError"
      x-snr-doc-urls:
        - /api-reference/brickworks#tag/Brickworks:-Schemas/operation/getSchemas
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/brickworks/v1/schemas?limit=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=updatedAt%3Aasc&schemaTypes=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", "/brickworks/v1/schemas?limit=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=updatedAt%3Aasc&schemaTypes=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/brickworks/v1/schemas?limit=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=updatedAt%3Aasc&schemaTypes=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": "/brickworks/v1/schemas?limit=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=updatedAt%3Aasc&schemaTypes=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/brickworks/v1/schemas');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'limit' => 'SOME_INTEGER_VALUE',
              'page' => 'SOME_INTEGER_VALUE',
              'search' => 'SOME_STRING_VALUE',
              'sortBy' => 'updatedAt:asc',
              'schemaTypes' => '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/brickworks/v1/schemas?limit=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=updatedAt%3Aasc&schemaTypes=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - "Brickworks: Schemas"
      summary: Create schema
      description: |
        Create a new schema

        ---

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

        **User role permission required:** `assets_brickworks: create`
      operationId: createSchema
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/brickworks-service-CreateSchemaRequest"
      responses:
        "200":
          description: Details of the created schema
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/brickworks-service-Schema"
        "400":
          $ref: "#/components/responses/brickworks-service-GenericBadRequestError"
        "401":
          $ref: "#/components/responses/brickworks-service-GenericUnauthorizedError"
        "403":
          $ref: "#/components/responses/brickworks-service-GenericForbiddenError"
        "404":
          $ref: "#/components/responses/brickworks-service-GenericNotFoundError"
        "409":
          $ref: "#/components/responses/brickworks-service-GenericConflictError"
        "422":
          $ref: "#/components/responses/brickworks-service-GenericUnprocessableContentError"
        "500":
          $ref: "#/components/responses/brickworks-service-GenericError"
      x-snr-doc-urls:
        - /api-reference/brickworks#tag/Brickworks:-Schemas/operation/createSchema
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/brickworks/v1/schemas \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"appId":"string","displayName":"string","description":"string","fields":{"type":"object","properties":{"property1":{"type":"number","subtype":"number","minimum":0.1,"maximum":0.1,"unique":true,"searchable":true,"default":0,"isConstantField":false},"property2":{"type":"number","subtype":"number","minimum":0.1,"maximum":0.1,"unique":true,"searchable":true,"default":0,"isConstantField":false}},"required":["string"],"allOf":[{"if":{"required":["string"],"properties":{"property1":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}},"property2":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}}}},"then":{"required":["string"],"properties":{"property1":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}},"property2":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}}}},"else":{"required":["string"],"properties":{"property1":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}},"property2":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}}}}}],"additionalProperties":true},"displayConfiguration":{"ordering":{"property1":0,"property2":0},"metadata":{"property1":{"title":"empty title","description":"string","useAsRecordName":false},"property2":{"title":"empty title","description":"string","useAsRecordName":false}}},"audience":{"targetType":"SEGMENT","segments":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"query":"{\\\"analysis\\\":{\\\"title\\\":\\\"notempty\\\",\\\"segments\\\":[{\\\"title\\\":\\\"notempty\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"exampleBool\\\"}}]}}]}}]}}"},"schemaType":"SIMPLE"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"appId\":\"string\",\"displayName\":\"string\",\"description\":\"string\",\"fields\":{\"type\":\"object\",\"properties\":{\"property1\":{\"type\":\"number\",\"subtype\":\"number\",\"minimum\":0.1,\"maximum\":0.1,\"unique\":true,\"searchable\":true,\"default\":0,\"isConstantField\":false},\"property2\":{\"type\":\"number\",\"subtype\":\"number\",\"minimum\":0.1,\"maximum\":0.1,\"unique\":true,\"searchable\":true,\"default\":0,\"isConstantField\":false}},\"required\":[\"string\"],\"allOf\":[{\"if\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}},\"then\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}},\"else\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}}}],\"additionalProperties\":true},\"displayConfiguration\":{\"ordering\":{\"property1\":0,\"property2\":0},\"metadata\":{\"property1\":{\"title\":\"empty title\",\"description\":\"string\",\"useAsRecordName\":false},\"property2\":{\"title\":\"empty title\",\"description\":\"string\",\"useAsRecordName\":false}}},\"audience\":{\"targetType\":\"SEGMENT\",\"segments\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"query\":\"{\\\\\\\"analysis\\\\\\\":{\\\\\\\"title\\\\\\\":\\\\\\\"notempty\\\\\\\",\\\\\\\"segments\\\\\\\":[{\\\\\\\"title\\\\\\\":\\\\\\\"notempty\\\\\\\",\\\\\\\"filter\\\\\\\":{\\\\\\\"matching\\\\\\\":true,\\\\\\\"expressions\\\\\\\":[{\\\\\\\"type\\\\\\\":\\\\\\\"ATTRIBUTE\\\\\\\",\\\\\\\"attribute\\\\\\\":{\\\\\\\"expressions\\\\\\\":[{\\\\\\\"constraint\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"BOOL\\\\\\\",\\\\\\\"logic\\\\\\\":\\\\\\\"IS_TRUE\\\\\\\"},\\\\\\\"attribute\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"PARAM\\\\\\\",\\\\\\\"param\\\\\\\":\\\\\\\"exampleBool\\\\\\\"}}]}}]}}]}}\"},\"schemaType\":\"SIMPLE\"}"

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

            conn.request("POST", "/brickworks/v1/schemas", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "appId": "string",
              "displayName": "string",
              "description": "string",
              "fields": {
                "type": "object",
                "properties": {
                  "property1": {
                    "type": "number",
                    "subtype": "number",
                    "minimum": 0.1,
                    "maximum": 0.1,
                    "unique": true,
                    "searchable": true,
                    "default": 0,
                    "isConstantField": false
                  },
                  "property2": {
                    "type": "number",
                    "subtype": "number",
                    "minimum": 0.1,
                    "maximum": 0.1,
                    "unique": true,
                    "searchable": true,
                    "default": 0,
                    "isConstantField": false
                  }
                },
                "required": [
                  "string"
                ],
                "allOf": [
                  {
                    "if": {
                      "required": [
                        "string"
                      ],
                      "properties": {
                        "property1": {
                          "minItems": 0,
                          "maxItems": 0,
                          "uniqueItems": true,
                          "minimum": 0,
                          "maximum": 0,
                          "pattern": "string",
                          "const": null,
                          "enum": [
                            "string"
                          ],
                          "not": {}
                        },
                        "property2": {
                          "minItems": 0,
                          "maxItems": 0,
                          "uniqueItems": true,
                          "minimum": 0,
                          "maximum": 0,
                          "pattern": "string",
                          "const": null,
                          "enum": [
                            "string"
                          ],
                          "not": {}
                        }
                      }
                    },
                    "then": {
                      "required": [
                        "string"
                      ],
                      "properties": {
                        "property1": {
                          "minItems": 0,
                          "maxItems": 0,
                          "uniqueItems": true,
                          "minimum": 0,
                          "maximum": 0,
                          "pattern": "string",
                          "const": null,
                          "enum": [
                            "string"
                          ],
                          "not": {}
                        },
                        "property2": {
                          "minItems": 0,
                          "maxItems": 0,
                          "uniqueItems": true,
                          "minimum": 0,
                          "maximum": 0,
                          "pattern": "string",
                          "const": null,
                          "enum": [
                            "string"
                          ],
                          "not": {}
                        }
                      }
                    },
                    "else": {
                      "required": [
                        "string"
                      ],
                      "properties": {
                        "property1": {
                          "minItems": 0,
                          "maxItems": 0,
                          "uniqueItems": true,
                          "minimum": 0,
                          "maximum": 0,
                          "pattern": "string",
                          "const": null,
                          "enum": [
                            "string"
                          ],
                          "not": {}
                        },
                        "property2": {
                          "minItems": 0,
                          "maxItems": 0,
                          "uniqueItems": true,
                          "minimum": 0,
                          "maximum": 0,
                          "pattern": "string",
                          "const": null,
                          "enum": [
                            "string"
                          ],
                          "not": {}
                        }
                      }
                    }
                  }
                ],
                "additionalProperties": true
              },
              "displayConfiguration": {
                "ordering": {
                  "property1": 0,
                  "property2": 0
                },
                "metadata": {
                  "property1": {
                    "title": "empty title",
                    "description": "string",
                    "useAsRecordName": false
                  },
                  "property2": {
                    "title": "empty title",
                    "description": "string",
                    "useAsRecordName": false
                  }
                }
              },
              "audience": {
                "targetType": "SEGMENT",
                "segments": [
                  "497f6eca-6276-4993-bfeb-53cbbbba6f08"
                ],
                "query": "{\\\"analysis\\\":{\\\"title\\\":\\\"notempty\\\",\\\"segments\\\":[{\\\"title\\\":\\\"notempty\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"exampleBool\\\"}}]}}]}}]}}"
              },
              "schemaType": "SIMPLE"
            });

            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/brickworks/v1/schemas");
            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": "/brickworks/v1/schemas",
              "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({
              appId: 'string',
              displayName: 'string',
              description: 'string',
              fields: {
                type: 'object',
                properties: {
                  property1: {
                    type: 'number',
                    subtype: 'number',
                    minimum: 0.1,
                    maximum: 0.1,
                    unique: true,
                    searchable: true,
                    default: 0,
                    isConstantField: false
                  },
                  property2: {
                    type: 'number',
                    subtype: 'number',
                    minimum: 0.1,
                    maximum: 0.1,
                    unique: true,
                    searchable: true,
                    default: 0,
                    isConstantField: false
                  }
                },
                required: ['string'],
                allOf: [
                  {
                    if: {
                      required: ['string'],
                      properties: {
                        property1: {
                          minItems: 0,
                          maxItems: 0,
                          uniqueItems: true,
                          minimum: 0,
                          maximum: 0,
                          pattern: 'string',
                          const: null,
                          enum: ['string'],
                          not: {}
                        },
                        property2: {
                          minItems: 0,
                          maxItems: 0,
                          uniqueItems: true,
                          minimum: 0,
                          maximum: 0,
                          pattern: 'string',
                          const: null,
                          enum: ['string'],
                          not: {}
                        }
                      }
                    },
                    then: {
                      required: ['string'],
                      properties: {
                        property1: {
                          minItems: 0,
                          maxItems: 0,
                          uniqueItems: true,
                          minimum: 0,
                          maximum: 0,
                          pattern: 'string',
                          const: null,
                          enum: ['string'],
                          not: {}
                        },
                        property2: {
                          minItems: 0,
                          maxItems: 0,
                          uniqueItems: true,
                          minimum: 0,
                          maximum: 0,
                          pattern: 'string',
                          const: null,
                          enum: ['string'],
                          not: {}
                        }
                      }
                    },
                    else: {
                      required: ['string'],
                      properties: {
                        property1: {
                          minItems: 0,
                          maxItems: 0,
                          uniqueItems: true,
                          minimum: 0,
                          maximum: 0,
                          pattern: 'string',
                          const: null,
                          enum: ['string'],
                          not: {}
                        },
                        property2: {
                          minItems: 0,
                          maxItems: 0,
                          uniqueItems: true,
                          minimum: 0,
                          maximum: 0,
                          pattern: 'string',
                          const: null,
                          enum: ['string'],
                          not: {}
                        }
                      }
                    }
                  }
                ],
                additionalProperties: true
              },
              displayConfiguration: {
                ordering: {property1: 0, property2: 0},
                metadata: {
                  property1: {title: 'empty title', description: 'string', useAsRecordName: false},
                  property2: {title: 'empty title', description: 'string', useAsRecordName: false}
                }
              },
              audience: {
                targetType: 'SEGMENT',
                segments: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],
                query: '{\"analysis\":{\"title\":\"notempty\",\"segments\":[{\"title\":\"notempty\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"exampleBool\"}}]}}]}}]}}'
              },
              schemaType: 'SIMPLE'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"appId":"string","displayName":"string","description":"string","fields":{"type":"object","properties":{"property1":{"type":"number","subtype":"number","minimum":0.1,"maximum":0.1,"unique":true,"searchable":true,"default":0,"isConstantField":false},"property2":{"type":"number","subtype":"number","minimum":0.1,"maximum":0.1,"unique":true,"searchable":true,"default":0,"isConstantField":false}},"required":["string"],"allOf":[{"if":{"required":["string"],"properties":{"property1":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}},"property2":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}}}},"then":{"required":["string"],"properties":{"property1":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}},"property2":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}}}},"else":{"required":["string"],"properties":{"property1":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}},"property2":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}}}}}],"additionalProperties":true},"displayConfiguration":{"ordering":{"property1":0,"property2":0},"metadata":{"property1":{"title":"empty title","description":"string","useAsRecordName":false},"property2":{"title":"empty title","description":"string","useAsRecordName":false}}},"audience":{"targetType":"SEGMENT","segments":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"query":"{\\\\\\"analysis\\\\\\":{\\\\\\"title\\\\\\":\\\\\\"notempty\\\\\\",\\\\\\"segments\\\\\\":[{\\\\\\"title\\\\\\":\\\\\\"notempty\\\\\\",\\\\\\"filter\\\\\\":{\\\\\\"matching\\\\\\":true,\\\\\\"expressions\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"ATTRIBUTE\\\\\\",\\\\\\"attribute\\\\\\":{\\\\\\"expressions\\\\\\":[{\\\\\\"constraint\\\\\\":{\\\\\\"type\\\\\\":\\\\\\"BOOL\\\\\\",\\\\\\"logic\\\\\\":\\\\\\"IS_TRUE\\\\\\"},\\\\\\"attribute\\\\\\":{\\\\\\"type\\\\\\":\\\\\\"PARAM\\\\\\",\\\\\\"param\\\\\\":\\\\\\"exampleBool\\\\\\"}}]}}]}}]}}"},"schemaType":"SIMPLE"}');

            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/brickworks/v1/schemas")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"appId\":\"string\",\"displayName\":\"string\",\"description\":\"string\",\"fields\":{\"type\":\"object\",\"properties\":{\"property1\":{\"type\":\"number\",\"subtype\":\"number\",\"minimum\":0.1,\"maximum\":0.1,\"unique\":true,\"searchable\":true,\"default\":0,\"isConstantField\":false},\"property2\":{\"type\":\"number\",\"subtype\":\"number\",\"minimum\":0.1,\"maximum\":0.1,\"unique\":true,\"searchable\":true,\"default\":0,\"isConstantField\":false}},\"required\":[\"string\"],\"allOf\":[{\"if\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}},\"then\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}},\"else\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}}}],\"additionalProperties\":true},\"displayConfiguration\":{\"ordering\":{\"property1\":0,\"property2\":0},\"metadata\":{\"property1\":{\"title\":\"empty title\",\"description\":\"string\",\"useAsRecordName\":false},\"property2\":{\"title\":\"empty title\",\"description\":\"string\",\"useAsRecordName\":false}}},\"audience\":{\"targetType\":\"SEGMENT\",\"segments\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"query\":\"{\\\\\\\"analysis\\\\\\\":{\\\\\\\"title\\\\\\\":\\\\\\\"notempty\\\\\\\",\\\\\\\"segments\\\\\\\":[{\\\\\\\"title\\\\\\\":\\\\\\\"notempty\\\\\\\",\\\\\\\"filter\\\\\\\":{\\\\\\\"matching\\\\\\\":true,\\\\\\\"expressions\\\\\\\":[{\\\\\\\"type\\\\\\\":\\\\\\\"ATTRIBUTE\\\\\\\",\\\\\\\"attribute\\\\\\\":{\\\\\\\"expressions\\\\\\\":[{\\\\\\\"constraint\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"BOOL\\\\\\\",\\\\\\\"logic\\\\\\\":\\\\\\\"IS_TRUE\\\\\\\"},\\\\\\\"attribute\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"PARAM\\\\\\\",\\\\\\\"param\\\\\\\":\\\\\\\"exampleBool\\\\\\\"}}]}}]}}]}}\"},\"schemaType\":\"SIMPLE\"}")
              .asString();
  /brickworks/v1/schemas/{SchemaIdentifier}:
    get:
      tags:
        - "Brickworks: Schemas"
      summary: Get schema
      description: |
        Retrieve the details of a schema.

        ---

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

        **User role permission required:** `assets_brickworks: read`
      operationId: getSchemaById
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/brickworks-service-pathSchemaIdentifier"
      responses:
        "200":
          description: Details of the schema
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/brickworks-service-Schema"
        "400":
          $ref: "#/components/responses/brickworks-service-GenericBadRequestError"
        "401":
          $ref: "#/components/responses/brickworks-service-GenericUnauthorizedError"
        "403":
          $ref: "#/components/responses/brickworks-service-GenericForbiddenError"
        "404":
          $ref: "#/components/responses/brickworks-service-GenericNotFoundError"
        "409":
          $ref: "#/components/responses/brickworks-service-GenericConflictError"
        "422":
          $ref: "#/components/responses/brickworks-service-GenericUnprocessableContentError"
        "500":
          $ref: "#/components/responses/brickworks-service-GenericError"
      x-snr-doc-urls:
        - /api-reference/brickworks#tag/Brickworks:-Schemas/operation/getSchemaById
    put:
      tags:
        - "Brickworks: Schemas"
      summary: Update schema
      description: |
        Update a schema.

        ---

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

        **User role permission required:** `assets_brickworks: update`
      operationId: updateSchema
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/brickworks-service-pathSchemaIdentifier"
      requestBody:
        description: Schema properties to update
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/brickworks-service-UpdateSchemaRequest"
      responses:
        "200":
          description: Schema updated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/brickworks-service-Schema"
        "400":
          $ref: "#/components/responses/brickworks-service-GenericBadRequestError"
        "401":
          $ref: "#/components/responses/brickworks-service-GenericUnauthorizedError"
        "403":
          $ref: "#/components/responses/brickworks-service-GenericForbiddenError"
        "404":
          $ref: "#/components/responses/brickworks-service-GenericNotFoundError"
        "409":
          $ref: "#/components/responses/brickworks-service-GenericConflictError"
        "422":
          $ref: "#/components/responses/brickworks-service-GenericUnprocessableContentError"
        "500":
          $ref: "#/components/responses/brickworks-service-GenericError"
      x-snr-doc-urls:
        - /api-reference/brickworks#tag/Brickworks:-Schemas/operation/updateSchema
    delete:
      tags:
        - "Brickworks: Schemas"
      summary: Delete schema
      description: |
        Delete a schema.

        ---

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

        **User role permission required:** `assets_brickworks: delete`
      operationId: deleteSchema
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/brickworks-service-pathSchemaIdentifier"
      responses:
        "204":
          description: Schema deleted
        "400":
          $ref: "#/components/responses/brickworks-service-GenericBadRequestError"
        "401":
          $ref: "#/components/responses/brickworks-service-GenericUnauthorizedError"
        "403":
          $ref: "#/components/responses/brickworks-service-GenericForbiddenError"
        "404":
          $ref: "#/components/responses/brickworks-service-GenericNotFoundError"
        "409":
          $ref: "#/components/responses/brickworks-service-GenericConflictError"
        "422":
          $ref: "#/components/responses/brickworks-service-GenericUnprocessableContentError"
        "500":
          $ref: "#/components/responses/brickworks-service-GenericError"
      x-snr-doc-urls:
        - /api-reference/brickworks#tag/Brickworks:-Schemas/operation/deleteSchema
  /brickworks/v1/schemas/{SchemaIdentifier}/records:
    get:
      tags:
        - "Brickworks: Records"
      summary: Get records from schema
      description: |
        Retrieve records from a schema. You can paginate, sort, and refine the results. By default, the records are sorted by status (published > scheduled > draft > unpublished) and then by last update time.

        ---

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

        **User role permission required:** `assets_brickworks: read`
      operationId: getRecordsFromSchema
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/brickworks-service-pathSchemaIdentifier"
        - $ref: "#/components/parameters/brickworks-service-queryLimit"
        - $ref: "#/components/parameters/brickworks-service-queryPage"
        - $ref: "#/components/parameters/brickworks-service-queryRecordFilters"
        - $ref: "#/components/parameters/brickworks-service-querySearchRecords"
        - $ref: "#/components/parameters/brickworks-service-querySortByRecords"
        - $ref: "#/components/parameters/brickworks-service-queryIds"
        - $ref: "#/components/parameters/brickworks-service-queryStatuses"
        - $ref: "#/components/parameters/brickworks-service-querySlugs"
        - $ref: "#/components/parameters/brickworks-service-queryFields"
      responses:
        "200":
          description: A page of records
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/brickworks-service-RecordPagingResult"
        "400":
          $ref: "#/components/responses/brickworks-service-GenericBadRequestError"
        "401":
          $ref: "#/components/responses/brickworks-service-GenericUnauthorizedError"
        "403":
          $ref: "#/components/responses/brickworks-service-GenericForbiddenError"
        "404":
          $ref: "#/components/responses/brickworks-service-GenericNotFoundError"
        "409":
          $ref: "#/components/responses/brickworks-service-GenericConflictError"
        "422":
          $ref: "#/components/responses/brickworks-service-GenericUnprocessableContentError"
        "500":
          $ref: "#/components/responses/brickworks-service-GenericError"
      x-snr-doc-urls:
        - /api-reference/brickworks#tag/Brickworks:-Records/operation/getRecordsFromSchema
    post:
      tags:
        - "Brickworks: Records"
      summary: Add record to schema
      description: |
        Add a record to a schema

        ---

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

        **User role permission required:** `assets_brickworks: create`
      operationId: addRecordToSchema
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/brickworks-service-pathSchemaIdentifier"
      requestBody:
        description: Add record to schema
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/brickworks-service-AddRecordToSchemaRequest"
      responses:
        "200":
          description: Record data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/brickworks-service-Record"
        "400":
          $ref: "#/components/responses/brickworks-service-GenericBadRequestError"
        "401":
          $ref: "#/components/responses/brickworks-service-GenericUnauthorizedError"
        "403":
          $ref: "#/components/responses/brickworks-service-GenericForbiddenError"
        "404":
          $ref: "#/components/responses/brickworks-service-GenericNotFoundError"
        "409":
          $ref: "#/components/responses/brickworks-service-GenericConflictError"
        "422":
          $ref: "#/components/responses/brickworks-service-GenericUnprocessableContentError"
        "500":
          $ref: "#/components/responses/brickworks-service-GenericError"
      x-snr-doc-urls:
        - /api-reference/brickworks#tag/Brickworks:-Records/operation/addRecordToSchema
  /brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}:
    get:
      tags:
        - "Brickworks: Records"
      summary: Get record
      description: |
        Retrieve a record. You can select the fields that you want to include in the response.

        If the record has multiple versions in different publishing states, the first available version is returned according to publishing status priority:
          - PUBLISHED
          - DRAFT
          - SCHEDULED
          - UNPUBLISHED
        You can use the `statuses` parameter to limit the lookup.


        ---

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

        **User role permission required:** `assets_brickworks: read`
      operationId: getRecord
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/brickworks-service-pathSchemaIdentifier"
        - $ref: "#/components/parameters/brickworks-service-pathRecordIdentifier"
        - $ref: "#/components/parameters/brickworks-service-queryFields"
        - $ref: "#/components/parameters/brickworks-service-queryStatuses"
      responses:
        "200":
          description: Details of the record
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/brickworks-service-Record"
        "400":
          $ref: "#/components/responses/brickworks-service-GenericBadRequestError"
        "401":
          $ref: "#/components/responses/brickworks-service-GenericUnauthorizedError"
        "403":
          $ref: "#/components/responses/brickworks-service-GenericForbiddenError"
        "404":
          $ref: "#/components/responses/brickworks-service-GenericNotFoundError"
        "409":
          $ref: "#/components/responses/brickworks-service-GenericConflictError"
        "422":
          $ref: "#/components/responses/brickworks-service-GenericUnprocessableContentError"
        "500":
          $ref: "#/components/responses/brickworks-service-GenericError"
      x-snr-doc-urls:
        - /api-reference/brickworks#tag/Brickworks:-Records/operation/getRecord
    put:
      tags:
        - "Brickworks: Records"
      summary: Update record
      description: |
        Update a record.

        In a versioned schema, you can't directly edit a published record. To make changes, update the status to DRAFT (you can include the other changes that you want to make). This creates a new version of the record (without modifying the currently published version), which you can edit and publish.


        ---

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

        **User role permission required:** `assets_brickworks: update`
      operationId: updateRecord
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/brickworks-service-UpdateRecordRequest"
      parameters:
        - $ref: "#/components/parameters/brickworks-service-pathSchemaIdentifier"
        - $ref: "#/components/parameters/brickworks-service-pathRecordIdentifier"
      responses:
        "200":
          description: Details of the updated record
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/brickworks-service-Record"
        "400":
          $ref: "#/components/responses/brickworks-service-GenericBadRequestError"
        "401":
          $ref: "#/components/responses/brickworks-service-GenericUnauthorizedError"
        "403":
          $ref: "#/components/responses/brickworks-service-GenericForbiddenError"
        "404":
          $ref: "#/components/responses/brickworks-service-GenericNotFoundError"
        "409":
          $ref: "#/components/responses/brickworks-service-GenericConflictError"
        "422":
          $ref: "#/components/responses/brickworks-service-GenericUnprocessableContentError"
        "500":
          $ref: "#/components/responses/brickworks-service-GenericError"
      x-snr-doc-urls:
        - /api-reference/brickworks#tag/Brickworks:-Records/operation/updateRecord
    delete:
      tags:
        - "Brickworks: Records"
      summary: Delete record
      description: |
        Delete a record **permanently**. If you want to unpublish a record instead, send an update request to change the status to `UNPUBLISHED`

        ---

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

        **User role permission required:** `assets_brickworks: delete`
      operationId: deleteRecord
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/brickworks-service-pathSchemaIdentifier"
        - $ref: "#/components/parameters/brickworks-service-pathRecordIdentifier"
      responses:
        "204":
          description: Record deleted
        "400":
          $ref: "#/components/responses/brickworks-service-GenericBadRequestError"
        "401":
          $ref: "#/components/responses/brickworks-service-GenericUnauthorizedError"
        "403":
          $ref: "#/components/responses/brickworks-service-GenericForbiddenError"
        "404":
          $ref: "#/components/responses/brickworks-service-GenericNotFoundError"
        "409":
          $ref: "#/components/responses/brickworks-service-GenericConflictError"
        "422":
          $ref: "#/components/responses/brickworks-service-GenericUnprocessableContentError"
        "500":
          $ref: "#/components/responses/brickworks-service-GenericError"
      x-snr-doc-urls:
        - /api-reference/brickworks#tag/Brickworks:-Records/operation/deleteRecord
  /brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}/generate/by/{IdentifierType}:
    post:
      tags:
        - "Brickworks: Content generation"
      summary: Generate object from a record (as workspace)
      description: |
        Generate content from the latest **published version of a record** by processing Jinjava inserts and requests to external sources. Profile data (if needed, for example for Jinjava) is retrieved automatically from the profile declared in the request.

        The system looks for values to generate in the following order:

          1. Values in the `fieldContext` object (used by recommendations and relations).
          1. Values saved in the record.
          2. Values from the `default` object in the schema.  
            This is available for all field types.  
          3. Default values nested in the `properties` of a field in the schema.  
            This is available for some complex field types.  


        The content is always generated according to the latest version of a schema:
          - If fields were deleted from the schema, but they still exist in the record, they are ignored.
          - If fields were added to the schema and they don't exist in the record, their default values are added. If there are no default values, the fields are ignored.

        Some data is cached:
        - profile data (even if the profile is updated)
        - responses from external sources  
        For details, see the [User Guide](https://hub.synerise.com/docs/assets/brickworks/limits).


        ---

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

        **User role permission required:** `assets_brickworks: read`
      operationId: generateObjectForProfile
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/brickworks-service-pathSchemaIdentifier"
        - $ref: "#/components/parameters/brickworks-service-pathRecordIdentifier"
        - $ref: "#/components/parameters/brickworks-service-pathIdentifierType"
      requestBody:
        description: Object generation request
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/brickworks-service-GenerateRequest"
      responses:
        "200":
          $ref: "#/components/responses/brickworks-service-GeneratedObject"
        "400":
          $ref: "#/components/responses/brickworks-service-GenericBadRequestError"
        "401":
          $ref: "#/components/responses/brickworks-service-GenericUnauthorizedError"
        "403":
          $ref: "#/components/responses/brickworks-service-GenericForbiddenError"
        "404":
          $ref: "#/components/responses/brickworks-service-GenericNotFoundError"
        "409":
          $ref: "#/components/responses/brickworks-service-GenericConflictError"
        "422":
          $ref: "#/components/responses/brickworks-service-GenericUnprocessableContentError"
        "500":
          $ref: "#/components/responses/brickworks-service-GenericError"
      x-snr-doc-urls:
        - /api-reference/brickworks#tag/Brickworks:-Content-generation/operation/generateObjectForProfile
  /brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}/generate:
    post:
      tags:
        - "Brickworks: Content generation"
      summary: Generate object from a record (as any consumer)
      description: |
        Generate content from the latest **published version of a record** by processing Jinjava inserts and requests to external sources.  
        If the request is authorized by a profile, the profile data is automatically retrieve for fields which need it (for example, in Jinjava inserts).

        The system looks for values to generate in the following order:

          1. Values in the `fieldContext` object (used by recommendations and relations).
          1. Values saved in the record.
          2. Values from the `default` object in the schema.  
            This is available for all field types.  
          3. Default values nested in the `properties` of a field in the schema.  
            This is available for some complex field types.  


        The content is always generated according to the latest version of a schema:
          - If fields were deleted from the schema, but they still exist in the record, they are ignored.
          - If fields were added to the schema and they don't exist in the record, their default values are added. If there are no default values, the fields are ignored.

        Some data is cached:
        - profile data (even if the profile is updated)
        - responses from external sources  
        For details, see the [User Guide](https://hub.synerise.com/docs/assets/brickworks/limits).


        ---

        **API consumers:** <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>, <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:** `BRICKWORKS_RECORDS_READ`

        **User role permission required:** `assets_brickworks: read`
      operationId: generateObject
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/brickworks-service-pathSchemaIdentifier"
        - $ref: "#/components/parameters/brickworks-service-pathRecordIdentifier"
      requestBody:
        description: Object generation request
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/brickworks-service-GenerateRequestWithoutIdentifier"
      responses:
        "200":
          $ref: "#/components/responses/brickworks-service-GeneratedObject"
        "400":
          $ref: "#/components/responses/brickworks-service-GenericBadRequestError"
        "401":
          $ref: "#/components/responses/brickworks-service-GenericUnauthorizedError"
        "403":
          $ref: "#/components/responses/brickworks-service-GenericForbiddenError"
        "404":
          $ref: "#/components/responses/brickworks-service-GenericNotFoundError"
        "409":
          $ref: "#/components/responses/brickworks-service-GenericConflictError"
        "422":
          $ref: "#/components/responses/brickworks-service-GenericUnprocessableContentError"
        "500":
          $ref: "#/components/responses/brickworks-service-GenericError"
      x-snr-doc-urls:
        - /api-reference/brickworks#tag/Brickworks:-Content-generation/operation/generateObject
  /brickworks/v1/schemas/records/preview/by/{IdentifierType}:
    post:
      tags:
        - "Brickworks: Records"
      summary: Preview object (as workspace)
      description: |
        Preview an object by sending field values. 

        When generating a preview, fields are only generated when you send their value or they have a default value. Values saved in the record are not used in the preview.

        Some data is cached:
        - profile data (even if the profile is updated)
        - responses from external sources  
        For details, see the [User Guide](https://hub.synerise.com/docs/assets/brickworks/limits).


        ---

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

        **User role permission required:** `assets_brickworks: read`
      operationId: previewObject
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/brickworks-service-pathIdentifierType"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/brickworks-service-PreviewRequest"
      responses:
        "200":
          description: Generated JSON
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/brickworks-service-GeneratedObject"
        "400":
          $ref: "#/components/responses/brickworks-service-GenericBadRequestError"
        "401":
          $ref: "#/components/responses/brickworks-service-GenericUnauthorizedError"
        "403":
          $ref: "#/components/responses/brickworks-service-GenericForbiddenError"
        "404":
          $ref: "#/components/responses/brickworks-service-GenericNotFoundError"
        "409":
          $ref: "#/components/responses/brickworks-service-GenericConflictError"
        "422":
          $ref: "#/components/responses/brickworks-service-GenericUnprocessableContentError"
        "500":
          $ref: "#/components/responses/brickworks-service-GenericError"
      x-snr-doc-urls:
        - /api-reference/brickworks#tag/Brickworks:-Records/operation/previewObject
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/brickworks/v1/schemas/records/preview/by/%7BIdentifierType%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"identifierValue":"string","context":{"property1":null,"property2":null},"fieldContext":{"property1":{"page":1,"limit":10,"itemId":"item-123","additionalFilters":"custom filter value"},"property2":{"page":1,"limit":10,"itemId":"item-123","additionalFilters":"custom filter value"}},"values":{"property1":null,"property2":null},"schema":{"fields":{"type":"object","properties":{"property1":{"type":"number","subtype":"number","minimum":0.1,"maximum":0.1,"unique":true,"searchable":true,"default":0,"isConstantField":false},"property2":{"type":"number","subtype":"number","minimum":0.1,"maximum":0.1,"unique":true,"searchable":true,"default":0,"isConstantField":false}},"required":["string"],"allOf":[{"if":{"required":["string"],"properties":{"property1":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}},"property2":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}}}},"then":{"required":["string"],"properties":{"property1":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}},"property2":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}}}},"else":{"required":["string"],"properties":{"property1":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}},"property2":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}}}}}],"additionalProperties":true},"audience":{"targetType":"SEGMENT","segments":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"query":"{\\\"analysis\\\":{\\\"title\\\":\\\"notempty\\\",\\\"segments\\\":[{\\\"title\\\":\\\"notempty\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"exampleBool\\\"}}]}}]}}]}}"},"schemaType":"SIMPLE"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"identifierValue\":\"string\",\"context\":{\"property1\":null,\"property2\":null},\"fieldContext\":{\"property1\":{\"page\":1,\"limit\":10,\"itemId\":\"item-123\",\"additionalFilters\":\"custom filter value\"},\"property2\":{\"page\":1,\"limit\":10,\"itemId\":\"item-123\",\"additionalFilters\":\"custom filter value\"}},\"values\":{\"property1\":null,\"property2\":null},\"schema\":{\"fields\":{\"type\":\"object\",\"properties\":{\"property1\":{\"type\":\"number\",\"subtype\":\"number\",\"minimum\":0.1,\"maximum\":0.1,\"unique\":true,\"searchable\":true,\"default\":0,\"isConstantField\":false},\"property2\":{\"type\":\"number\",\"subtype\":\"number\",\"minimum\":0.1,\"maximum\":0.1,\"unique\":true,\"searchable\":true,\"default\":0,\"isConstantField\":false}},\"required\":[\"string\"],\"allOf\":[{\"if\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}},\"then\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}},\"else\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}}}],\"additionalProperties\":true},\"audience\":{\"targetType\":\"SEGMENT\",\"segments\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"query\":\"{\\\\\\\"analysis\\\\\\\":{\\\\\\\"title\\\\\\\":\\\\\\\"notempty\\\\\\\",\\\\\\\"segments\\\\\\\":[{\\\\\\\"title\\\\\\\":\\\\\\\"notempty\\\\\\\",\\\\\\\"filter\\\\\\\":{\\\\\\\"matching\\\\\\\":true,\\\\\\\"expressions\\\\\\\":[{\\\\\\\"type\\\\\\\":\\\\\\\"ATTRIBUTE\\\\\\\",\\\\\\\"attribute\\\\\\\":{\\\\\\\"expressions\\\\\\\":[{\\\\\\\"constraint\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"BOOL\\\\\\\",\\\\\\\"logic\\\\\\\":\\\\\\\"IS_TRUE\\\\\\\"},\\\\\\\"attribute\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"PARAM\\\\\\\",\\\\\\\"param\\\\\\\":\\\\\\\"exampleBool\\\\\\\"}}]}}]}}]}}\"},\"schemaType\":\"SIMPLE\"}}"

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

            conn.request("POST", "/brickworks/v1/schemas/records/preview/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",
              "context": {
                "property1": null,
                "property2": null
              },
              "fieldContext": {
                "property1": {
                  "page": 1,
                  "limit": 10,
                  "itemId": "item-123",
                  "additionalFilters": "custom filter value"
                },
                "property2": {
                  "page": 1,
                  "limit": 10,
                  "itemId": "item-123",
                  "additionalFilters": "custom filter value"
                }
              },
              "values": {
                "property1": null,
                "property2": null
              },
              "schema": {
                "fields": {
                  "type": "object",
                  "properties": {
                    "property1": {
                      "type": "number",
                      "subtype": "number",
                      "minimum": 0.1,
                      "maximum": 0.1,
                      "unique": true,
                      "searchable": true,
                      "default": 0,
                      "isConstantField": false
                    },
                    "property2": {
                      "type": "number",
                      "subtype": "number",
                      "minimum": 0.1,
                      "maximum": 0.1,
                      "unique": true,
                      "searchable": true,
                      "default": 0,
                      "isConstantField": false
                    }
                  },
                  "required": [
                    "string"
                  ],
                  "allOf": [
                    {
                      "if": {
                        "required": [
                          "string"
                        ],
                        "properties": {
                          "property1": {
                            "minItems": 0,
                            "maxItems": 0,
                            "uniqueItems": true,
                            "minimum": 0,
                            "maximum": 0,
                            "pattern": "string",
                            "const": null,
                            "enum": [
                              "string"
                            ],
                            "not": {}
                          },
                          "property2": {
                            "minItems": 0,
                            "maxItems": 0,
                            "uniqueItems": true,
                            "minimum": 0,
                            "maximum": 0,
                            "pattern": "string",
                            "const": null,
                            "enum": [
                              "string"
                            ],
                            "not": {}
                          }
                        }
                      },
                      "then": {
                        "required": [
                          "string"
                        ],
                        "properties": {
                          "property1": {
                            "minItems": 0,
                            "maxItems": 0,
                            "uniqueItems": true,
                            "minimum": 0,
                            "maximum": 0,
                            "pattern": "string",
                            "const": null,
                            "enum": [
                              "string"
                            ],
                            "not": {}
                          },
                          "property2": {
                            "minItems": 0,
                            "maxItems": 0,
                            "uniqueItems": true,
                            "minimum": 0,
                            "maximum": 0,
                            "pattern": "string",
                            "const": null,
                            "enum": [
                              "string"
                            ],
                            "not": {}
                          }
                        }
                      },
                      "else": {
                        "required": [
                          "string"
                        ],
                        "properties": {
                          "property1": {
                            "minItems": 0,
                            "maxItems": 0,
                            "uniqueItems": true,
                            "minimum": 0,
                            "maximum": 0,
                            "pattern": "string",
                            "const": null,
                            "enum": [
                              "string"
                            ],
                            "not": {}
                          },
                          "property2": {
                            "minItems": 0,
                            "maxItems": 0,
                            "uniqueItems": true,
                            "minimum": 0,
                            "maximum": 0,
                            "pattern": "string",
                            "const": null,
                            "enum": [
                              "string"
                            ],
                            "not": {}
                          }
                        }
                      }
                    }
                  ],
                  "additionalProperties": true
                },
                "audience": {
                  "targetType": "SEGMENT",
                  "segments": [
                    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
                  ],
                  "query": "{\\\"analysis\\\":{\\\"title\\\":\\\"notempty\\\",\\\"segments\\\":[{\\\"title\\\":\\\"notempty\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"exampleBool\\\"}}]}}]}}]}}"
                },
                "schemaType": "SIMPLE"
              }
            });

            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/brickworks/v1/schemas/records/preview/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": "/brickworks/v1/schemas/records/preview/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',
              context: {property1: null, property2: null},
              fieldContext: {
                property1: {
                  page: 1,
                  limit: 10,
                  itemId: 'item-123',
                  additionalFilters: 'custom filter value'
                },
                property2: {
                  page: 1,
                  limit: 10,
                  itemId: 'item-123',
                  additionalFilters: 'custom filter value'
                }
              },
              values: {property1: null, property2: null},
              schema: {
                fields: {
                  type: 'object',
                  properties: {
                    property1: {
                      type: 'number',
                      subtype: 'number',
                      minimum: 0.1,
                      maximum: 0.1,
                      unique: true,
                      searchable: true,
                      default: 0,
                      isConstantField: false
                    },
                    property2: {
                      type: 'number',
                      subtype: 'number',
                      minimum: 0.1,
                      maximum: 0.1,
                      unique: true,
                      searchable: true,
                      default: 0,
                      isConstantField: false
                    }
                  },
                  required: ['string'],
                  allOf: [
                    {
                      if: {
                        required: ['string'],
                        properties: {
                          property1: {
                            minItems: 0,
                            maxItems: 0,
                            uniqueItems: true,
                            minimum: 0,
                            maximum: 0,
                            pattern: 'string',
                            const: null,
                            enum: ['string'],
                            not: {}
                          },
                          property2: {
                            minItems: 0,
                            maxItems: 0,
                            uniqueItems: true,
                            minimum: 0,
                            maximum: 0,
                            pattern: 'string',
                            const: null,
                            enum: ['string'],
                            not: {}
                          }
                        }
                      },
                      then: {
                        required: ['string'],
                        properties: {
                          property1: {
                            minItems: 0,
                            maxItems: 0,
                            uniqueItems: true,
                            minimum: 0,
                            maximum: 0,
                            pattern: 'string',
                            const: null,
                            enum: ['string'],
                            not: {}
                          },
                          property2: {
                            minItems: 0,
                            maxItems: 0,
                            uniqueItems: true,
                            minimum: 0,
                            maximum: 0,
                            pattern: 'string',
                            const: null,
                            enum: ['string'],
                            not: {}
                          }
                        }
                      },
                      else: {
                        required: ['string'],
                        properties: {
                          property1: {
                            minItems: 0,
                            maxItems: 0,
                            uniqueItems: true,
                            minimum: 0,
                            maximum: 0,
                            pattern: 'string',
                            const: null,
                            enum: ['string'],
                            not: {}
                          },
                          property2: {
                            minItems: 0,
                            maxItems: 0,
                            uniqueItems: true,
                            minimum: 0,
                            maximum: 0,
                            pattern: 'string',
                            const: null,
                            enum: ['string'],
                            not: {}
                          }
                        }
                      }
                    }
                  ],
                  additionalProperties: true
                },
                audience: {
                  targetType: 'SEGMENT',
                  segments: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],
                  query: '{\"analysis\":{\"title\":\"notempty\",\"segments\":[{\"title\":\"notempty\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"exampleBool\"}}]}}]}}]}}'
                },
                schemaType: 'SIMPLE'
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/brickworks/v1/schemas/records/preview/by/%7BIdentifierType%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"identifierValue":"string","context":{"property1":null,"property2":null},"fieldContext":{"property1":{"page":1,"limit":10,"itemId":"item-123","additionalFilters":"custom filter value"},"property2":{"page":1,"limit":10,"itemId":"item-123","additionalFilters":"custom filter value"}},"values":{"property1":null,"property2":null},"schema":{"fields":{"type":"object","properties":{"property1":{"type":"number","subtype":"number","minimum":0.1,"maximum":0.1,"unique":true,"searchable":true,"default":0,"isConstantField":false},"property2":{"type":"number","subtype":"number","minimum":0.1,"maximum":0.1,"unique":true,"searchable":true,"default":0,"isConstantField":false}},"required":["string"],"allOf":[{"if":{"required":["string"],"properties":{"property1":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}},"property2":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}}}},"then":{"required":["string"],"properties":{"property1":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}},"property2":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}}}},"else":{"required":["string"],"properties":{"property1":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}},"property2":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}}}}}],"additionalProperties":true},"audience":{"targetType":"SEGMENT","segments":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"query":"{\\\\\\"analysis\\\\\\":{\\\\\\"title\\\\\\":\\\\\\"notempty\\\\\\",\\\\\\"segments\\\\\\":[{\\\\\\"title\\\\\\":\\\\\\"notempty\\\\\\",\\\\\\"filter\\\\\\":{\\\\\\"matching\\\\\\":true,\\\\\\"expressions\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"ATTRIBUTE\\\\\\",\\\\\\"attribute\\\\\\":{\\\\\\"expressions\\\\\\":[{\\\\\\"constraint\\\\\\":{\\\\\\"type\\\\\\":\\\\\\"BOOL\\\\\\",\\\\\\"logic\\\\\\":\\\\\\"IS_TRUE\\\\\\"},\\\\\\"attribute\\\\\\":{\\\\\\"type\\\\\\":\\\\\\"PARAM\\\\\\",\\\\\\"param\\\\\\":\\\\\\"exampleBool\\\\\\"}}]}}]}}]}}"},"schemaType":"SIMPLE"}}');

            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/brickworks/v1/schemas/records/preview/by/%7BIdentifierType%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"identifierValue\":\"string\",\"context\":{\"property1\":null,\"property2\":null},\"fieldContext\":{\"property1\":{\"page\":1,\"limit\":10,\"itemId\":\"item-123\",\"additionalFilters\":\"custom filter value\"},\"property2\":{\"page\":1,\"limit\":10,\"itemId\":\"item-123\",\"additionalFilters\":\"custom filter value\"}},\"values\":{\"property1\":null,\"property2\":null},\"schema\":{\"fields\":{\"type\":\"object\",\"properties\":{\"property1\":{\"type\":\"number\",\"subtype\":\"number\",\"minimum\":0.1,\"maximum\":0.1,\"unique\":true,\"searchable\":true,\"default\":0,\"isConstantField\":false},\"property2\":{\"type\":\"number\",\"subtype\":\"number\",\"minimum\":0.1,\"maximum\":0.1,\"unique\":true,\"searchable\":true,\"default\":0,\"isConstantField\":false}},\"required\":[\"string\"],\"allOf\":[{\"if\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}},\"then\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}},\"else\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}}}],\"additionalProperties\":true},\"audience\":{\"targetType\":\"SEGMENT\",\"segments\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"query\":\"{\\\\\\\"analysis\\\\\\\":{\\\\\\\"title\\\\\\\":\\\\\\\"notempty\\\\\\\",\\\\\\\"segments\\\\\\\":[{\\\\\\\"title\\\\\\\":\\\\\\\"notempty\\\\\\\",\\\\\\\"filter\\\\\\\":{\\\\\\\"matching\\\\\\\":true,\\\\\\\"expressions\\\\\\\":[{\\\\\\\"type\\\\\\\":\\\\\\\"ATTRIBUTE\\\\\\\",\\\\\\\"attribute\\\\\\\":{\\\\\\\"expressions\\\\\\\":[{\\\\\\\"constraint\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"BOOL\\\\\\\",\\\\\\\"logic\\\\\\\":\\\\\\\"IS_TRUE\\\\\\\"},\\\\\\\"attribute\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"PARAM\\\\\\\",\\\\\\\"param\\\\\\\":\\\\\\\"exampleBool\\\\\\\"}}]}}]}}]}}\"},\"schemaType\":\"SIMPLE\"}}")
              .asString();
  /brickworks/v1/schemas/records/preview:
    post:
      tags:
        - "Brickworks: Records"
      summary: Preview object (as any consumer)
      description: |
        Preview an object by sending field values. 

        When generating a preview, fields are only generated when you send their value or they have a default value. Values saved in the record are not used in the preview.

        Some data is cached:
        - profile data (even if the profile is updated)
        - responses from external sources  
        For details, see the [User Guide](https://hub.synerise.com/docs/assets/brickworks/limits).


        ---

        **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>, <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:** `BRICKWORKS_RECORDS_READ`

        **User role permission required:** `assets_brickworks: read`
      operationId: previewObjectByProfile
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/brickworks-service-PreviewRequestWithoutIdentifier"
      responses:
        "200":
          description: Generated JSON
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/brickworks-service-GeneratedObject"
        "400":
          $ref: "#/components/responses/brickworks-service-GenericBadRequestError"
        "401":
          $ref: "#/components/responses/brickworks-service-GenericUnauthorizedError"
        "403":
          $ref: "#/components/responses/brickworks-service-GenericForbiddenError"
        "404":
          $ref: "#/components/responses/brickworks-service-GenericNotFoundError"
        "409":
          $ref: "#/components/responses/brickworks-service-GenericConflictError"
        "422":
          $ref: "#/components/responses/brickworks-service-GenericUnprocessableContentError"
        "500":
          $ref: "#/components/responses/brickworks-service-GenericError"
      x-snr-doc-urls:
        - /api-reference/brickworks#tag/Brickworks:-Records/operation/previewObjectByProfile
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/brickworks/v1/schemas/records/preview \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"context":{"property1":null,"property2":null},"fieldContext":{"property1":{"page":1,"limit":10,"itemId":"item-123","additionalFilters":"custom filter value"},"property2":{"page":1,"limit":10,"itemId":"item-123","additionalFilters":"custom filter value"}},"values":{"property1":null,"property2":null},"schema":{"fields":{"type":"object","properties":{"property1":{"type":"number","subtype":"number","minimum":0.1,"maximum":0.1,"unique":true,"searchable":true,"default":0,"isConstantField":false},"property2":{"type":"number","subtype":"number","minimum":0.1,"maximum":0.1,"unique":true,"searchable":true,"default":0,"isConstantField":false}},"required":["string"],"allOf":[{"if":{"required":["string"],"properties":{"property1":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}},"property2":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}}}},"then":{"required":["string"],"properties":{"property1":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}},"property2":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}}}},"else":{"required":["string"],"properties":{"property1":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}},"property2":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}}}}}],"additionalProperties":true},"audience":{"targetType":"SEGMENT","segments":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"query":"{\\\"analysis\\\":{\\\"title\\\":\\\"notempty\\\",\\\"segments\\\":[{\\\"title\\\":\\\"notempty\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"exampleBool\\\"}}]}}]}}]}}"},"schemaType":"SIMPLE"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"context\":{\"property1\":null,\"property2\":null},\"fieldContext\":{\"property1\":{\"page\":1,\"limit\":10,\"itemId\":\"item-123\",\"additionalFilters\":\"custom filter value\"},\"property2\":{\"page\":1,\"limit\":10,\"itemId\":\"item-123\",\"additionalFilters\":\"custom filter value\"}},\"values\":{\"property1\":null,\"property2\":null},\"schema\":{\"fields\":{\"type\":\"object\",\"properties\":{\"property1\":{\"type\":\"number\",\"subtype\":\"number\",\"minimum\":0.1,\"maximum\":0.1,\"unique\":true,\"searchable\":true,\"default\":0,\"isConstantField\":false},\"property2\":{\"type\":\"number\",\"subtype\":\"number\",\"minimum\":0.1,\"maximum\":0.1,\"unique\":true,\"searchable\":true,\"default\":0,\"isConstantField\":false}},\"required\":[\"string\"],\"allOf\":[{\"if\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}},\"then\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}},\"else\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}}}],\"additionalProperties\":true},\"audience\":{\"targetType\":\"SEGMENT\",\"segments\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"query\":\"{\\\\\\\"analysis\\\\\\\":{\\\\\\\"title\\\\\\\":\\\\\\\"notempty\\\\\\\",\\\\\\\"segments\\\\\\\":[{\\\\\\\"title\\\\\\\":\\\\\\\"notempty\\\\\\\",\\\\\\\"filter\\\\\\\":{\\\\\\\"matching\\\\\\\":true,\\\\\\\"expressions\\\\\\\":[{\\\\\\\"type\\\\\\\":\\\\\\\"ATTRIBUTE\\\\\\\",\\\\\\\"attribute\\\\\\\":{\\\\\\\"expressions\\\\\\\":[{\\\\\\\"constraint\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"BOOL\\\\\\\",\\\\\\\"logic\\\\\\\":\\\\\\\"IS_TRUE\\\\\\\"},\\\\\\\"attribute\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"PARAM\\\\\\\",\\\\\\\"param\\\\\\\":\\\\\\\"exampleBool\\\\\\\"}}]}}]}}]}}\"},\"schemaType\":\"SIMPLE\"}}"

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

            conn.request("POST", "/brickworks/v1/schemas/records/preview", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "context": {
                "property1": null,
                "property2": null
              },
              "fieldContext": {
                "property1": {
                  "page": 1,
                  "limit": 10,
                  "itemId": "item-123",
                  "additionalFilters": "custom filter value"
                },
                "property2": {
                  "page": 1,
                  "limit": 10,
                  "itemId": "item-123",
                  "additionalFilters": "custom filter value"
                }
              },
              "values": {
                "property1": null,
                "property2": null
              },
              "schema": {
                "fields": {
                  "type": "object",
                  "properties": {
                    "property1": {
                      "type": "number",
                      "subtype": "number",
                      "minimum": 0.1,
                      "maximum": 0.1,
                      "unique": true,
                      "searchable": true,
                      "default": 0,
                      "isConstantField": false
                    },
                    "property2": {
                      "type": "number",
                      "subtype": "number",
                      "minimum": 0.1,
                      "maximum": 0.1,
                      "unique": true,
                      "searchable": true,
                      "default": 0,
                      "isConstantField": false
                    }
                  },
                  "required": [
                    "string"
                  ],
                  "allOf": [
                    {
                      "if": {
                        "required": [
                          "string"
                        ],
                        "properties": {
                          "property1": {
                            "minItems": 0,
                            "maxItems": 0,
                            "uniqueItems": true,
                            "minimum": 0,
                            "maximum": 0,
                            "pattern": "string",
                            "const": null,
                            "enum": [
                              "string"
                            ],
                            "not": {}
                          },
                          "property2": {
                            "minItems": 0,
                            "maxItems": 0,
                            "uniqueItems": true,
                            "minimum": 0,
                            "maximum": 0,
                            "pattern": "string",
                            "const": null,
                            "enum": [
                              "string"
                            ],
                            "not": {}
                          }
                        }
                      },
                      "then": {
                        "required": [
                          "string"
                        ],
                        "properties": {
                          "property1": {
                            "minItems": 0,
                            "maxItems": 0,
                            "uniqueItems": true,
                            "minimum": 0,
                            "maximum": 0,
                            "pattern": "string",
                            "const": null,
                            "enum": [
                              "string"
                            ],
                            "not": {}
                          },
                          "property2": {
                            "minItems": 0,
                            "maxItems": 0,
                            "uniqueItems": true,
                            "minimum": 0,
                            "maximum": 0,
                            "pattern": "string",
                            "const": null,
                            "enum": [
                              "string"
                            ],
                            "not": {}
                          }
                        }
                      },
                      "else": {
                        "required": [
                          "string"
                        ],
                        "properties": {
                          "property1": {
                            "minItems": 0,
                            "maxItems": 0,
                            "uniqueItems": true,
                            "minimum": 0,
                            "maximum": 0,
                            "pattern": "string",
                            "const": null,
                            "enum": [
                              "string"
                            ],
                            "not": {}
                          },
                          "property2": {
                            "minItems": 0,
                            "maxItems": 0,
                            "uniqueItems": true,
                            "minimum": 0,
                            "maximum": 0,
                            "pattern": "string",
                            "const": null,
                            "enum": [
                              "string"
                            ],
                            "not": {}
                          }
                        }
                      }
                    }
                  ],
                  "additionalProperties": true
                },
                "audience": {
                  "targetType": "SEGMENT",
                  "segments": [
                    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
                  ],
                  "query": "{\\\"analysis\\\":{\\\"title\\\":\\\"notempty\\\",\\\"segments\\\":[{\\\"title\\\":\\\"notempty\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"exampleBool\\\"}}]}}]}}]}}"
                },
                "schemaType": "SIMPLE"
              }
            });

            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/brickworks/v1/schemas/records/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": "/brickworks/v1/schemas/records/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({
              context: {property1: null, property2: null},
              fieldContext: {
                property1: {
                  page: 1,
                  limit: 10,
                  itemId: 'item-123',
                  additionalFilters: 'custom filter value'
                },
                property2: {
                  page: 1,
                  limit: 10,
                  itemId: 'item-123',
                  additionalFilters: 'custom filter value'
                }
              },
              values: {property1: null, property2: null},
              schema: {
                fields: {
                  type: 'object',
                  properties: {
                    property1: {
                      type: 'number',
                      subtype: 'number',
                      minimum: 0.1,
                      maximum: 0.1,
                      unique: true,
                      searchable: true,
                      default: 0,
                      isConstantField: false
                    },
                    property2: {
                      type: 'number',
                      subtype: 'number',
                      minimum: 0.1,
                      maximum: 0.1,
                      unique: true,
                      searchable: true,
                      default: 0,
                      isConstantField: false
                    }
                  },
                  required: ['string'],
                  allOf: [
                    {
                      if: {
                        required: ['string'],
                        properties: {
                          property1: {
                            minItems: 0,
                            maxItems: 0,
                            uniqueItems: true,
                            minimum: 0,
                            maximum: 0,
                            pattern: 'string',
                            const: null,
                            enum: ['string'],
                            not: {}
                          },
                          property2: {
                            minItems: 0,
                            maxItems: 0,
                            uniqueItems: true,
                            minimum: 0,
                            maximum: 0,
                            pattern: 'string',
                            const: null,
                            enum: ['string'],
                            not: {}
                          }
                        }
                      },
                      then: {
                        required: ['string'],
                        properties: {
                          property1: {
                            minItems: 0,
                            maxItems: 0,
                            uniqueItems: true,
                            minimum: 0,
                            maximum: 0,
                            pattern: 'string',
                            const: null,
                            enum: ['string'],
                            not: {}
                          },
                          property2: {
                            minItems: 0,
                            maxItems: 0,
                            uniqueItems: true,
                            minimum: 0,
                            maximum: 0,
                            pattern: 'string',
                            const: null,
                            enum: ['string'],
                            not: {}
                          }
                        }
                      },
                      else: {
                        required: ['string'],
                        properties: {
                          property1: {
                            minItems: 0,
                            maxItems: 0,
                            uniqueItems: true,
                            minimum: 0,
                            maximum: 0,
                            pattern: 'string',
                            const: null,
                            enum: ['string'],
                            not: {}
                          },
                          property2: {
                            minItems: 0,
                            maxItems: 0,
                            uniqueItems: true,
                            minimum: 0,
                            maximum: 0,
                            pattern: 'string',
                            const: null,
                            enum: ['string'],
                            not: {}
                          }
                        }
                      }
                    }
                  ],
                  additionalProperties: true
                },
                audience: {
                  targetType: 'SEGMENT',
                  segments: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],
                  query: '{\"analysis\":{\"title\":\"notempty\",\"segments\":[{\"title\":\"notempty\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"exampleBool\"}}]}}]}}]}}'
                },
                schemaType: 'SIMPLE'
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/brickworks/v1/schemas/records/preview');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"context":{"property1":null,"property2":null},"fieldContext":{"property1":{"page":1,"limit":10,"itemId":"item-123","additionalFilters":"custom filter value"},"property2":{"page":1,"limit":10,"itemId":"item-123","additionalFilters":"custom filter value"}},"values":{"property1":null,"property2":null},"schema":{"fields":{"type":"object","properties":{"property1":{"type":"number","subtype":"number","minimum":0.1,"maximum":0.1,"unique":true,"searchable":true,"default":0,"isConstantField":false},"property2":{"type":"number","subtype":"number","minimum":0.1,"maximum":0.1,"unique":true,"searchable":true,"default":0,"isConstantField":false}},"required":["string"],"allOf":[{"if":{"required":["string"],"properties":{"property1":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}},"property2":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}}}},"then":{"required":["string"],"properties":{"property1":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}},"property2":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}}}},"else":{"required":["string"],"properties":{"property1":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}},"property2":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}}}}}],"additionalProperties":true},"audience":{"targetType":"SEGMENT","segments":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"query":"{\\\\\\"analysis\\\\\\":{\\\\\\"title\\\\\\":\\\\\\"notempty\\\\\\",\\\\\\"segments\\\\\\":[{\\\\\\"title\\\\\\":\\\\\\"notempty\\\\\\",\\\\\\"filter\\\\\\":{\\\\\\"matching\\\\\\":true,\\\\\\"expressions\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"ATTRIBUTE\\\\\\",\\\\\\"attribute\\\\\\":{\\\\\\"expressions\\\\\\":[{\\\\\\"constraint\\\\\\":{\\\\\\"type\\\\\\":\\\\\\"BOOL\\\\\\",\\\\\\"logic\\\\\\":\\\\\\"IS_TRUE\\\\\\"},\\\\\\"attribute\\\\\\":{\\\\\\"type\\\\\\":\\\\\\"PARAM\\\\\\",\\\\\\"param\\\\\\":\\\\\\"exampleBool\\\\\\"}}]}}]}}]}}"},"schemaType":"SIMPLE"}}');

            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/brickworks/v1/schemas/records/preview")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"context\":{\"property1\":null,\"property2\":null},\"fieldContext\":{\"property1\":{\"page\":1,\"limit\":10,\"itemId\":\"item-123\",\"additionalFilters\":\"custom filter value\"},\"property2\":{\"page\":1,\"limit\":10,\"itemId\":\"item-123\",\"additionalFilters\":\"custom filter value\"}},\"values\":{\"property1\":null,\"property2\":null},\"schema\":{\"fields\":{\"type\":\"object\",\"properties\":{\"property1\":{\"type\":\"number\",\"subtype\":\"number\",\"minimum\":0.1,\"maximum\":0.1,\"unique\":true,\"searchable\":true,\"default\":0,\"isConstantField\":false},\"property2\":{\"type\":\"number\",\"subtype\":\"number\",\"minimum\":0.1,\"maximum\":0.1,\"unique\":true,\"searchable\":true,\"default\":0,\"isConstantField\":false}},\"required\":[\"string\"],\"allOf\":[{\"if\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}},\"then\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}},\"else\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}}}],\"additionalProperties\":true},\"audience\":{\"targetType\":\"SEGMENT\",\"segments\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"query\":\"{\\\\\\\"analysis\\\\\\\":{\\\\\\\"title\\\\\\\":\\\\\\\"notempty\\\\\\\",\\\\\\\"segments\\\\\\\":[{\\\\\\\"title\\\\\\\":\\\\\\\"notempty\\\\\\\",\\\\\\\"filter\\\\\\\":{\\\\\\\"matching\\\\\\\":true,\\\\\\\"expressions\\\\\\\":[{\\\\\\\"type\\\\\\\":\\\\\\\"ATTRIBUTE\\\\\\\",\\\\\\\"attribute\\\\\\\":{\\\\\\\"expressions\\\\\\\":[{\\\\\\\"constraint\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"BOOL\\\\\\\",\\\\\\\"logic\\\\\\\":\\\\\\\"IS_TRUE\\\\\\\"},\\\\\\\"attribute\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"PARAM\\\\\\\",\\\\\\\"param\\\\\\\":\\\\\\\"exampleBool\\\\\\\"}}]}}]}}]}}\"},\"schemaType\":\"SIMPLE\"}}")
              .asString();
  /brickworks/v1/external-sources:
    post:
      tags:
        - "Brickworks: External sources"
      summary: Create external source
      description: |
        Create an external data source definition. External sources can be used as a special schema field to retrieve data from a given URL when generating an object from a record.

        Before starting, make sure you have a [connection](https://hub.synerise.com/docs/settings/tool/connections/) which you can use in the external source definition.


        ---

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

        **User role permission required:** `assets_brickworks: create`
      operationId: createExternalSource
      security:
        - JWT: []
      requestBody:
        description: External data source definition
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/brickworks-service-CreateExternalSourceRequest"
      responses:
        "200":
          description: External Data Source created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/brickworks-service-ExternalSourceModel"
        "400":
          $ref: "#/components/responses/brickworks-service-GenericBadRequestError"
        "401":
          $ref: "#/components/responses/brickworks-service-GenericUnauthorizedError"
        "403":
          $ref: "#/components/responses/brickworks-service-GenericForbiddenError"
        "404":
          $ref: "#/components/responses/brickworks-service-GenericNotFoundError"
        "409":
          $ref: "#/components/responses/brickworks-service-GenericConflictError"
        "422":
          $ref: "#/components/responses/brickworks-service-GenericUnprocessableContentError"
        "500":
          $ref: "#/components/responses/brickworks-service-GenericError"
      x-snr-doc-urls:
        - /api-reference/brickworks#tag/Brickworks:-External-sources/operation/createExternalSource
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/brickworks/v1/external-sources \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"string","description":"string","properties":{"sourceType":"http_source","url":"https://example.com/clients/{% customer email %}","method":"post","headers":{"property1":"string","property2":"string"},"params":{"property1":"string","property2":"string"},"authType":"basic","authId":"25d4321e-f980-49d3-983b-4275c49dc2c4","body":{"someString":"string","someObject":{"key":"{% customer email %}"},"dynamicField":"{% customer id %}"},"bodySchema":{"type":"object","subtype":"key_value","properties":{"someObject":{"type":"object","subtype":"key_value","properties":{"key":{"type":"string","subtype":"jinjava"}},"additionalProperties":true},"dynamicField":{"type":"string","subtype":"jinjava"}},"additionalProperties":true}},"ttl":0}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"name\":\"string\",\"description\":\"string\",\"properties\":{\"sourceType\":\"http_source\",\"url\":\"https://example.com/clients/{% customer email %}\",\"method\":\"post\",\"headers\":{\"property1\":\"string\",\"property2\":\"string\"},\"params\":{\"property1\":\"string\",\"property2\":\"string\"},\"authType\":\"basic\",\"authId\":\"25d4321e-f980-49d3-983b-4275c49dc2c4\",\"body\":{\"someString\":\"string\",\"someObject\":{\"key\":\"{% customer email %}\"},\"dynamicField\":\"{% customer id %}\"},\"bodySchema\":{\"type\":\"object\",\"subtype\":\"key_value\",\"properties\":{\"someObject\":{\"type\":\"object\",\"subtype\":\"key_value\",\"properties\":{\"key\":{\"type\":\"string\",\"subtype\":\"jinjava\"}},\"additionalProperties\":true},\"dynamicField\":{\"type\":\"string\",\"subtype\":\"jinjava\"}},\"additionalProperties\":true}},\"ttl\":0}"

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

            conn.request("POST", "/brickworks/v1/external-sources", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "name": "string",
              "description": "string",
              "properties": {
                "sourceType": "http_source",
                "url": "https://example.com/clients/{% customer email %}",
                "method": "post",
                "headers": {
                  "property1": "string",
                  "property2": "string"
                },
                "params": {
                  "property1": "string",
                  "property2": "string"
                },
                "authType": "basic",
                "authId": "25d4321e-f980-49d3-983b-4275c49dc2c4",
                "body": {
                  "someString": "string",
                  "someObject": {
                    "key": "{% customer email %}"
                  },
                  "dynamicField": "{% customer id %}"
                },
                "bodySchema": {
                  "type": "object",
                  "subtype": "key_value",
                  "properties": {
                    "someObject": {
                      "type": "object",
                      "subtype": "key_value",
                      "properties": {
                        "key": {
                          "type": "string",
                          "subtype": "jinjava"
                        }
                      },
                      "additionalProperties": true
                    },
                    "dynamicField": {
                      "type": "string",
                      "subtype": "jinjava"
                    }
                  },
                  "additionalProperties": true
                }
              },
              "ttl": 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/brickworks/v1/external-sources");
            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": "/brickworks/v1/external-sources",
              "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',
              description: 'string',
              properties: {
                sourceType: 'http_source',
                url: 'https://example.com/clients/{% customer email %}',
                method: 'post',
                headers: {property1: 'string', property2: 'string'},
                params: {property1: 'string', property2: 'string'},
                authType: 'basic',
                authId: '25d4321e-f980-49d3-983b-4275c49dc2c4',
                body: {
                  someString: 'string',
                  someObject: {key: '{% customer email %}'},
                  dynamicField: '{% customer id %}'
                },
                bodySchema: {
                  type: 'object',
                  subtype: 'key_value',
                  properties: {
                    someObject: {
                      type: 'object',
                      subtype: 'key_value',
                      properties: {key: {type: 'string', subtype: 'jinjava'}},
                      additionalProperties: true
                    },
                    dynamicField: {type: 'string', subtype: 'jinjava'}
                  },
                  additionalProperties: true
                }
              },
              ttl: 0
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/brickworks/v1/external-sources');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"name":"string","description":"string","properties":{"sourceType":"http_source","url":"https://example.com/clients/{% customer email %}","method":"post","headers":{"property1":"string","property2":"string"},"params":{"property1":"string","property2":"string"},"authType":"basic","authId":"25d4321e-f980-49d3-983b-4275c49dc2c4","body":{"someString":"string","someObject":{"key":"{% customer email %}"},"dynamicField":"{% customer id %}"},"bodySchema":{"type":"object","subtype":"key_value","properties":{"someObject":{"type":"object","subtype":"key_value","properties":{"key":{"type":"string","subtype":"jinjava"}},"additionalProperties":true},"dynamicField":{"type":"string","subtype":"jinjava"}},"additionalProperties":true}},"ttl":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/brickworks/v1/external-sources")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\",\"description\":\"string\",\"properties\":{\"sourceType\":\"http_source\",\"url\":\"https://example.com/clients/{% customer email %}\",\"method\":\"post\",\"headers\":{\"property1\":\"string\",\"property2\":\"string\"},\"params\":{\"property1\":\"string\",\"property2\":\"string\"},\"authType\":\"basic\",\"authId\":\"25d4321e-f980-49d3-983b-4275c49dc2c4\",\"body\":{\"someString\":\"string\",\"someObject\":{\"key\":\"{% customer email %}\"},\"dynamicField\":\"{% customer id %}\"},\"bodySchema\":{\"type\":\"object\",\"subtype\":\"key_value\",\"properties\":{\"someObject\":{\"type\":\"object\",\"subtype\":\"key_value\",\"properties\":{\"key\":{\"type\":\"string\",\"subtype\":\"jinjava\"}},\"additionalProperties\":true},\"dynamicField\":{\"type\":\"string\",\"subtype\":\"jinjava\"}},\"additionalProperties\":true}},\"ttl\":0}")
              .asString();
    get:
      tags:
        - "Brickworks: External sources"
      summary: List external sources
      description: |
        Retrieve a list of external data sources. You can sort and paginate the results.

        ---

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

        **User role permission required:** `assets_brickworks: read`
      operationId: listExternalSource
      parameters:
        - $ref: "#/components/parameters/brickworks-service-queryLimit"
        - $ref: "#/components/parameters/brickworks-service-queryPage"
        - $ref: "#/components/parameters/brickworks-service-querySearch"
        - in: query
          name: sortBy
          required: false
          description: |
            You can sort by:
            - `createdAt`
            - `updatedAt`
            - `name`
          schema:
            type: string
            example: createdAt:asc|desc
        - $ref: "#/components/parameters/brickworks-service-methodQueryParam"
      security:
        - JWT: []
      responses:
        "200":
          description: A page of external data sources
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/brickworks-service-ExternalSourcePagingResult"
        "400":
          $ref: "#/components/responses/brickworks-service-GenericBadRequestError"
        "401":
          $ref: "#/components/responses/brickworks-service-GenericUnauthorizedError"
        "403":
          $ref: "#/components/responses/brickworks-service-GenericForbiddenError"
        "404":
          $ref: "#/components/responses/brickworks-service-GenericNotFoundError"
        "409":
          $ref: "#/components/responses/brickworks-service-GenericConflictError"
        "422":
          $ref: "#/components/responses/brickworks-service-GenericUnprocessableContentError"
        "500":
          $ref: "#/components/responses/brickworks-service-GenericError"
      x-snr-doc-urls:
        - /api-reference/brickworks#tag/Brickworks:-External-sources/operation/listExternalSource
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/brickworks/v1/external-sources?limit=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=createdAt%3Aasc%7Cdesc&method=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", "/brickworks/v1/external-sources?limit=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=createdAt%3Aasc%7Cdesc&method=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/brickworks/v1/external-sources?limit=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=createdAt%3Aasc%7Cdesc&method=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": "/brickworks/v1/external-sources?limit=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=createdAt%3Aasc%7Cdesc&method=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/brickworks/v1/external-sources');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'limit' => 'SOME_INTEGER_VALUE',
              'page' => 'SOME_INTEGER_VALUE',
              'search' => 'SOME_STRING_VALUE',
              'sortBy' => 'createdAt:asc|desc',
              'method' => '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/brickworks/v1/external-sources?limit=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=createdAt%3Aasc%7Cdesc&method=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /brickworks/v1/external-sources/{ExternalDataSourceId}:
    get:
      tags:
        - "Brickworks: External sources"
      summary: Get External Source
      description: |
        Retrieve the details of an external data source.

        ---

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

        **User role permission required:** `assets_brickworks: read`
      operationId: getExternalSourceById
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/brickworks-service-pathExternalDataSourceId"
      responses:
        "200":
          description: Details of the external source
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/brickworks-service-ExternalSourceModel"
        "400":
          $ref: "#/components/responses/brickworks-service-GenericBadRequestError"
        "401":
          $ref: "#/components/responses/brickworks-service-GenericUnauthorizedError"
        "403":
          $ref: "#/components/responses/brickworks-service-GenericForbiddenError"
        "404":
          $ref: "#/components/responses/brickworks-service-GenericNotFoundError"
        "409":
          $ref: "#/components/responses/brickworks-service-GenericConflictError"
        "422":
          $ref: "#/components/responses/brickworks-service-GenericUnprocessableContentError"
        "500":
          $ref: "#/components/responses/brickworks-service-GenericError"
      x-snr-doc-urls:
        - /api-reference/brickworks#tag/Brickworks:-External-sources/operation/getExternalSourceById
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/brickworks/v1/external-sources/%7BExternalDataSourceId%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", "/brickworks/v1/external-sources/%7BExternalDataSourceId%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/brickworks/v1/external-sources/%7BExternalDataSourceId%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": "/brickworks/v1/external-sources/%7BExternalDataSourceId%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/brickworks/v1/external-sources/%7BExternalDataSourceId%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/brickworks/v1/external-sources/%7BExternalDataSourceId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    put:
      tags:
        - "Brickworks: External sources"
      summary: Update External Source
      description: |
        Update an external data source definition.

        ---

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

        **User role permission required:** `assets_brickworks: update`
      operationId: updateExternalSource
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/brickworks-service-pathExternalDataSourceId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/brickworks-service-UpdateExternalSourceRequest"
      responses:
        "200":
          description: External Source updated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/brickworks-service-ExternalSourceModel"
        "400":
          $ref: "#/components/responses/brickworks-service-GenericBadRequestError"
        "401":
          $ref: "#/components/responses/brickworks-service-GenericUnauthorizedError"
        "403":
          $ref: "#/components/responses/brickworks-service-GenericForbiddenError"
        "404":
          $ref: "#/components/responses/brickworks-service-GenericNotFoundError"
        "409":
          $ref: "#/components/responses/brickworks-service-GenericConflictError"
        "422":
          $ref: "#/components/responses/brickworks-service-GenericUnprocessableContentError"
        "500":
          $ref: "#/components/responses/brickworks-service-GenericError"
      x-snr-doc-urls:
        - /api-reference/brickworks#tag/Brickworks:-External-sources/operation/updateExternalSource
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/brickworks/v1/external-sources/%7BExternalDataSourceId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"string","description":"string","properties":{"sourceType":"http_source","url":"https://example.com/clients/{% customer email %}","method":"post","headers":{"property1":"string","property2":"string"},"params":{"property1":"string","property2":"string"},"authType":"basic","authId":"25d4321e-f980-49d3-983b-4275c49dc2c4","body":{"someString":"string","someObject":{"key":"{% customer email %}"},"dynamicField":"{% customer id %}"},"bodySchema":{"type":"object","subtype":"key_value","properties":{"someObject":{"type":"object","subtype":"key_value","properties":{"key":{"type":"string","subtype":"jinjava"}},"additionalProperties":true},"dynamicField":{"type":"string","subtype":"jinjava"}},"additionalProperties":true}},"ttl":0}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"name\":\"string\",\"description\":\"string\",\"properties\":{\"sourceType\":\"http_source\",\"url\":\"https://example.com/clients/{% customer email %}\",\"method\":\"post\",\"headers\":{\"property1\":\"string\",\"property2\":\"string\"},\"params\":{\"property1\":\"string\",\"property2\":\"string\"},\"authType\":\"basic\",\"authId\":\"25d4321e-f980-49d3-983b-4275c49dc2c4\",\"body\":{\"someString\":\"string\",\"someObject\":{\"key\":\"{% customer email %}\"},\"dynamicField\":\"{% customer id %}\"},\"bodySchema\":{\"type\":\"object\",\"subtype\":\"key_value\",\"properties\":{\"someObject\":{\"type\":\"object\",\"subtype\":\"key_value\",\"properties\":{\"key\":{\"type\":\"string\",\"subtype\":\"jinjava\"}},\"additionalProperties\":true},\"dynamicField\":{\"type\":\"string\",\"subtype\":\"jinjava\"}},\"additionalProperties\":true}},\"ttl\":0}"

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

            conn.request("PUT", "/brickworks/v1/external-sources/%7BExternalDataSourceId%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",
              "description": "string",
              "properties": {
                "sourceType": "http_source",
                "url": "https://example.com/clients/{% customer email %}",
                "method": "post",
                "headers": {
                  "property1": "string",
                  "property2": "string"
                },
                "params": {
                  "property1": "string",
                  "property2": "string"
                },
                "authType": "basic",
                "authId": "25d4321e-f980-49d3-983b-4275c49dc2c4",
                "body": {
                  "someString": "string",
                  "someObject": {
                    "key": "{% customer email %}"
                  },
                  "dynamicField": "{% customer id %}"
                },
                "bodySchema": {
                  "type": "object",
                  "subtype": "key_value",
                  "properties": {
                    "someObject": {
                      "type": "object",
                      "subtype": "key_value",
                      "properties": {
                        "key": {
                          "type": "string",
                          "subtype": "jinjava"
                        }
                      },
                      "additionalProperties": true
                    },
                    "dynamicField": {
                      "type": "string",
                      "subtype": "jinjava"
                    }
                  },
                  "additionalProperties": true
                }
              },
              "ttl": 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/brickworks/v1/external-sources/%7BExternalDataSourceId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/brickworks/v1/external-sources/%7BExternalDataSourceId%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',
              description: 'string',
              properties: {
                sourceType: 'http_source',
                url: 'https://example.com/clients/{% customer email %}',
                method: 'post',
                headers: {property1: 'string', property2: 'string'},
                params: {property1: 'string', property2: 'string'},
                authType: 'basic',
                authId: '25d4321e-f980-49d3-983b-4275c49dc2c4',
                body: {
                  someString: 'string',
                  someObject: {key: '{% customer email %}'},
                  dynamicField: '{% customer id %}'
                },
                bodySchema: {
                  type: 'object',
                  subtype: 'key_value',
                  properties: {
                    someObject: {
                      type: 'object',
                      subtype: 'key_value',
                      properties: {key: {type: 'string', subtype: 'jinjava'}},
                      additionalProperties: true
                    },
                    dynamicField: {type: 'string', subtype: 'jinjava'}
                  },
                  additionalProperties: true
                }
              },
              ttl: 0
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/brickworks/v1/external-sources/%7BExternalDataSourceId%7D');
            $request->setMethod(HTTP_METH_PUT);

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

            $request->setBody('{"name":"string","description":"string","properties":{"sourceType":"http_source","url":"https://example.com/clients/{% customer email %}","method":"post","headers":{"property1":"string","property2":"string"},"params":{"property1":"string","property2":"string"},"authType":"basic","authId":"25d4321e-f980-49d3-983b-4275c49dc2c4","body":{"someString":"string","someObject":{"key":"{% customer email %}"},"dynamicField":"{% customer id %}"},"bodySchema":{"type":"object","subtype":"key_value","properties":{"someObject":{"type":"object","subtype":"key_value","properties":{"key":{"type":"string","subtype":"jinjava"}},"additionalProperties":true},"dynamicField":{"type":"string","subtype":"jinjava"}},"additionalProperties":true}},"ttl":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/brickworks/v1/external-sources/%7BExternalDataSourceId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\",\"description\":\"string\",\"properties\":{\"sourceType\":\"http_source\",\"url\":\"https://example.com/clients/{% customer email %}\",\"method\":\"post\",\"headers\":{\"property1\":\"string\",\"property2\":\"string\"},\"params\":{\"property1\":\"string\",\"property2\":\"string\"},\"authType\":\"basic\",\"authId\":\"25d4321e-f980-49d3-983b-4275c49dc2c4\",\"body\":{\"someString\":\"string\",\"someObject\":{\"key\":\"{% customer email %}\"},\"dynamicField\":\"{% customer id %}\"},\"bodySchema\":{\"type\":\"object\",\"subtype\":\"key_value\",\"properties\":{\"someObject\":{\"type\":\"object\",\"subtype\":\"key_value\",\"properties\":{\"key\":{\"type\":\"string\",\"subtype\":\"jinjava\"}},\"additionalProperties\":true},\"dynamicField\":{\"type\":\"string\",\"subtype\":\"jinjava\"}},\"additionalProperties\":true}},\"ttl\":0}")
              .asString();
    delete:
      tags:
        - "Brickworks: External sources"
      summary: Delete external source
      description: |
        Permanently delete an external data source definition.

        ---

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

        **User role permission required:** `assets_brickworks: delete`
      operationId: deleteExternalSource
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/brickworks-service-pathExternalDataSourceId"
      responses:
        "204":
          description: No content
        "400":
          $ref: "#/components/responses/brickworks-service-GenericBadRequestError"
        "401":
          $ref: "#/components/responses/brickworks-service-GenericUnauthorizedError"
        "403":
          $ref: "#/components/responses/brickworks-service-GenericForbiddenError"
        "404":
          $ref: "#/components/responses/brickworks-service-GenericNotFoundError"
        "409":
          $ref: "#/components/responses/brickworks-service-GenericConflictError"
        "422":
          $ref: "#/components/responses/brickworks-service-GenericUnprocessableContentError"
        "500":
          $ref: "#/components/responses/brickworks-service-GenericError"
      x-snr-doc-urls:
        - /api-reference/brickworks#tag/Brickworks:-External-sources/operation/deleteExternalSource
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/brickworks/v1/external-sources/%7BExternalDataSourceId%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", "/brickworks/v1/external-sources/%7BExternalDataSourceId%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/brickworks/v1/external-sources/%7BExternalDataSourceId%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": "/brickworks/v1/external-sources/%7BExternalDataSourceId%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/brickworks/v1/external-sources/%7BExternalDataSourceId%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/brickworks/v1/external-sources/%7BExternalDataSourceId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}/duplicate:
    post:
      tags:
        - "Brickworks: Records"
      summary: Duplicate record
      description: |
        Create a copy of a record. The name of the copy is `{recordName} - copy`

        ---

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

        **User role permission required:** `assets_brickworks: create`
      operationId: duplicateRecordBySchemaAppIdAndRecordId
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/brickworks-service-pathSchemaIdentifier"
        - $ref: "#/components/parameters/brickworks-service-pathRecordIdentifier"
      responses:
        "200":
          description: Data of the created record
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/brickworks-service-Record"
        "400":
          $ref: "#/components/responses/brickworks-service-GenericBadRequestError"
        "401":
          $ref: "#/components/responses/brickworks-service-GenericUnauthorizedError"
        "403":
          $ref: "#/components/responses/brickworks-service-GenericForbiddenError"
        "404":
          $ref: "#/components/responses/brickworks-service-GenericNotFoundError"
        "409":
          $ref: "#/components/responses/brickworks-service-GenericConflictError"
        "422":
          $ref: "#/components/responses/brickworks-service-GenericUnprocessableContentError"
        "500":
          $ref: "#/components/responses/brickworks-service-GenericError"
      x-snr-doc-urls:
        - /api-reference/brickworks#tag/Brickworks:-Records/operation/duplicateRecordBySchemaAppIdAndRecordId
  /brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}/versions:
    get:
      tags:
        - "Brickworks: Record versions"
      summary: Get record versions
      description: |
        Retrieve all versions of a record. You can paginate, sort, and refine the results. By default, the versions are sorted from newest to oldest.

        ---

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

        **User role permission required:** `assets_brickworks: read`
      operationId: getRecordVersions
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/brickworks-service-pathSchemaIdentifier"
        - $ref: "#/components/parameters/brickworks-service-pathRecordIdentifier"
        - $ref: "#/components/parameters/brickworks-service-queryLimit"
        - $ref: "#/components/parameters/brickworks-service-queryPage"
        - $ref: "#/components/parameters/brickworks-service-queryRecordFilters"
        - $ref: "#/components/parameters/brickworks-service-querySortBy"
        - $ref: "#/components/parameters/brickworks-service-queryStatuses"
      responses:
        "200":
          description: A page of record versions
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/brickworks-service-RecordVersionPagingResult"
        "400":
          $ref: "#/components/responses/brickworks-service-GenericBadRequestError"
        "401":
          $ref: "#/components/responses/brickworks-service-GenericUnauthorizedError"
        "403":
          $ref: "#/components/responses/brickworks-service-GenericForbiddenError"
        "404":
          $ref: "#/components/responses/brickworks-service-GenericNotFoundError"
        "409":
          $ref: "#/components/responses/brickworks-service-GenericConflictError"
        "422":
          $ref: "#/components/responses/brickworks-service-GenericUnprocessableContentError"
        "500":
          $ref: "#/components/responses/brickworks-service-GenericError"
      x-snr-doc-urls:
        - /api-reference/brickworks#tag/Brickworks:-Record-versions/operation/getRecordVersions
  /brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}/versions/{RecordVersionIdentifier}:
    get:
      tags:
        - "Brickworks: Record versions"
      summary: Get record version
      description: |
        Retrieve the details of a record version. The version can be identified by either a UUID (RecordVersionId) or a version number (integer).

        ---

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

        **User role permission required:** `assets_brickworks: read`
      operationId: getRecordVersion
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/brickworks-service-pathSchemaIdentifier"
        - $ref: "#/components/parameters/brickworks-service-pathRecordIdentifier"
        - $ref: "#/components/parameters/brickworks-service-pathRecordVersionIdentifier"
      responses:
        "200":
          description: Record version object
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/brickworks-service-RecordVersion"
        "400":
          $ref: "#/components/responses/brickworks-service-GenericBadRequestError"
        "401":
          $ref: "#/components/responses/brickworks-service-GenericUnauthorizedError"
        "403":
          $ref: "#/components/responses/brickworks-service-GenericForbiddenError"
        "404":
          $ref: "#/components/responses/brickworks-service-GenericNotFoundError"
        "409":
          $ref: "#/components/responses/brickworks-service-GenericConflictError"
        "422":
          $ref: "#/components/responses/brickworks-service-GenericUnprocessableContentError"
        "500":
          $ref: "#/components/responses/brickworks-service-GenericError"
      x-snr-doc-urls:
        - /api-reference/brickworks#tag/Brickworks:-Record-versions/operation/getRecordVersion
  /brickworks/v1/async/schemas/{SchemaIdentifier}/records:
    post:
      tags:
        - "Brickworks: Records"
      summary: Batch create or update records (async)
      description: |
        This endpoint can only be used for simple schemas.

        - If a record included in this request already exists, it's entirely overwritten by the content from the request (including the slug - if the slug isn't sent, it's removed).
        - Provide the current identifier value (if your request changes the identifier, provide the one from before the change).
        - The record must conform with the schema.

        Asynchronous requests are processed according to the time they reach the service.  
        This means that requests to synchronous endpoints may overwrite asynchronous operations which were sent earlier and queued due to high traffic.

        In some edge cases, changing a record may fail further in the backend, even when this endpoint returns no errors. In such cases, contact Support.


        ---

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

        **User role permission required:** `assets_brickworks: create`
      operationId: createOrUpdateRecordBatchAsync
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/brickworks-service-pathSchemaIdentifier"
      requestBody:
        description: Record data
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/brickworks-service-AsyncRecordRequest"
      responses:
        "201":
          description: Operation added to queue
        "207":
          $ref: "#/components/responses/brickworks-service-207Response"
        "400":
          $ref: "#/components/responses/brickworks-service-GenericBadRequestError"
        "401":
          $ref: "#/components/responses/brickworks-service-GenericUnauthorizedError"
        "403":
          $ref: "#/components/responses/brickworks-service-GenericForbiddenError"
        "404":
          $ref: "#/components/responses/brickworks-service-GenericNotFoundError"
        "409":
          $ref: "#/components/responses/brickworks-service-GenericConflictError"
        "422":
          $ref: "#/components/responses/brickworks-service-GenericUnprocessableContentError"
        "500":
          $ref: "#/components/responses/brickworks-service-GenericError"
      x-snr-doc-urls:
        - /api-reference/brickworks#tag/Brickworks:-Records/operation/createOrUpdateRecordBatchAsync
    patch:
      tags:
        - "Brickworks: Records"
      summary: Batch create or partially update record (async)
      description: |
        This endpoint can only be used for simple schemas.

        Asynchronous requests are processed according to the time they reach the service.  
        This means that requests to synchronous endpoints may overwrite asynchronous operations which were sent earlier and queued due to high traffic.

        In some edge cases, changing a record may fail further in the backend, even when this endpoint returns no errors. In such cases, contact Support.


        ---

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

        **User role permission required:** `assets_brickworks: create`
      operationId: createOrPartialUpdateRecordBatchAsync
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/brickworks-service-pathSchemaIdentifier"
      requestBody:
        description: Record data
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/brickworks-service-AsyncRecordRequest"
      responses:
        "201":
          description: Operation added to queue
        "207":
          $ref: "#/components/responses/brickworks-service-207Response"
        "400":
          $ref: "#/components/responses/brickworks-service-GenericBadRequestError"
        "401":
          $ref: "#/components/responses/brickworks-service-GenericUnauthorizedError"
        "403":
          $ref: "#/components/responses/brickworks-service-GenericForbiddenError"
        "404":
          $ref: "#/components/responses/brickworks-service-GenericNotFoundError"
        "409":
          $ref: "#/components/responses/brickworks-service-GenericConflictError"
        "422":
          $ref: "#/components/responses/brickworks-service-GenericUnprocessableContentError"
        "500":
          $ref: "#/components/responses/brickworks-service-GenericError"
      x-snr-doc-urls:
        - /api-reference/brickworks#tag/Brickworks:-Records/operation/createOrPartialUpdateRecordBatchAsync
  /brickworks/v1/async/schemas/{SchemaIdentifier}/record:
    post:
      tags:
        - "Brickworks: Records"
      summary: Create or update record (async)
      description: |
        This endpoint can only be used for simple schemas.

        - If a record included in this request already exists, it's entirely overwritten by the content from the request (including the slug - if the slug isn't sent, it's removed).
        - Provide the current identifier value (if your request changes the identifier, provide the one from before the change).
        - The record must conform with the schema.

        Asynchronous requests are processed according to the time they reach the service.  
        This means that requests to synchronous endpoints may overwrite asynchronous operations which were sent earlier and queued due to high traffic.

        In some edge cases, changing a record may fail further in the backend, even when this endpoint returns no errors. In such cases, contact Support.


        ---

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

        **User role permission required:** `assets_brickworks: create`
      operationId: createOrUpdateRecordSingleAsync
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/brickworks-service-pathSchemaIdentifier"
      requestBody:
        description: Record data
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/brickworks-service-AsyncRecordRequest"
      responses:
        "201":
          description: Operation added to queue
          content: {}
        "400":
          $ref: "#/components/responses/brickworks-service-GenericBadRequestError"
        "401":
          $ref: "#/components/responses/brickworks-service-GenericUnauthorizedError"
        "403":
          $ref: "#/components/responses/brickworks-service-GenericForbiddenError"
        "404":
          $ref: "#/components/responses/brickworks-service-GenericNotFoundError"
        "409":
          $ref: "#/components/responses/brickworks-service-GenericConflictError"
        "422":
          $ref: "#/components/responses/brickworks-service-GenericUnprocessableContentError"
        "500":
          $ref: "#/components/responses/brickworks-service-GenericError"
      x-snr-doc-urls:
        - /api-reference/brickworks#tag/Brickworks:-Records/operation/createOrUpdateRecordSingleAsync
    patch:
      tags:
        - "Brickworks: Records"
      summary: Create or partially update record (async)
      description: |
        This endpoint can only be used for simple schemas.

        - You can use this endpoint to update a record by sending only the fields which you want to change. Other fields are not affected.
        - This endpoint doesn't validate the data against field-specific settings, such as limits on character count or regex in a string field.

        Asynchronous requests are processed according to the time they reach the service.  
        This means that requests to synchronous endpoints may overwrite asynchronous operations which were sent earlier and queued due to high traffic.

        In some edge cases, changing a record may fail further in the backend, even when this endpoint returns no errors. In such cases, contact Support.


        ---

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

        **User role permission required:** `assets_brickworks: create`
      operationId: createOrPartialUpdateRecordSingleAsync
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/brickworks-service-pathSchemaIdentifier"
      requestBody:
        description: Record data
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/brickworks-service-AsyncRecordRequest"
      responses:
        "201":
          description: Operation added to queue
        "400":
          $ref: "#/components/responses/brickworks-service-GenericBadRequestError"
        "401":
          $ref: "#/components/responses/brickworks-service-GenericUnauthorizedError"
        "403":
          $ref: "#/components/responses/brickworks-service-GenericForbiddenError"
        "404":
          $ref: "#/components/responses/brickworks-service-GenericNotFoundError"
        "409":
          $ref: "#/components/responses/brickworks-service-GenericConflictError"
        "422":
          $ref: "#/components/responses/brickworks-service-GenericUnprocessableContentError"
        "500":
          $ref: "#/components/responses/brickworks-service-GenericError"
      x-snr-doc-urls:
        - /api-reference/brickworks#tag/Brickworks:-Records/operation/createOrPartialUpdateRecordSingleAsync
  /business-profile-service/organizations/usage/stats/newDataPoints:
    post:
      operationId: generateDailyNewDataPointsStats
      summary: Get consumption metric with new data points
      description: |
        Retrieve the number of new events (events added to the database on a particular day), listed by day. You can limit the metric to particular workspaces and event types (actions).

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <span title="Contact support">Organization</span>
      security:
        - JWT: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/business-profile-service-OrganizationDailyUsageReportRequest"
      responses:
        "200":
          description: Statistics of new events for the specified date range
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/business-profile-service-DailyUsageStats"
        "401":
          $ref: "#/components/responses/business-profile-service-401-bpservice"
        "403":
          $ref: "#/components/responses/business-profile-service-403-bpservice"
        4xx:
          $ref: "#/components/responses/business-profile-service-4xx-bpservice"
      tags:
        - Consumption
      x-snr-doc-urls:
        - /api-reference/organizations#tag/Consumption/operation/generateDailyNewDataPointsStats
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/business-profile-service/organizations/usage/stats/newDataPoints \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"from":"2025-05-29","to":"2025-05-30","actions":["page.visit"],"bpGuids":["34eea35e-3ac4-44f4-95b5-fd00a3b45eff"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"from\":\"2025-05-29\",\"to\":\"2025-05-30\",\"actions\":[\"page.visit\"],\"bpGuids\":[\"34eea35e-3ac4-44f4-95b5-fd00a3b45eff\"]}"

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

            conn.request("POST", "/business-profile-service/organizations/usage/stats/newDataPoints", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "from": "2025-05-29",
              "to": "2025-05-30",
              "actions": [
                "page.visit"
              ],
              "bpGuids": [
                "34eea35e-3ac4-44f4-95b5-fd00a3b45eff"
              ]
            });

            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/business-profile-service/organizations/usage/stats/newDataPoints");
            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": "/business-profile-service/organizations/usage/stats/newDataPoints",
              "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({
              from: '2025-05-29',
              to: '2025-05-30',
              actions: ['page.visit'],
              bpGuids: ['34eea35e-3ac4-44f4-95b5-fd00a3b45eff']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/business-profile-service/organizations/usage/stats/newDataPoints');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"from":"2025-05-29","to":"2025-05-30","actions":["page.visit"],"bpGuids":["34eea35e-3ac4-44f4-95b5-fd00a3b45eff"]}');

            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/business-profile-service/organizations/usage/stats/newDataPoints")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"from\":\"2025-05-29\",\"to\":\"2025-05-30\",\"actions\":[\"page.visit\"],\"bpGuids\":[\"34eea35e-3ac4-44f4-95b5-fd00a3b45eff\"]}")
              .asString();
  /business-profile-service/organizations/usage/stats/retentionDataPoints:
    post:
      operationId: generateDailyRetentionDataPointsStats
      summary: Get consumption metric with retention data points
      description: |
        Retrieve the number of events kept in the database, listed by day. This includes events saved in the past, which currently exist in the database according to their retention period. 

        You can limit the metric to particular workspaces and event types (actions).


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <span title="Contact support">Organization</span>
      security:
        - JWT: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/business-profile-service-OrganizationDailyUsageReportRequest"
      responses:
        "200":
          description: Statistics of retention events for the specified date range
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/business-profile-service-RetentionUsageStats"
        "401":
          $ref: "#/components/responses/business-profile-service-401-bpservice"
        "403":
          $ref: "#/components/responses/business-profile-service-403-bpservice"
        4xx:
          $ref: "#/components/responses/business-profile-service-4xx-bpservice"
      tags:
        - Consumption
      x-snr-doc-urls:
        - /api-reference/organizations#tag/Consumption/operation/generateDailyRetentionDataPointsStats
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/business-profile-service/organizations/usage/stats/retentionDataPoints \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"from":"2025-05-29","to":"2025-05-30","actions":["page.visit"],"bpGuids":["34eea35e-3ac4-44f4-95b5-fd00a3b45eff"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"from\":\"2025-05-29\",\"to\":\"2025-05-30\",\"actions\":[\"page.visit\"],\"bpGuids\":[\"34eea35e-3ac4-44f4-95b5-fd00a3b45eff\"]}"

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

            conn.request("POST", "/business-profile-service/organizations/usage/stats/retentionDataPoints", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "from": "2025-05-29",
              "to": "2025-05-30",
              "actions": [
                "page.visit"
              ],
              "bpGuids": [
                "34eea35e-3ac4-44f4-95b5-fd00a3b45eff"
              ]
            });

            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/business-profile-service/organizations/usage/stats/retentionDataPoints");
            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": "/business-profile-service/organizations/usage/stats/retentionDataPoints",
              "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({
              from: '2025-05-29',
              to: '2025-05-30',
              actions: ['page.visit'],
              bpGuids: ['34eea35e-3ac4-44f4-95b5-fd00a3b45eff']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/business-profile-service/organizations/usage/stats/retentionDataPoints');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"from":"2025-05-29","to":"2025-05-30","actions":["page.visit"],"bpGuids":["34eea35e-3ac4-44f4-95b5-fd00a3b45eff"]}');

            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/business-profile-service/organizations/usage/stats/retentionDataPoints")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"from\":\"2025-05-29\",\"to\":\"2025-05-30\",\"actions\":[\"page.visit\"],\"bpGuids\":[\"34eea35e-3ac4-44f4-95b5-fd00a3b45eff\"]}")
              .asString();
  /business-profile-service/business-profiles:
    get:
      tags:
        - Organization workspaces
      summary: Get universal list of organization workspaces
      operationId: getBusinessProfilesUniversalList
      description: |
        Retrieve a universal list of workspaces available to the user.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>
      parameters:
        - $ref: "#/components/parameters/business-profile-service-listPage"
        - $ref: "#/components/parameters/business-profile-service-listLimit"
        - name: favorite
          in: query
          required: false
          schema:
            type: boolean
        - $ref: "#/components/parameters/business-profile-service-listSearch"
        - name: sortBy
          in: query
          schema:
            type: string
            default: CREATED:ASC
            enum:
              - ID:ASC
              - ID:DESC
              - NAME:ASC
              - NAME:DESC
              - CREATED:ASC
              - CREATED:DESC
              - FAVORITE:ASC
              - FAVORITE:DESC
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/business-profile-service-UniversalListBusinessProfilesResponse"
      x-snr-doc-urls:
        - /api-reference/organizations#tag/Organization-workspaces/operation/getBusinessProfilesUniversalList
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/business-profile-service/business-profiles?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&favorite=SOME_BOOLEAN_VALUE&search=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            conn.request("GET", "/business-profile-service/business-profiles?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&favorite=SOME_BOOLEAN_VALUE&search=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE")

            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/business-profile-service/business-profiles?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&favorite=SOME_BOOLEAN_VALUE&search=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE");

            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": "/business-profile-service/business-profiles?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&favorite=SOME_BOOLEAN_VALUE&search=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE",
              "headers": {}
            };

            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/business-profile-service/business-profiles');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_INTEGER_VALUE',
              'limit' => 'SOME_INTEGER_VALUE',
              'favorite' => 'SOME_BOOLEAN_VALUE',
              'search' => 'SOME_STRING_VALUE',
              'sortBy' => 'SOME_STRING_VALUE'
            ]);

            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/business-profile-service/business-profiles?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&favorite=SOME_BOOLEAN_VALUE&search=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE")
              .asString();
  /business-profile-service/organizations/workspaces:
    get:
      summary: Get all workspaces from organization
      description: |
        Retrieve a list of all workspaces in an organization.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <span title="Contact support">Organization</span>
      tags:
        - Organization workspaces
      operationId: getWorkspacesOfOrganization
      responses:
        "200":
          description: List of workspaces
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/business-profile-service-OrganizationWorkspacesResponse"
      x-snr-doc-urls:
        - /api-reference/organizations#tag/Organization-workspaces/operation/getWorkspacesOfOrganization
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/business-profile-service/organizations/workspaces
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            conn.request("GET", "/business-profile-service/organizations/workspaces")

            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/business-profile-service/organizations/workspaces");

            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": "/business-profile-service/organizations/workspaces",
              "headers": {}
            };

            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/business-profile-service/organizations/workspaces');
            $request->setMethod(HTTP_METH_GET);

            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/business-profile-service/organizations/workspaces")
              .asString();
  /business-profile-service/organizations/business-profiles:
    get:
      tags:
        - Settings
      summary: Get universal list of organization workspaces
      operationId: getBusinessProfilesForOrganizationUserUniversalList
      description: |
        Retrieve a list of worspaces in the organization in context of the current user.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>
      parameters:
        - $ref: "#/components/parameters/business-profile-service-listPage"
        - $ref: "#/components/parameters/business-profile-service-listLimit"
        - name: businessProfileGroupId
          in: query
          required: false
          description: Workspace group to filter by.
          schema:
            type: string
        - name: sortBy
          in: query
          required: false
          schema:
            type: string
            default: NAME:ASC
            enum:
              - NAME:ASC
              - NAME:DESC
              - CREATED:ASC
              - CREATED:DESC
        - name: search
          in: query
          required: false
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/business-profile-service-UniversalListBusinessProfilesForOrganizationUserResponse"
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Settings/operation/getBusinessProfilesForOrganizationUserUniversalList
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/business-profile-service/organizations/business-profiles?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&businessProfileGroupId=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&search=SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            conn.request("GET", "/business-profile-service/organizations/business-profiles?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&businessProfileGroupId=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&search=SOME_STRING_VALUE")

            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/business-profile-service/organizations/business-profiles?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&businessProfileGroupId=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&search=SOME_STRING_VALUE");

            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": "/business-profile-service/organizations/business-profiles?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&businessProfileGroupId=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&search=SOME_STRING_VALUE",
              "headers": {}
            };

            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/business-profile-service/organizations/business-profiles');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_INTEGER_VALUE',
              'limit' => 'SOME_INTEGER_VALUE',
              'businessProfileGroupId' => 'SOME_STRING_VALUE',
              'sortBy' => 'SOME_STRING_VALUE',
              'search' => 'SOME_STRING_VALUE'
            ]);

            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/business-profile-service/organizations/business-profiles?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&businessProfileGroupId=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&search=SOME_STRING_VALUE")
              .asString();
  /business-profile-service/organizations/business-profiles/with-identifiers:
    get:
      tags:
        - Organization workspaces
      summary: Get universal list of organization workspaces with profile identifiers
      operationId: getBusinessProfilesWithIdentifiersForOrganizationUserUniversalList
      description: |
        Retrieve a universal list of workspaces in context of the current user; with profile identifiers used in each workspace.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>
      parameters:
        - $ref: "#/components/parameters/business-profile-service-listPage"
        - $ref: "#/components/parameters/business-profile-service-listLimit"
        - name: businessProfileGroupId
          in: query
          required: false
          description: Workspace group to filter by.
          schema:
            type: string
        - name: sortBy
          in: query
          required: false
          schema:
            type: string
            default: NAME:ASC
            enum:
              - NAME:ASC
              - NAME:DESC
              - CREATED:ASC
              - CREATED:DESC
        - name: search
          in: query
          required: false
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/business-profile-service-UniversalListBusinessProfilesForOrganizationWithIdentifiersUserResponse"
      x-snr-doc-urls:
        - /api-reference/organizations#tag/Organization-workspaces/operation/getBusinessProfilesWithIdentifiersForOrganizationUserUniversalList
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/business-profile-service/organizations/business-profiles/with-identifiers?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&businessProfileGroupId=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&search=SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            conn.request("GET", "/business-profile-service/organizations/business-profiles/with-identifiers?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&businessProfileGroupId=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&search=SOME_STRING_VALUE")

            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/business-profile-service/organizations/business-profiles/with-identifiers?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&businessProfileGroupId=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&search=SOME_STRING_VALUE");

            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": "/business-profile-service/organizations/business-profiles/with-identifiers?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&businessProfileGroupId=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&search=SOME_STRING_VALUE",
              "headers": {}
            };

            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/business-profile-service/organizations/business-profiles/with-identifiers');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_INTEGER_VALUE',
              'limit' => 'SOME_INTEGER_VALUE',
              'businessProfileGroupId' => 'SOME_STRING_VALUE',
              'sortBy' => 'SOME_STRING_VALUE',
              'search' => 'SOME_STRING_VALUE'
            ]);

            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/business-profile-service/organizations/business-profiles/with-identifiers?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&businessProfileGroupId=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&search=SOME_STRING_VALUE")
              .asString();
  /catalogs/bags/{catalogId}/csv:
    get:
      tags:
        - Catalogs
      summary: Get all items as CSV file
      description: |
        Download a CSV with all items in the catalog. The unique identifier of an item is saved in the `item_key` column.

        ---

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

        **User role permission required:** `assets_catalogs: read`
      operationId: getItemsCSV
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
        - $ref: "#/components/parameters/catalogs-queryDelimiter"
      responses:
        "200":
          description: CSV file. The unique identifier of an item is in the `item_key` column.
          content:
            text/csv:
              schema:
                type: string
              example: |
                item_key,color,type
                3a9d38e8,blue,sneaker
                e96b17b7,red,sneaker
        "401":
          $ref: "#/components/responses/catalogs-401"
        "403":
          $ref: "#/components/responses/catalogs-403"
        "404":
          $ref: "#/components/responses/catalogs-404"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/getItemsCSV
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/csv?delimiter=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", "/catalogs/bags/%7BcatalogId%7D/csv?delimiter=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/catalogs/bags/%7BcatalogId%7D/csv?delimiter=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": "/catalogs/bags/%7BcatalogId%7D/csv?delimiter=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/catalogs/bags/%7BcatalogId%7D/csv');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'delimiter' => '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/catalogs/bags/%7BcatalogId%7D/csv?delimiter=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /catalogs/bags/{catalogId}/items/upload:
    post:
      tags:
        - Catalogs
      summary: Add items from CSV
      description: |
        Upload items to a catalog from a CSV file

        ---

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

        **User role permission required:** `assets_catalogs: update`
      operationId: uploadItems
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                itemKey:
                  description: The name of the CSV column that contains unique identifiers. Slashes (`/`) are not allowed in the identifier values.
                  type: string
                file:
                  description: CSV file
                  type: string
                  format: binary
              required:
                - itemKey
                - file
      responses:
        "200":
          description: Upload status
          content:
            application/json:
              schema:
                type: boolean
                description: "`true` when successful"
        "400":
          $ref: "#/components/responses/catalogs-400"
        "401":
          $ref: "#/components/responses/catalogs-401"
        "403":
          $ref: "#/components/responses/catalogs-403"
        "404":
          $ref: "#/components/responses/catalogs-404"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/uploadItems
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/upload \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: multipart/form-data' \
              --form itemKey=string \
              --form file=string
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

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

            conn.request("POST", "/catalogs/bags/%7BcatalogId%7D/items/upload", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = new FormData();
            data.append("itemKey", "string");
            data.append("file", "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/catalogs/bags/%7BcatalogId%7D/items/upload");
            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": "/catalogs/bags/%7BcatalogId%7D/items/upload",
              "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=\"itemKey\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\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/catalogs/bags/%7BcatalogId%7D/items/upload');

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

            \r

            string\r

            -----011000010111000001101001\r

            Content-Disposition: form-data; name=\"file\"\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/catalogs/bags/%7BcatalogId%7D/items/upload")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"itemKey\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\nstring\r\n-----011000010111000001101001--\r\n")
              .asString();
  /catalogs/bags:
    post:
      tags:
        - Catalogs
      summary: Add catalog
      description: |
        Create a new, empty catalog.

        ---

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

        **User role permission required:** `assets_catalogs: create`
      operationId: addBag
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/catalogs-addBag"
        required: true
      responses:
        "200":
          description: Details of the created catalog
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/catalogs-bag"
                  metaData:
                    $ref: "#/components/schemas/catalogs-responseMeta"
        "400":
          $ref: "#/components/responses/catalogs-400"
        "401":
          $ref: "#/components/responses/catalogs-401"
        "403":
          $ref: "#/components/responses/catalogs-403"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/addBag
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/catalogs/bags \
              --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", "/catalogs/bags", 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/catalogs/bags");
            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": "/catalogs/bags",
              "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/catalogs/bags');
            $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/catalogs/bags")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\"}")
              .asString();
    get:
      tags:
        - Catalogs
      summary: Get catalogs
      description: |
        Retrieve all catalogs from the Workspace. You can filter and sort the results.

        ---

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

        **User role permission required:** `assets_catalogs: read`
      operationId: getBags
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-queryCatalogSearchBy"
        - $ref: "#/components/parameters/catalogs-queryCatalogOrderBy"
        - $ref: "#/components/parameters/catalogs-queryOffset"
        - $ref: "#/components/parameters/catalogs-queryLimit"
      responses:
        "200":
          description: List of catalogs
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: A list of catalogs
                    items:
                      $ref: "#/components/schemas/catalogs-bag"
                  metaData:
                    $ref: "#/components/schemas/catalogs-responseMeta"
        "401":
          $ref: "#/components/responses/catalogs-401"
        "403":
          $ref: "#/components/responses/catalogs-403"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/getBags
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/catalogs/bags?searchBy=SOME_STRING_VALUE&orderBy=SOME_STRING_VALUE&offset=SOME_INTEGER_VALUE&limit=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", "/catalogs/bags?searchBy=SOME_STRING_VALUE&orderBy=SOME_STRING_VALUE&offset=SOME_INTEGER_VALUE&limit=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/catalogs/bags?searchBy=SOME_STRING_VALUE&orderBy=SOME_STRING_VALUE&offset=SOME_INTEGER_VALUE&limit=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": "/catalogs/bags?searchBy=SOME_STRING_VALUE&orderBy=SOME_STRING_VALUE&offset=SOME_INTEGER_VALUE&limit=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/catalogs/bags');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'searchBy' => 'SOME_STRING_VALUE',
              'orderBy' => 'SOME_STRING_VALUE',
              'offset' => 'SOME_INTEGER_VALUE',
              'limit' => '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/catalogs/bags?searchBy=SOME_STRING_VALUE&orderBy=SOME_STRING_VALUE&offset=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    delete:
      tags:
        - Catalogs
      summary: Delete catalogs
      description: |
        

        ---

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

        **User role permission required:** `assets_catalogs: delete`
      operationId: deleteBagByIds
      security:
        - JWT: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
                description: Catalog ID
              example:
                - 1199
                - 1200
                - 1201
      responses:
        "200":
          description: Deletion status
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: A list of catalogs and their deletion statuses
                    items:
                      $ref: "#/components/schemas/catalogs-deleteResponse"
                  metaData:
                    $ref: "#/components/schemas/catalogs-responseMeta"
        "400":
          $ref: "#/components/responses/catalogs-400"
        "401":
          $ref: "#/components/responses/catalogs-401"
        "403":
          $ref: "#/components/responses/catalogs-403"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/deleteBagByIds
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/catalogs/bags \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '[1199,1200,1201]'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "[1199,1200,1201]"

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

            conn.request("DELETE", "/catalogs/bags", payload, headers)

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

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

            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/catalogs/bags");
            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": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/catalogs/bags",
              "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([1199, 1200, 1201]));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/catalogs/bags');
            $request->setMethod(HTTP_METH_DELETE);

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

            $request->setBody('[1199,1200,1201]');

            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/catalogs/bags")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[1199,1200,1201]")
              .asString();
  /catalogs/bags/{catalogId}/keys:
    get:
      tags:
        - Catalogs
      summary: Get catalog keys
      description: |
        Retrieve the list of keys from a catalog.

        ---

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

        **User role permission required:** `assets_catalogs: read`
      operationId: getKeysByBag
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
      responses:
        "200":
          description: List of keys
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: A list of keys (column names) in the catalog
                    items:
                      type: string
                  metaData:
                    $ref: "#/components/schemas/catalogs-responseMeta"
                example:
                  data:
                    - id
                    - isbn
                    - name
                  metaData:
                    totalCount: 3
                    requestTime: 0.071 [s]
        "401":
          $ref: "#/components/responses/catalogs-401"
        "403":
          $ref: "#/components/responses/catalogs-403"
        "404":
          $ref: "#/components/responses/catalogs-404"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/getKeysByBag
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/keys \
              --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", "/catalogs/bags/%7BcatalogId%7D/keys", 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/catalogs/bags/%7BcatalogId%7D/keys");
            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": "/catalogs/bags/%7BcatalogId%7D/keys",
              "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/catalogs/bags/%7BcatalogId%7D/keys');
            $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/catalogs/bags/%7BcatalogId%7D/keys")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /catalogs/bags/{catalogId}:
    get:
      tags:
        - Catalogs
      summary: Get catalog info
      description: |
        Retrieve the metadata of a catalog

        ---

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

        **User role permission required:** `assets_catalogs: read`
      operationId: getBagById
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
      responses:
        "200":
          description: Details of the catalog
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/catalogs-bag"
                  metaData:
                    $ref: "#/components/schemas/catalogs-responseMeta"
        "401":
          $ref: "#/components/responses/catalogs-401"
        "403":
          $ref: "#/components/responses/catalogs-403"
        "404":
          $ref: "#/components/responses/catalogs-404"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/getBagById
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/catalogs/bags/%7BcatalogId%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", "/catalogs/bags/%7BcatalogId%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/catalogs/bags/%7BcatalogId%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": "/catalogs/bags/%7BcatalogId%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/catalogs/bags/%7BcatalogId%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/catalogs/bags/%7BcatalogId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    delete:
      tags:
        - Catalogs
      summary: Delete catalog
      description: |
        Delete a single catalog. This operation is irreversible.

        ---

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

        **User role permission required:** `assets_catalogs: delete`
      operationId: deleteBagById
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
      responses:
        "200":
          description: Deletion status
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: boolean
                    description: "`true` if the catalog was deleted successfully"
                  metaData:
                    $ref: "#/components/schemas/catalogs-responseMeta"
        "401":
          $ref: "#/components/responses/catalogs-401"
        "403":
          $ref: "#/components/responses/catalogs-403"
        "404":
          $ref: "#/components/responses/catalogs-404"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/deleteBagById
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/catalogs/bags/%7BcatalogId%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", "/catalogs/bags/%7BcatalogId%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/catalogs/bags/%7BcatalogId%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": "/catalogs/bags/%7BcatalogId%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/catalogs/bags/%7BcatalogId%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/catalogs/bags/%7BcatalogId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /catalogs/bags/{catalogId}/items:
    post:
      tags:
        - Catalogs
      summary: Add item
      description: |
        Add a single item to the catalog.

        ---

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

        **User role permission required:** `assets_catalogs: create`
      operationId: addItems
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
      requestBody:
        description: JSON object with any number of key/value pairs
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/catalogs-addItem"
      responses:
        "200":
          description: Upload status
          content:
            application/json:
              schema:
                type: boolean
                description: TRUE if successful
        "400":
          $ref: "#/components/responses/catalogs-400"
        "401":
          $ref: "#/components/responses/catalogs-401"
        "403":
          $ref: "#/components/responses/catalogs-403"
        "404":
          $ref: "#/components/responses/catalogs-404"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/addItems
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"itemKey":"sku1357","value":{"itemCategory":"smartphone","itemColor":"blue"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}"

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

            conn.request("POST", "/catalogs/bags/%7BcatalogId%7D/items", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "itemKey": "sku1357",
              "value": {
                "itemCategory": "smartphone",
                "itemColor": "blue"
              }
            });

            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/catalogs/bags/%7BcatalogId%7D/items");
            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": "/catalogs/bags/%7BcatalogId%7D/items",
              "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({itemKey: 'sku1357', value: {itemCategory: 'smartphone', itemColor: 'blue'}}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"itemKey":"sku1357","value":{"itemCategory":"smartphone","itemColor":"blue"}}');

            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/catalogs/bags/%7BcatalogId%7D/items")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}")
              .asString();
    get:
      tags:
        - Catalogs
      summary: Get items from catalog
      description: |
        Retrieve the entries from a single catalog.

        ---

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

        **User role permission required:** `assets_catalogs: read`
      operationId: getItemsByBag
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
        - $ref: "#/components/parameters/catalogs-queryItemKey"
        - $ref: "#/components/parameters/catalogs-queryOffset"
        - $ref: "#/components/parameters/catalogs-queryLimit"
      responses:
        "200":
          description: A list of items in the catalog
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: Details of the items
                    items:
                      $ref: "#/components/schemas/catalogs-item"
                  metaData:
                    $ref: "#/components/schemas/catalogs-responseMeta"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/getItemsByBag
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items?itemKey=SOME_STRING_VALUE&offset=SOME_INTEGER_VALUE&limit=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", "/catalogs/bags/%7BcatalogId%7D/items?itemKey=SOME_STRING_VALUE&offset=SOME_INTEGER_VALUE&limit=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/catalogs/bags/%7BcatalogId%7D/items?itemKey=SOME_STRING_VALUE&offset=SOME_INTEGER_VALUE&limit=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": "/catalogs/bags/%7BcatalogId%7D/items?itemKey=SOME_STRING_VALUE&offset=SOME_INTEGER_VALUE&limit=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/catalogs/bags/%7BcatalogId%7D/items');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'itemKey' => 'SOME_STRING_VALUE',
              'offset' => 'SOME_INTEGER_VALUE',
              'limit' => '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/catalogs/bags/%7BcatalogId%7D/items?itemKey=SOME_STRING_VALUE&offset=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /catalogs/bags/{catalogId}/items/batch:
    post:
      tags:
        - Catalogs
      summary: Batch add items
      description: |
        Add a number of items at once.

        For better performance, we recommend using the [`/v1/async/bags/{catalogId}/items` endpoint](#operation/addItemsBatchAsync).


        ---

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

        **User role permission required:** `assets_catalogs: create`
      operationId: addItemsBatch
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
      requestBody:
        description: An array of JSON objects with any number of key/value pairs
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/catalogs-addItem"
      responses:
        "200":
          description: Upload status
          content:
            application/json:
              schema:
                type: boolean
                description: TRUE if successful
        "400":
          $ref: "#/components/responses/catalogs-400"
        "401":
          $ref: "#/components/responses/catalogs-401"
        "403":
          $ref: "#/components/responses/catalogs-403"
        "404":
          $ref: "#/components/responses/catalogs-404"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/addItemsBatch
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/batch \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '[{"itemKey":"sku1357","value":{"itemCategory":"smartphone","itemColor":"blue"}}]'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "[{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}]"

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

            conn.request("POST", "/catalogs/bags/%7BcatalogId%7D/items/batch", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              {
                "itemKey": "sku1357",
                "value": {
                  "itemCategory": "smartphone",
                  "itemColor": "blue"
                }
              }
            ]);

            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/catalogs/bags/%7BcatalogId%7D/items/batch");
            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": "/catalogs/bags/%7BcatalogId%7D/items/batch",
              "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([{itemKey: 'sku1357', value: {itemCategory: 'smartphone', itemColor: 'blue'}}]));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/batch');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('[{"itemKey":"sku1357","value":{"itemCategory":"smartphone","itemColor":"blue"}}]');

            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/catalogs/bags/%7BcatalogId%7D/items/batch")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}]")
              .asString();
  /catalogs/bags/{catalogId}/enrichment/fields:
    patch:
      tags:
        - Catalogs
      summary: Update enrichment fields
      description: |
        Change enrichment fields for given mapping

        ---

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

        **User role permission required:** `assets_catalogs: create`
      operationId: updateEnrichmentFields
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/catalogs-enrichmentUpdateRequest"
      responses:
        "200":
          description: Upload status
          content:
            application/json:
              schema:
                type: integer
                description: Number of rows changed
        "400":
          $ref: "#/components/responses/catalogs-400"
        "401":
          $ref: "#/components/responses/catalogs-401"
        "403":
          $ref: "#/components/responses/catalogs-403"
        "404":
          $ref: "#/components/responses/catalogs-404"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/updateEnrichmentFields
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PATCH \
              --url https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/enrichment/fields \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"action":"string","paramKey":"string","enrichmentFields":["string"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"action\":\"string\",\"paramKey\":\"string\",\"enrichmentFields\":[\"string\"]}"

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

            conn.request("PATCH", "/catalogs/bags/%7BcatalogId%7D/enrichment/fields", payload, headers)

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

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

            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/catalogs/bags/%7BcatalogId%7D/enrichment/fields");
            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": "/catalogs/bags/%7BcatalogId%7D/enrichment/fields",
              "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({action: 'string', paramKey: 'string', enrichmentFields: ['string']}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            HttpRequest::methodRegister('PATCH');
            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/enrichment/fields');
            $request->setMethod(HttpRequest::HTTP_METH_PATCH);

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

            $request->setBody('{"action":"string","paramKey":"string","enrichmentFields":["string"]}');

            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/catalogs/bags/%7BcatalogId%7D/enrichment/fields")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"action\":\"string\",\"paramKey\":\"string\",\"enrichmentFields\":[\"string\"]}")
              .asString();
  /catalogs/bags/{catalogId}/items/itemKey/{itemKey}:
    get:
      tags:
        - Catalogs
      summary: Get single item by itemKey
      description: |
        Retrieve a single item from a catalog by using the item key (unique identifier of an item in the catalog, for example a product's SKU) of the entry in the Synerise database.

        ---

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

        **User role permission required:** `assets_catalogs: read`
      operationId: getItemByKey
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
        - in: path
          name: itemKey
          required: true
          description: "`itemKey` parameter of the item to retrieve"
          schema:
            type: string
      responses:
        "200":
          description: A single item
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/catalogs-item"
                  metaData:
                    $ref: "#/components/schemas/catalogs-responseMeta"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/getItemByKey
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/itemKey/%7BitemKey%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", "/catalogs/bags/%7BcatalogId%7D/items/itemKey/%7BitemKey%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/catalogs/bags/%7BcatalogId%7D/items/itemKey/%7BitemKey%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": "/catalogs/bags/%7BcatalogId%7D/items/itemKey/%7BitemKey%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/catalogs/bags/%7BcatalogId%7D/items/itemKey/%7BitemKey%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/catalogs/bags/%7BcatalogId%7D/items/itemKey/%7BitemKey%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    delete:
      tags:
        - Catalogs
      summary: Delete single item by itemKey
      description: |
        Delete a single item by itemKey (unique identifier of an item in the catalog, for example a product's SKU).

        ---

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

        **User role permission required:** `assets_catalogs: delete`
      operationId: deleteItemByItemKey
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
        - in: path
          name: itemKey
          required: true
          description: "`itemKey` parameter of the item to delete"
          schema:
            type: string
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: boolean
                    description: "`true` if the operation was successful."
                  metaData:
                    $ref: "#/components/schemas/catalogs-responseMeta"
        "401":
          $ref: "#/components/responses/catalogs-401"
        "403":
          $ref: "#/components/responses/catalogs-403"
        "404":
          $ref: "#/components/responses/catalogs-404"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/deleteItemByItemKey
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/itemKey/%7BitemKey%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", "/catalogs/bags/%7BcatalogId%7D/items/itemKey/%7BitemKey%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/catalogs/bags/%7BcatalogId%7D/items/itemKey/%7BitemKey%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": "/catalogs/bags/%7BcatalogId%7D/items/itemKey/%7BitemKey%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/catalogs/bags/%7BcatalogId%7D/items/itemKey/%7BitemKey%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/catalogs/bags/%7BcatalogId%7D/items/itemKey/%7BitemKey%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /catalogs/bags/{catalogId}/items/{itemId}:
    post:
      tags:
        - Catalogs
      summary: Update single item by database ID
      description: |
        Update a single item from a catalog by using the ID of the entry in the Synerise database.

        Update requests are processed according to the time they reach the service.  
        This means that updates from the synchronous `/bags/{catalogId}/items/{itemId}` endpoint may overwrite asynchronous operations (see [`/v1/async/*` endpoints](#operation/updateItemAsync)) which were sent earlier and queued due to high traffic.  
        This behavior also applies to requests from Automation and AI feed synchronization, which use the asynchronous mechanism.


        ---

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

        **User role permission required:** `assets_catalogs: update`
      operationId: updateItem
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
        - $ref: "#/components/parameters/catalogs-itemDatabaseId"
      requestBody:
        description: JSON object with any number of key/value pairs
        content:
          application/json:
            schema:
              type: object
              additionalProperties:
                description: The properties of the catalog item
      responses:
        "200":
          description: A single item
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/catalogs-item"
                  metaData:
                    $ref: "#/components/schemas/catalogs-responseMeta"
        "401":
          $ref: "#/components/responses/catalogs-401"
        "403":
          $ref: "#/components/responses/catalogs-403"
        "404":
          $ref: "#/components/responses/catalogs-404"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/updateItem
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"property1":null,"property2":null}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

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

            conn.request("POST", "/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "property1": null,
              "property2": 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/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%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": "/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%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({property1: null, property2: null}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D');
            $request->setMethod(HTTP_METH_POST);

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

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

            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/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"property1\":null,\"property2\":null}")
              .asString();
    get:
      tags:
        - Catalogs
      summary: Get single item by database ID
      description: |
        Retrieve a single item from a catalog by using the ID of the entry in the Synerise database. If you want to retrieve an item by its unique identifier in the catalog, use [/bags/{catalogId}/items/itemKey/{itemKey}](#operation/getItemByKey).

        ---

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

        **User role permission required:** `assets_catalogs: read`
      operationId: getItem
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
        - $ref: "#/components/parameters/catalogs-itemDatabaseId"
      responses:
        "200":
          description: A single item
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/catalogs-item"
                  metaData:
                    $ref: "#/components/schemas/catalogs-responseMeta"
        "401":
          $ref: "#/components/responses/catalogs-401"
        "403":
          $ref: "#/components/responses/catalogs-403"
        "404":
          $ref: "#/components/responses/catalogs-404"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/getItem
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%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", "/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%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/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%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": "/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%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/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%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/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    delete:
      tags:
        - Catalogs
      summary: Delete single item by database ID
      description: |
        Delete a single item by ID.

        ---

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

        **User role permission required:** `assets_catalogs: delete`
      operationId: deleteItem
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
        - $ref: "#/components/parameters/catalogs-itemDatabaseId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: boolean
                    description: "`true` if the operation was successful."
                  metaData:
                    $ref: "#/components/schemas/catalogs-responseMeta"
        "401":
          $ref: "#/components/responses/catalogs-401"
        "403":
          $ref: "#/components/responses/catalogs-403"
        "404":
          $ref: "#/components/responses/catalogs-404"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/deleteItem
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%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", "/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%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/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%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": "/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%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/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%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/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /catalogs/items:
    get:
      tags:
        - Catalogs
      summary: Get all items
      description: |
        Retrieve all items from all catalogs 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:** `CATALOGS_CATALOG_READ`

        **User role permission required:** `assets_catalogs: read`
      operationId: getItemsByBusinessProfileid
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-queryOffset"
        - $ref: "#/components/parameters/catalogs-queryLimit"
      responses:
        "200":
          description: A list of items in the Workspace
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: Details of the items
                    items:
                      $ref: "#/components/schemas/catalogs-item"
                  metaData:
                    $ref: "#/components/schemas/catalogs-responseMeta"
        "401":
          $ref: "#/components/responses/catalogs-401"
        "403":
          $ref: "#/components/responses/catalogs-403"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/getItemsByBusinessProfileid
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/catalogs/items?offset=SOME_INTEGER_VALUE&limit=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", "/catalogs/items?offset=SOME_INTEGER_VALUE&limit=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/catalogs/items?offset=SOME_INTEGER_VALUE&limit=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": "/catalogs/items?offset=SOME_INTEGER_VALUE&limit=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/catalogs/items');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'offset' => 'SOME_INTEGER_VALUE',
              'limit' => '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/catalogs/items?offset=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /catalogs/bags/{catalogId}/mappings:
    post:
      tags:
        - Catalogs
      summary: Add mapping
      description: |
        Add a new mapping. Mappings can be used to enrich events with data from catalogs.

        For example, you can map the product's SKU from the "product.buy" event to the column in the catalog that includes the SKU. Whenever someone purchases an item with that SKU, you can extract data from the catalog (for example, the product's brand and category) and show that additional in the event log in the Synerise GUI.

        ---

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

        **User role permission required:** `assets_catalogs: create`
      operationId: addMapping
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/catalogs-eventData"
      responses:
        "200":
          description: Mapping data
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/catalogs-mapper"
                  metaData:
                    $ref: "#/components/schemas/catalogs-responseMeta"
        "400":
          $ref: "#/components/responses/catalogs-400"
        "401":
          $ref: "#/components/responses/catalogs-401"
        "403":
          $ref: "#/components/responses/catalogs-403"
        "404":
          $ref: "#/components/responses/catalogs-404"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/addMapping
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/mappings \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"action":"transaction.charge","paramKey":"sku"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"action\":\"transaction.charge\",\"paramKey\":\"sku\"}"

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

            conn.request("POST", "/catalogs/bags/%7BcatalogId%7D/mappings", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "action": "transaction.charge",
              "paramKey": "sku"
            });

            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/catalogs/bags/%7BcatalogId%7D/mappings");
            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": "/catalogs/bags/%7BcatalogId%7D/mappings",
              "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({action: 'transaction.charge', paramKey: 'sku'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/mappings');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"action":"transaction.charge","paramKey":"sku"}');

            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/catalogs/bags/%7BcatalogId%7D/mappings")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"action\":\"transaction.charge\",\"paramKey\":\"sku\"}")
              .asString();
  /catalogs/mappings:
    get:
      tags:
        - Catalogs
      summary: Get all mappings
      description: |
        Retrieve all mappings from 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:** `CATALOGS_MAPPING_CATALOG_READ`

        **User role permission required:** `assets_catalogs: read`
      operationId: getMappingsByBP
      security:
        - JWT: []
      responses:
        "200":
          description: List of mappings
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: A list of mappings
                    items:
                      $ref: "#/components/schemas/catalogs-mapper"
                  metaData:
                    $ref: "#/components/schemas/catalogs-responseMeta"
        "401":
          $ref: "#/components/responses/catalogs-401"
        "403":
          $ref: "#/components/responses/catalogs-403"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/getMappingsByBP
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/catalogs/mappings \
              --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", "/catalogs/mappings", 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/catalogs/mappings");
            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": "/catalogs/mappings",
              "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/catalogs/mappings');
            $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/catalogs/mappings")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /catalogs/mappings/{bpActionParamKey}:
    delete:
      tags:
        - Catalogs
      summary: Delete mapping
      description: |
        Delete a single mapping.

        ---

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

        **User role permission required:** `assets_catalogs: delete`
      operationId: deleteMappingBykey
      security:
        - JWT: []
      parameters:
        - in: path
          name: bpActionParamKey
          description: The unique identifier of the mapping
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Deletion status
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: boolean
                    description: "`true` if successful"
                  metaData:
                    $ref: "#/components/schemas/catalogs-responseMeta"
        "401":
          $ref: "#/components/responses/catalogs-401"
        "403":
          $ref: "#/components/responses/catalogs-403"
        "404":
          $ref: "#/components/responses/catalogs-404"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/deleteMappingBykey
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/catalogs/mappings/%7BbpActionParamKey%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", "/catalogs/mappings/%7BbpActionParamKey%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/catalogs/mappings/%7BbpActionParamKey%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": "/catalogs/mappings/%7BbpActionParamKey%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/catalogs/mappings/%7BbpActionParamKey%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/catalogs/mappings/%7BbpActionParamKey%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /catalogs/itemDetail:
    get:
      tags:
        - Catalogs
      summary: Get single item by unique key
      description: |
        Retrieve a single item from a catalog by using the value of the unique identifier (key) in the catalog. If you want to retrieve an item by its ID in the Synerise database, use [/bags/{catalogId}/items/{itemId}](#operation/getItem).

        ---

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

        **User role permission required:** `assets_catalogs: read`
      operationId: getItemDetailByKey
      security:
        - JWT: []
      parameters:
        - name: catalogName
          in: query
          required: true
          description: Name of the catalog
          schema:
            type: string
        - name: key
          in: query
          required: true
          description: |
            Value of the unique identifier of the item in the catalog. When you retrieve an item using [this endpoint](#operation/getItemsByBag), the identifier is in the `itemKey` field.

            ```
            {
                "creationDate": "2020-09-30T11:31:16.314Z",
                "id": 73753,
                "itemKey": "uniqueValue", // this is the value of the key
                "lastModified": null,
                "value": "{\"exampleKey\":\"uniqueValue\",\"exampleKey2\":\"exampleValue\"}",
                "bag": {
                    "author": "authorName",
                    "creationDate": "2020-09-30T10:52:31.264Z",
                    "id": 1053,
                    "lastModified": "2020-09-30T11:41:11.808Z",
                    "name": "sampleCatalog"
                }
            },
            ```
          schema:
            type: string
      responses:
        "200":
          description: A single item
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    description: The column values from this item's catalog row.
                    properties:
                      itemId:
                        type: string
                        description: Unique ID, equal to the `itemKey` used in the request to this endpoint.
                    additionalProperties:
                      description: Column values
                  metaData:
                    $ref: "#/components/schemas/catalogs-responseMeta"
        "401":
          $ref: "#/components/responses/catalogs-401"
        "403":
          $ref: "#/components/responses/catalogs-403"
        "404":
          $ref: "#/components/responses/catalogs-404"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/getItemDetailByKey
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/catalogs/itemDetail?catalogName=SOME_STRING_VALUE&key=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", "/catalogs/itemDetail?catalogName=SOME_STRING_VALUE&key=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/catalogs/itemDetail?catalogName=SOME_STRING_VALUE&key=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": "/catalogs/itemDetail?catalogName=SOME_STRING_VALUE&key=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/catalogs/itemDetail');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'catalogName' => 'SOME_STRING_VALUE',
              'key' => '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/catalogs/itemDetail?catalogName=SOME_STRING_VALUE&key=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /catalogs/v2/bags/{catalogId}/items:
    delete:
      tags:
        - Catalogs
      summary: Delete all items from a catalog
      description: |
        Delete all the contents of a catalog.

        Information about the keys (columns) remains.


        ---

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

        **User role permission required:** `assets_catalogs: delete`
      operationId: deleteBagsItemsV2
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
      responses:
        "200":
          description: Items deleted. The `metaData` object always shows a `totalCount` of 1, regardless of the number of deleted items.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: string
                    format: uuid
                    description: ID of the deletion job
                  metaData:
                    $ref: "#/components/schemas/catalogs-responseMeta"
        4xx:
          $ref: "#/components/responses/catalogs-400generic"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/deleteBagsItemsV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/items \
              --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", "/catalogs/v2/bags/%7BcatalogId%7D/items", 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/catalogs/v2/bags/%7BcatalogId%7D/items");
            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": "/catalogs/v2/bags/%7BcatalogId%7D/items",
              "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/catalogs/v2/bags/%7BcatalogId%7D/items');
            $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/catalogs/v2/bags/%7BcatalogId%7D/items")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /catalogs/v2/bags/{catalogId}/items/batch:
    delete:
      tags:
        - Catalogs
      summary: Delete items by itemKeys
      description: |
        Delete items by itemKeys (unique identifier of an item in the catalog, for example a product's SKU). In the Synerise Portal, it's called the **Primary key**.

        ---

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

        **User role permission required:** `assets_catalogs: delete`
      operationId: deleteItemsByItemKeys
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
      requestBody:
        description: Array of itemKeys
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
      responses:
        "204":
          description: No Content
        "401":
          $ref: "#/components/responses/catalogs-401"
        "403":
          $ref: "#/components/responses/catalogs-403"
        "404":
          $ref: "#/components/responses/catalogs-404"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/deleteItemsByItemKeys
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/items/batch \
              --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("DELETE", "/catalogs/v2/bags/%7BcatalogId%7D/items/batch", 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("DELETE", "https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/items/batch");
            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": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/catalogs/v2/bags/%7BcatalogId%7D/items/batch",
              "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/catalogs/v2/bags/%7BcatalogId%7D/items/batch');
            $request->setMethod(HTTP_METH_DELETE);

            $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.delete("https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/items/batch")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[\"string\"]")
              .asString();
  /catalogs/v2/bags/{catalogId}/enable/filtering:
    patch:
      tags:
        - Catalogs
      summary: Enable filtering
      description: |
        Enable filtering for a catalog on selected fields

        ---

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

        **User role permission required:** `assets_catalogs: update`
      operationId: enableFilteringV2
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/catalogs-enableFilteringRequest"
      responses:
        "200":
          description: Upload status
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: string
                    format: uuid
                  metaData:
                    $ref: "#/components/schemas/catalogs-responseMeta"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/enableFilteringV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PATCH \
              --url https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/enable/filtering \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"fields":["string"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"fields\":[\"string\"]}"

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

            conn.request("PATCH", "/catalogs/v2/bags/%7BcatalogId%7D/enable/filtering", payload, headers)

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

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

            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/catalogs/v2/bags/%7BcatalogId%7D/enable/filtering");
            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": "/catalogs/v2/bags/%7BcatalogId%7D/enable/filtering",
              "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({fields: ['string']}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            HttpRequest::methodRegister('PATCH');
            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/enable/filtering');
            $request->setMethod(HttpRequest::HTTP_METH_PATCH);

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

            $request->setBody('{"fields":["string"]}');

            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/catalogs/v2/bags/%7BcatalogId%7D/enable/filtering")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"fields\":[\"string\"]}")
              .asString();
  /catalogs/v2/bags/{catalogId}/disable/filtering:
    patch:
      tags:
        - Catalogs
      summary: Disable filtering
      description: |
        Disable filtering for a catalog on selected fields

        ---

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

        **User role permission required:** `assets_catalogs: update`
      operationId: disableFilteringV2
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/catalogs-disableFilteringRequest"
      responses:
        "200":
          description: Number of rows changed
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: integer
                  metaData:
                    $ref: "#/components/schemas/catalogs-responseMeta"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/disableFilteringV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PATCH \
              --url https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/disable/filtering \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"removeFilters":true}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

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

            conn.request("PATCH", "/catalogs/v2/bags/%7BcatalogId%7D/disable/filtering", payload, headers)

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

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

            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/catalogs/v2/bags/%7BcatalogId%7D/disable/filtering");
            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": "/catalogs/v2/bags/%7BcatalogId%7D/disable/filtering",
              "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({removeFilters: true}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            HttpRequest::methodRegister('PATCH');
            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/disable/filtering');
            $request->setMethod(HttpRequest::HTTP_METH_PATCH);

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

            $request->setBody('{"removeFilters":true}');

            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/catalogs/v2/bags/%7BcatalogId%7D/disable/filtering")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"removeFilters\":true}")
              .asString();
  /catalogs/v1/async/bags/{catalogId}/item:
    post:
      tags:
        - Catalogs
      summary: Add or update item asynchronously
      description: |
        Add a single item asynchronously to the catalog. If the item already exists, it's entirely overwritten by the item you send.

        Asynchronous requests are processed according to the time they reach the service.  
        This means that requests to synchronous endpoints (for example, [`/bags/{catalogId}/items/{itemId}`](#operation/updateItem) may overwrite asynchronous operations which were sent earlier and queued due to high traffic.  
        This behavior also applies to requests from Automation and AI feed synchronization, which use the asynchronous mechanism.

        The request body can't exceed 256KB.


        ---

        **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 permissions required (at least one):** `CATALOGS_ITEM_BATCH_CREATE`, `CATALOGS_ITEM_BATCH_CATALOG_CREATE`

        **User role permission required:** `assets_catalogs: create`
      operationId: addItemAsync
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
      requestBody:
        description: JSON object with any number of key/value pairs
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/catalogs-addItem"
      responses:
        "204":
          description: Operation added to queue
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/addItemAsync
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/item \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"itemKey":"sku1357","value":{"itemCategory":"smartphone","itemColor":"blue"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}"

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

            conn.request("POST", "/catalogs/v1/async/bags/%7BcatalogId%7D/item", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "itemKey": "sku1357",
              "value": {
                "itemCategory": "smartphone",
                "itemColor": "blue"
              }
            });

            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/catalogs/v1/async/bags/%7BcatalogId%7D/item");
            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": "/catalogs/v1/async/bags/%7BcatalogId%7D/item",
              "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({itemKey: 'sku1357', value: {itemCategory: 'smartphone', itemColor: 'blue'}}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/item');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"itemKey":"sku1357","value":{"itemCategory":"smartphone","itemColor":"blue"}}');

            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/catalogs/v1/async/bags/%7BcatalogId%7D/item")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}")
              .asString();
    patch:
      tags:
        - Catalogs
      summary: Add or update (partial) item asynchronously
      description: |
        Update a single item asynchronously to the catalog. If the item doesn't exist, it will be created.

        This endpoint allows you to perform partial updates - you can send only the properties that you want to add/modify, instead of sending the entire item.

        Asynchronous requests are processed according to the time they reach the service.  
        This means that requests to synchronous endpoints (for example, [`/bags/{catalogId}/items/{itemId}`](#operation/updateItem) may overwrite asynchronous operations which were sent earlier and queued due to high traffic.  
        This behavior also applies to requests from Automation and AI feed synchronization, which use the asynchronous mechanism.

        The request body can't exceed 256KB.


        ---

        **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 permissions required (at least one):** `CATALOGS_ITEM_BATCH_UPDATE`, `CATALOGS_ITEM_BATCH_CATALOG_UPDATE`

        **User role permission required:** `assets_catalogs: update`
      operationId: updateItemAsync
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
      requestBody:
        description: JSON object with any number of key/value pairs
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/catalogs-addItem"
      responses:
        "204":
          description: Operation added to queue
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/updateItemAsync
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PATCH \
              --url https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/item \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"itemKey":"sku1357","value":{"itemCategory":"smartphone","itemColor":"blue"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}"

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

            conn.request("PATCH", "/catalogs/v1/async/bags/%7BcatalogId%7D/item", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "itemKey": "sku1357",
              "value": {
                "itemCategory": "smartphone",
                "itemColor": "blue"
              }
            });

            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/catalogs/v1/async/bags/%7BcatalogId%7D/item");
            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": "/catalogs/v1/async/bags/%7BcatalogId%7D/item",
              "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({itemKey: 'sku1357', value: {itemCategory: 'smartphone', itemColor: 'blue'}}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            HttpRequest::methodRegister('PATCH');
            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/item');
            $request->setMethod(HttpRequest::HTTP_METH_PATCH);

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

            $request->setBody('{"itemKey":"sku1357","value":{"itemCategory":"smartphone","itemColor":"blue"}}');

            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/catalogs/v1/async/bags/%7BcatalogId%7D/item")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}")
              .asString();
  /catalogs/v1/async/bags/{catalogId}/items:
    post:
      tags:
        - Catalogs
      summary: Batch add or update items asynchronously
      description: |
        Add a number of items asynchronously at once. If an item already exists, it's entirely overwritten by the item you send.

        Asynchronous requests are processed according to the time they reach the service.  
        This means that requests to synchronous endpoints (for example, [`/bags/{catalogId}/items/{itemId}`](#operation/updateItem) may overwrite asynchronous operations which were sent earlier and queued due to high traffic.  
        This behavior also applies to requests from Automation and AI feed synchronization, which use the asynchronous mechanism.

        The request body can't exceed 256KB.


        ---

        **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 permissions required (at least one):** `CATALOGS_ITEM_BATCH_CREATE`, `CATALOGS_ITEM_BATCH_CATALOG_CREATE`

        **User role permission required:** `assets_catalogs: create`
      operationId: addItemsBatchAsync
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
      requestBody:
        description: JSON object with any number of key/value pairs
        required: true
        content:
          application/json:
            schema:
              type: array
              maxItems: 200
              items:
                $ref: "#/components/schemas/catalogs-addItem"
      responses:
        "204":
          description: Operation added to queue
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/addItemsBatchAsync
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/items \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '[{"itemKey":"sku1357","value":{"itemCategory":"smartphone","itemColor":"blue"}}]'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "[{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}]"

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

            conn.request("POST", "/catalogs/v1/async/bags/%7BcatalogId%7D/items", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              {
                "itemKey": "sku1357",
                "value": {
                  "itemCategory": "smartphone",
                  "itemColor": "blue"
                }
              }
            ]);

            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/catalogs/v1/async/bags/%7BcatalogId%7D/items");
            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": "/catalogs/v1/async/bags/%7BcatalogId%7D/items",
              "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([{itemKey: 'sku1357', value: {itemCategory: 'smartphone', itemColor: 'blue'}}]));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/items');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('[{"itemKey":"sku1357","value":{"itemCategory":"smartphone","itemColor":"blue"}}]');

            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/catalogs/v1/async/bags/%7BcatalogId%7D/items")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}]")
              .asString();
    patch:
      tags:
        - Catalogs
      summary: Batch add or update (partial) items asynchronously
      description: |
        Update a number of items asynchronously at once. If an item doesn't exist, it will be created.

        This endpoint allows you to perform partial updates - you can send only the properties that you want to add/modify, instead of sending the entire item.

        Asynchronous requests are processed according to the time they reach the service.  
        This means that requests to synchronous endpoints (for example, [`/bags/{catalogId}/items/{itemId}`](#operation/updateItem) may overwrite asynchronous operations which were sent earlier and queued due to high traffic.  
        This behavior also applies to requests from Automation and AI feed synchronization, which use the asynchronous mechanism.

        The request body can't exceed 256KB.


        ---

        **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 permissions required (at least one):** `CATALOGS_ITEM_BATCH_UPDATE`, `CATALOGS_ITEM_BATCH_CATALOG_UPDATE`

        **User role permission required:** `assets_catalogs: update`
      operationId: updateItemsBatchAsync
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
      requestBody:
        description: JSON object with any number of key/value pairs
        required: true
        content:
          application/json:
            schema:
              type: array
              maxItems: 200
              items:
                $ref: "#/components/schemas/catalogs-addItem"
      responses:
        "204":
          description: Operation added to queue
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/updateItemsBatchAsync
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PATCH \
              --url https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/items \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '[{"itemKey":"sku1357","value":{"itemCategory":"smartphone","itemColor":"blue"}}]'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "[{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}]"

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

            conn.request("PATCH", "/catalogs/v1/async/bags/%7BcatalogId%7D/items", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              {
                "itemKey": "sku1357",
                "value": {
                  "itemCategory": "smartphone",
                  "itemColor": "blue"
                }
              }
            ]);

            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/catalogs/v1/async/bags/%7BcatalogId%7D/items");
            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": "/catalogs/v1/async/bags/%7BcatalogId%7D/items",
              "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([{itemKey: 'sku1357', value: {itemCategory: 'smartphone', itemColor: 'blue'}}]));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            HttpRequest::methodRegister('PATCH');
            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/items');
            $request->setMethod(HttpRequest::HTTP_METH_PATCH);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('[{"itemKey":"sku1357","value":{"itemCategory":"smartphone","itemColor":"blue"}}]');

            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/catalogs/v1/async/bags/%7BcatalogId%7D/items")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}]")
              .asString();
  /crm/v1/clients/{clientId}/contacts:
    get:
      deprecated: true
      tags:
        - Profile management
      summary: Get Profile details
      description: |
        <span style="color:red">This method is deprecated. It will be disabled on August 30, 2026.</span>  

        You can use these methods instead:
          - [GET /v4/clients/{clientId}](#operation/GetClientData)
          - [GET /v4/clients/{identifierType}/{identifierValue}](#operation/FindAClient)

        Retrieve the details of a Profile.


        ---

        **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:** `CRM_DETAILS_CLIENT_READ`

        **User role permission required:** `client_info: read`
      operationId: getClient
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/crm-pathClientId"
      responses:
        "200":
          description: Profile details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/crm-ClientDetails"
        "404":
          $ref: "#/components/responses/crm-404-pii"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/getClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/crm/v1/clients/%7BclientId%7D/contacts \
              --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", "/crm/v1/clients/%7BclientId%7D/contacts", 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/crm/v1/clients/%7BclientId%7D/contacts");
            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": "/crm/v1/clients/%7BclientId%7D/contacts",
              "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/crm/v1/clients/%7BclientId%7D/contacts');
            $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/crm/v1/clients/%7BclientId%7D/contacts")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /crm/v1/contacts/{clientId}:
    put:
      deprecated: true
      tags:
        - Profile management
      summary: Update Profile
      description: |
        <span style="color:red">This method is deprecated. It will be disabled on August 16, 2026</span>  
        Use one of these endpoints instead:
          - [POST /v4/clients/{clientId}](#operation/UpdateAClient)
          - [POST /v4/clients/by-email/{clientEmail}](#operation/UpdateAClientByEmail)
          - [POST /v4/clients/by-customid/{customId}](#operation/UpdateAClientByCustomId)

        Sending a null value **deletes** an attribute (if it's a custom attribute) or **sets it to null/default value** (if the attribute is Synerise-native)


        ---

        **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:** `CRM_CLIENT_UPDATE`

        **User role permission required:** `client_management: update`
      operationId: updateClient
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/crm-pathClientId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/crm-CustomerCommon"
        required: true
      responses:
        "200":
          description: Profile details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/crm-ClientDetails"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/updateClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/crm/v1/contacts/%7BclientId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string","firstname":"string","lastName":"string","custom_identify":"string","company":"string","phone":"string","address":"string","birthdate":"2019-08-24","city":"string","zipCode":"string","province":"string","country_id":"string","countryCode":"PL","avatarUrl":"string","sex":"0","tags":["string"],"additionalProperties":null}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\",\"firstname\":\"string\",\"lastName\":\"string\",\"custom_identify\":\"string\",\"company\":\"string\",\"phone\":\"string\",\"address\":\"string\",\"birthdate\":\"2019-08-24\",\"city\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"country_id\":\"string\",\"countryCode\":\"PL\",\"avatarUrl\":\"string\",\"sex\":\"0\",\"tags\":[\"string\"],\"additionalProperties\":null}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("PUT", "/crm/v1/contacts/%7BclientId%7D", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "email": "string",
              "firstname": "string",
              "lastName": "string",
              "custom_identify": "string",
              "company": "string",
              "phone": "string",
              "address": "string",
              "birthdate": "2019-08-24",
              "city": "string",
              "zipCode": "string",
              "province": "string",
              "country_id": "string",
              "countryCode": "PL",
              "avatarUrl": "string",
              "sex": "0",
              "tags": [
                "string"
              ],
              "additionalProperties": null
            });

            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/crm/v1/contacts/%7BclientId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/crm/v1/contacts/%7BclientId%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({
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              email: 'string',
              firstname: 'string',
              lastName: 'string',
              custom_identify: 'string',
              company: 'string',
              phone: 'string',
              address: 'string',
              birthdate: '2019-08-24',
              city: 'string',
              zipCode: 'string',
              province: 'string',
              country_id: 'string',
              countryCode: 'PL',
              avatarUrl: 'string',
              sex: '0',
              tags: ['string'],
              additionalProperties: null
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/crm/v1/contacts/%7BclientId%7D');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string","firstname":"string","lastName":"string","custom_identify":"string","company":"string","phone":"string","address":"string","birthdate":"2019-08-24","city":"string","zipCode":"string","province":"string","country_id":"string","countryCode":"PL","avatarUrl":"string","sex":"0","tags":["string"],"additionalProperties":null}');

            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/crm/v1/contacts/%7BclientId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\",\"firstname\":\"string\",\"lastName\":\"string\",\"custom_identify\":\"string\",\"company\":\"string\",\"phone\":\"string\",\"address\":\"string\",\"birthdate\":\"2019-08-24\",\"city\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"country_id\":\"string\",\"countryCode\":\"PL\",\"avatarUrl\":\"string\",\"sex\":\"0\",\"tags\":[\"string\"],\"additionalProperties\":null}")
              .asString();
  /items/v2/filter/validate:
    post:
      summary: Validate item filter
      description: |
        This endpoint lets you validate the syntax of a filter and preview its results.

        The `parserResult` object in the response validates only the IQL syntax, it does not check if the attributes or contexts referenced in the IQL query exist!


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_FILTER_VALIDATE_READ`

        **User role permission required:** `campaigns_recommendations: read`
      operationId: ValidateItemFilter
      tags:
        - Item filters
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-filter-all-itemsCatalogId"
        - $ref: "#/components/parameters/items-filter-all-exampleItems"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/items-filter-all-ValidateItemsFilterRequestBody"
      responses:
        "200":
          description: Validation response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-filter-all-FilterValidateResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-filter-all-Error"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-filter-all-Error"
        "502":
          description: Catalog not ready
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-filter-all-Error"
      x-snr-doc-urls:
        - /api-reference/ai-suite#tag/Item-filters/operation/ValidateItemFilter
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api.synerise.com/items/v2/filter/validate?itemsCatalogId=SOME_STRING_VALUE&exampleItems=SOME_INTEGER_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"filteringString":"IF(\"abcd\" IN client.tags,discount == 0,discount > 0)","clientUUID":"68df2317-0edb-4cc9-8b39-5ab68325f891","contextItems":["12345"],"inventoryContext":{"channelIds":["string"]},"candidateItems":["67890"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"filteringString\":\"IF(\\\"abcd\\\" IN client.tags,discount == 0,discount > 0)\",\"clientUUID\":\"68df2317-0edb-4cc9-8b39-5ab68325f891\",\"contextItems\":[\"12345\"],\"inventoryContext\":{\"channelIds\":[\"string\"]},\"candidateItems\":[\"67890\"]}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/items/v2/filter/validate?itemsCatalogId=SOME_STRING_VALUE&exampleItems=SOME_INTEGER_VALUE", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "filteringString": "IF(\"abcd\" IN client.tags,discount == 0,discount > 0)",
              "clientUUID": "68df2317-0edb-4cc9-8b39-5ab68325f891",
              "contextItems": [
                "12345"
              ],
              "inventoryContext": {
                "channelIds": [
                  "string"
                ]
              },
              "candidateItems": [
                "67890"
              ]
            });

            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/items/v2/filter/validate?itemsCatalogId=SOME_STRING_VALUE&exampleItems=SOME_INTEGER_VALUE");
            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": "/items/v2/filter/validate?itemsCatalogId=SOME_STRING_VALUE&exampleItems=SOME_INTEGER_VALUE",
              "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({
              filteringString: 'IF("abcd" IN client.tags,discount == 0,discount > 0)',
              clientUUID: '68df2317-0edb-4cc9-8b39-5ab68325f891',
              contextItems: ['12345'],
              inventoryContext: {channelIds: ['string']},
              candidateItems: ['67890']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/items/v2/filter/validate');
            $request->setMethod(HTTP_METH_POST);

            $request->setQueryData([
              'itemsCatalogId' => 'SOME_STRING_VALUE',
              'exampleItems' => 'SOME_INTEGER_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"filteringString":"IF(\\"abcd\\" IN client.tags,discount == 0,discount > 0)","clientUUID":"68df2317-0edb-4cc9-8b39-5ab68325f891","contextItems":["12345"],"inventoryContext":{"channelIds":["string"]},"candidateItems":["67890"]}');

            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/items/v2/filter/validate?itemsCatalogId=SOME_STRING_VALUE&exampleItems=SOME_INTEGER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"filteringString\":\"IF(\\\"abcd\\\" IN client.tags,discount == 0,discount > 0)\",\"clientUUID\":\"68df2317-0edb-4cc9-8b39-5ab68325f891\",\"contextItems\":[\"12345\"],\"inventoryContext\":{\"channelIds\":[\"string\"]},\"candidateItems\":[\"67890\"]}")
              .asString();
  /search/v2/indices/{indexId}/visual:
    get:
      summary: Visual items search
      description: |
        Retrieves items that match an image. The results can be filtered and sorted.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: SearchVisualGet
      tags:
        - Visual Search
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-imageUrl"
        - $ref: "#/components/parameters/items-search-inPathIndexId"
        - $ref: "#/components/parameters/items-search-clientUUID"
        - $ref: "#/components/parameters/items-search-personalize"
        - $ref: "#/components/parameters/items-search-correlationId"
        - $ref: "#/components/parameters/items-search-searchId"
        - $ref: "#/components/parameters/items-search-sortByMetric"
        - $ref: "#/components/parameters/items-search-sortByGeoPoint"
        - $ref: "#/components/parameters/items-search-filterGeoPoints"
        - $ref: "#/components/parameters/items-search-filterAroundRadius"
        - $ref: "#/components/parameters/items-search-filterAnchor"
        - $ref: "#/components/parameters/items-search-filters"
        - $ref: "#/components/parameters/items-search-facets"
        - $ref: "#/components/parameters/items-search-facetsSize"
        - $ref: "#/components/parameters/items-search-maxValuesPerFacet"
        - $ref: "#/components/parameters/items-search-caseSensitiveFacetValues"
        - $ref: "#/components/parameters/items-search-displayAttributes"
        - $ref: "#/components/parameters/items-search-context"
        - $ref: "#/components/parameters/items-search-includeFacets"
        - $ref: "#/components/parameters/items-search-facetsOrderBy"
        - $ref: "#/components/parameters/items-search-paginationPage"
        - $ref: "#/components/parameters/items-search-paginationLimit"
        - $ref: "#/components/parameters/items-search-paginationSortBy"
        - $ref: "#/components/parameters/items-search-paginationOrdering"
        - $ref: "#/components/parameters/items-search-paginationIncludeMeta"
        - $ref: "#/components/parameters/items-search-ignoreQueryRules"
        - $ref: "#/components/parameters/items-search-excludeQueryRules"
        - $ref: "#/components/parameters/items-search-params"
      responses:
        "200":
          description: Search response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-VisualSearchResponse"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Visual-Search/operation/SearchVisualGet
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/visual?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/visual?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'url' => 'SOME_STRING_VALUE',
              'clientUUID' => 'SOME_STRING_VALUE',
              'personalize' => 'SOME_BOOLEAN_VALUE',
              'correlationId' => 'SOME_STRING_VALUE',
              'searchId' => 'SOME_STRING_VALUE',
              'sortByMetric' => 'SOME_STRING_VALUE',
              'sortByGeoPoint' => '34.052235,-118.243685',
              'filterGeoPoints' => [
                '34.052235,-118.243685',
                '15.0,65.0'
              ],
              'filterAroundRadius' => '5000',
              'filterAnchor' => '0.2,0.8',
              'filters' => 'SOME_STRING_VALUE',
              'facets' => 'SOME_ARRAY_VALUE',
              'facetsSize' => 'SOME_INTEGER_VALUE',
              'maxValuesPerFacet' => 'SOME_INTEGER_VALUE',
              'caseSensitiveFacetValues' => 'SOME_BOOLEAN_VALUE',
              'displayAttributes' => [
                'title',
                'price'
              ],
              'context' => [
                'mobile',
                'listing'
              ],
              'includeFacets' => 'SOME_STRING_VALUE',
              'facetsOrderBy' => 'SOME_STRING_VALUE',
              'page' => '4',
              'limit' => '10',
              'sortBy' => 'SOME_STRING_VALUE',
              'ordering' => 'SOME_STRING_VALUE',
              'includeMeta' => 'SOME_BOOLEAN_VALUE',
              'ignoreQueryRules' => 'SOME_BOOLEAN_VALUE',
              'excludeQueryRules' => [
                '2',
                '5'
              ],
              'params' => 'source:mobile'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Visual items search
      description: |
        Retrieves items that match an image. The results can be filtered and sorted.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: SearchVisualPost
      tags:
        - Visual Search
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-inPathIndexId"
      requestBody:
        description: Request for performing visual search
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/items-search-VisualSearchRequest"
          multipart/form-data:
            schema:
              type: object
              properties:
                image:
                  type: string
                  format: binary
                  description: Uploaded image to be used in the visual search
                params:
                  type: object
                  description: Parameters of the search
                  properties:
                    page:
                      $ref: "#/components/schemas/items-search-PaginationPage"
                    limit:
                      $ref: "#/components/schemas/items-search-PaginationLimit"
                    sortBy:
                      $ref: "#/components/schemas/items-search-PaginationSortBy"
                    ordering:
                      $ref: "#/components/schemas/items-search-PaginationOrdering"
                    includeMeta:
                      $ref: "#/components/schemas/items-search-PaginationIncludeMeta"
                    clientUUID:
                      $ref: "#/components/schemas/items-search-ClientUUID"
                    correlationId:
                      $ref: "#/components/schemas/items-search-CorrelationId"
                    searchId:
                      $ref: "#/components/schemas/items-search-SearchId"
                    sortByMetric:
                      $ref: "#/components/schemas/items-search-SortByMetric"
                    sortByGeoPoints:
                      $ref: "#/components/schemas/items-search-SortByGeoPoint"
                    filterGeoPoints:
                      $ref: "#/components/schemas/items-search-FilterGeoPoints"
                    filterAroundRadius:
                      $ref: "#/components/schemas/items-search-FilterAroundRadius"
                    filterAnchor:
                      $ref: "#/components/schemas/items-search-FilterAnchor"
                    filters:
                      $ref: "#/components/schemas/items-search-Filters"
                    facets:
                      $ref: "#/components/schemas/items-search-Facets"
                    facetsSize:
                      $ref: "#/components/schemas/items-search-FacetsSize"
                    maxValuesPerFacet:
                      $ref: "#/components/schemas/items-search-MaxValuesPerFacet"
                    caseSensitiveFacetValues:
                      $ref: "#/components/schemas/items-search-CaseSensitiveFacetValues"
                    includeFacets:
                      $ref: "#/components/schemas/items-search-IncludeFacets"
                    facetsOrderBy:
                      $ref: "#/components/schemas/items-search-FacetsOrdering"
                    context:
                      $ref: "#/components/schemas/items-search-Context"
                    displayAttributes:
                      $ref: "#/components/schemas/items-search-DisplayAttributes"
                    ignoreQueryRules:
                      $ref: "#/components/schemas/items-search-IgnoreQueryRules"
                    excludeQueryRules:
                      $ref: "#/components/schemas/items-search-ExcludeQueryRules"
                    params:
                      $ref: "#/components/schemas/items-search-Params"
      responses:
        "200":
          description: Search response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-VisualSearchResponse"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Visual-Search/operation/SearchVisualPost
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"url":"string","page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","personalize":true,"correlationId":"string","searchId":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filterAnchor":"0.2,0.8","filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"url\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filterAnchor\":\"0.2,0.8\",\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/visual", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "url": "string",
              "page": 0,
              "limit": 10,
              "sortBy": "string",
              "ordering": "desc",
              "includeMeta": true,
              "clientUUID": "string",
              "personalize": true,
              "correlationId": "string",
              "searchId": "string",
              "sortByMetric": "TransactionsPopularity",
              "sortByGeoPoints": "34.052235,-118.243685",
              "filterGeoPoints": [
                "34.052235,-118.243685",
                "15.0,65.0"
              ],
              "filterAroundRadius": 2000,
              "filterAnchor": "0.2,0.8",
              "filters": "string",
              "facets": [
                "string"
              ],
              "customFilteredFacets": {
                "brand": "price > 100",
                "price": "brand == foo"
              },
              "facetsSize": 2000,
              "maxValuesPerFacet": 50,
              "caseSensitiveFacetValues": false,
              "includeFacets": "all",
              "facetsOrderBy": "coverage",
              "context": [
                "mobile",
                "listing"
              ],
              "displayAttributes": [
                "title",
                "price"
              ],
              "ignoreQueryRules": false,
              "excludeQueryRules": [
                2,
                5
              ],
              "params": {
                "source": "mobile"
              }
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/visual",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              url: 'string',
              page: 0,
              limit: 10,
              sortBy: 'string',
              ordering: 'desc',
              includeMeta: true,
              clientUUID: 'string',
              personalize: true,
              correlationId: 'string',
              searchId: 'string',
              sortByMetric: 'TransactionsPopularity',
              sortByGeoPoints: '34.052235,-118.243685',
              filterGeoPoints: ['34.052235,-118.243685', '15.0,65.0'],
              filterAroundRadius: 2000,
              filterAnchor: '0.2,0.8',
              filters: 'string',
              facets: ['string'],
              customFilteredFacets: {brand: 'price > 100', price: 'brand == foo'},
              facetsSize: 2000,
              maxValuesPerFacet: 50,
              caseSensitiveFacetValues: false,
              includeFacets: 'all',
              facetsOrderBy: 'coverage',
              context: ['mobile', 'listing'],
              displayAttributes: ['title', 'price'],
              ignoreQueryRules: false,
              excludeQueryRules: [2, 5],
              params: {source: 'mobile'}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"url":"string","page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","personalize":true,"correlationId":"string","searchId":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filterAnchor":"0.2,0.8","filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"}}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"url\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filterAnchor\":\"0.2,0.8\",\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"}}")
              .asString();
        - lang: shell_curl
          label: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: multipart/form-data' \
              --form image=string \
              --form 'params={"page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","correlationId":"string","searchId":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filterAnchor":"0.2,0.8","filters":"string","facets":["string"],"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"}}'
        - lang: python_python3
          label: Python + Python3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"params\"\r\n\r\n{\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filterAnchor\":\"0.2,0.8\",\"filters\":\"string\",\"facets\":[\"string\"],\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"}}\r\n-----011000010111000001101001--\r\n"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "multipart/form-data"
                }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/visual", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: javascript_xhr
          label: Javascript + Xhr
          source: |-
            const data = new FormData();
            data.append("image", "string");
            data.append("params", "{\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filterAnchor\":\"0.2,0.8\",\"filters\":\"string\",\"facets\":[\"string\"],\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"}}");

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: node_native
          label: Node + Native
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/visual",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"params\"\r\n\r\n{\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filterAnchor\":\"0.2,0.8\",\"filters\":\"string\",\"facets\":[\"string\"],\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"}}\r\n-----011000010111000001101001--\r\n");
            req.end();
        - lang: php_http1
          label: Php + Http1
          source: "<?php


            $request = new HttpRequest();

            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual');

            $request->setMethod(HTTP_METH_POST);


            $request->setHeaders([

            \  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',

            \  'content-type' => 'multipart/form-data'

            ]);


            $request->setBody('-----011000010111000001101001\r

            Content-Disposition: form-data; name=\"image\"\r

            \r

            string\r

            -----011000010111000001101001\r

            Content-Disposition: form-data; name=\"params\"\r

            \r

            {\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filterAnchor\":\"0.2,0.8\",\"filters\":\"string\",\"facets\":[\"string\"],\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"}}\r

            -----011000010111000001101001--\r

            ');


            try {

            \  $response = $request->send();


            \  echo $response->getBody();

            } catch (HttpException $ex) {

            \  echo $ex;

            }"
        - lang: java_unirest
          label: Java + Unirest
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"params\"\r\n\r\n{\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filterAnchor\":\"0.2,0.8\",\"filters\":\"string\",\"facets\":[\"string\"],\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"}}\r\n-----011000010111000001101001--\r\n")
              .asString();
  /search/v2/indices/{indexId}/visual/explain:
    get:
      summary: Explained visual items search
      description: |
        Retrieves items that match an image. The results can be filtered and sorted. The response contains an explanation of the factors that influenced the result.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: SearchVisualGetWithExplanation
      tags:
        - Visual Search
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-imageUrl"
        - $ref: "#/components/parameters/items-search-inPathIndexId"
        - $ref: "#/components/parameters/items-search-clientUUID"
        - $ref: "#/components/parameters/items-search-personalize"
        - $ref: "#/components/parameters/items-search-correlationId"
        - $ref: "#/components/parameters/items-search-searchId"
        - $ref: "#/components/parameters/items-search-sortByMetric"
        - $ref: "#/components/parameters/items-search-sortByGeoPoint"
        - $ref: "#/components/parameters/items-search-filterGeoPoints"
        - $ref: "#/components/parameters/items-search-filterAroundRadius"
        - $ref: "#/components/parameters/items-search-filterAnchor"
        - $ref: "#/components/parameters/items-search-filters"
        - $ref: "#/components/parameters/items-search-facets"
        - $ref: "#/components/parameters/items-search-facetsSize"
        - $ref: "#/components/parameters/items-search-maxValuesPerFacet"
        - $ref: "#/components/parameters/items-search-caseSensitiveFacetValues"
        - $ref: "#/components/parameters/items-search-displayAttributes"
        - $ref: "#/components/parameters/items-search-context"
        - $ref: "#/components/parameters/items-search-includeFacets"
        - $ref: "#/components/parameters/items-search-facetsOrderBy"
        - $ref: "#/components/parameters/items-search-paginationPage"
        - $ref: "#/components/parameters/items-search-paginationLimit"
        - $ref: "#/components/parameters/items-search-paginationSortBy"
        - $ref: "#/components/parameters/items-search-paginationOrdering"
        - $ref: "#/components/parameters/items-search-paginationIncludeMeta"
        - $ref: "#/components/parameters/items-search-ignoreQueryRules"
        - $ref: "#/components/parameters/items-search-excludeQueryRules"
        - $ref: "#/components/parameters/items-search-crossWorkspaceModeEnabled"
        - $ref: "#/components/parameters/items-search-params"
      responses:
        "200":
          description: Search response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-VisualSearchResponseWithExplanation"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Visual-Search/operation/SearchVisualGetWithExplanation
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual/explain?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/visual/explain?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual/explain?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/visual/explain?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual/explain');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'url' => 'SOME_STRING_VALUE',
              'clientUUID' => 'SOME_STRING_VALUE',
              'personalize' => 'SOME_BOOLEAN_VALUE',
              'correlationId' => 'SOME_STRING_VALUE',
              'searchId' => 'SOME_STRING_VALUE',
              'sortByMetric' => 'SOME_STRING_VALUE',
              'sortByGeoPoint' => '34.052235,-118.243685',
              'filterGeoPoints' => [
                '34.052235,-118.243685',
                '15.0,65.0'
              ],
              'filterAroundRadius' => '5000',
              'filterAnchor' => '0.2,0.8',
              'filters' => 'SOME_STRING_VALUE',
              'facets' => 'SOME_ARRAY_VALUE',
              'facetsSize' => 'SOME_INTEGER_VALUE',
              'maxValuesPerFacet' => 'SOME_INTEGER_VALUE',
              'caseSensitiveFacetValues' => 'SOME_BOOLEAN_VALUE',
              'displayAttributes' => [
                'title',
                'price'
              ],
              'context' => [
                'mobile',
                'listing'
              ],
              'includeFacets' => 'SOME_STRING_VALUE',
              'facetsOrderBy' => 'SOME_STRING_VALUE',
              'page' => '4',
              'limit' => '10',
              'sortBy' => 'SOME_STRING_VALUE',
              'ordering' => 'SOME_STRING_VALUE',
              'includeMeta' => 'SOME_BOOLEAN_VALUE',
              'ignoreQueryRules' => 'SOME_BOOLEAN_VALUE',
              'excludeQueryRules' => [
                '2',
                '5'
              ],
              'crossWorkspaceModeEnabled' => 'SOME_BOOLEAN_VALUE',
              'params' => 'source:mobile'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual/explain?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Explained visual items search
      description: |
        Retrieves items that match an image. The results can be filtered and sorted. The response contains an explanation of the factors that influenced the result.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: SearchVisualPostWithExplanation
      tags:
        - Visual Search
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-inPathIndexId"
      requestBody:
        description: Request for performing visual search with explanation
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/items-search-VisualSearchRequest"
                - type: object
                  properties:
                    crossWorkspaceMode:
                      $ref: "#/components/schemas/items-search-CrossWorkspaceMode"
      responses:
        "200":
          description: Search response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-VisualSearchResponseWithExplanation"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Visual-Search/operation/SearchVisualPostWithExplanation
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual/explain \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"url":"string","page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","personalize":true,"correlationId":"string","searchId":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filterAnchor":"0.2,0.8","filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"},"crossWorkspaceMode":{"enabled":true}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"url\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filterAnchor\":\"0.2,0.8\",\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"crossWorkspaceMode\":{\"enabled\":true}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/visual/explain", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "url": "string",
              "page": 0,
              "limit": 10,
              "sortBy": "string",
              "ordering": "desc",
              "includeMeta": true,
              "clientUUID": "string",
              "personalize": true,
              "correlationId": "string",
              "searchId": "string",
              "sortByMetric": "TransactionsPopularity",
              "sortByGeoPoints": "34.052235,-118.243685",
              "filterGeoPoints": [
                "34.052235,-118.243685",
                "15.0,65.0"
              ],
              "filterAroundRadius": 2000,
              "filterAnchor": "0.2,0.8",
              "filters": "string",
              "facets": [
                "string"
              ],
              "customFilteredFacets": {
                "brand": "price > 100",
                "price": "brand == foo"
              },
              "facetsSize": 2000,
              "maxValuesPerFacet": 50,
              "caseSensitiveFacetValues": false,
              "includeFacets": "all",
              "facetsOrderBy": "coverage",
              "context": [
                "mobile",
                "listing"
              ],
              "displayAttributes": [
                "title",
                "price"
              ],
              "ignoreQueryRules": false,
              "excludeQueryRules": [
                2,
                5
              ],
              "params": {
                "source": "mobile"
              },
              "crossWorkspaceMode": {
                "enabled": true
              }
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual/explain");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/visual/explain",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              url: 'string',
              page: 0,
              limit: 10,
              sortBy: 'string',
              ordering: 'desc',
              includeMeta: true,
              clientUUID: 'string',
              personalize: true,
              correlationId: 'string',
              searchId: 'string',
              sortByMetric: 'TransactionsPopularity',
              sortByGeoPoints: '34.052235,-118.243685',
              filterGeoPoints: ['34.052235,-118.243685', '15.0,65.0'],
              filterAroundRadius: 2000,
              filterAnchor: '0.2,0.8',
              filters: 'string',
              facets: ['string'],
              customFilteredFacets: {brand: 'price > 100', price: 'brand == foo'},
              facetsSize: 2000,
              maxValuesPerFacet: 50,
              caseSensitiveFacetValues: false,
              includeFacets: 'all',
              facetsOrderBy: 'coverage',
              context: ['mobile', 'listing'],
              displayAttributes: ['title', 'price'],
              ignoreQueryRules: false,
              excludeQueryRules: [2, 5],
              params: {source: 'mobile'},
              crossWorkspaceMode: {enabled: true}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual/explain');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"url":"string","page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","personalize":true,"correlationId":"string","searchId":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filterAnchor":"0.2,0.8","filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"},"crossWorkspaceMode":{"enabled":true}}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual/explain")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"url\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filterAnchor\":\"0.2,0.8\",\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"crossWorkspaceMode\":{\"enabled\":true}}")
              .asString();
  /search/v2/indices/{indexId}/query:
    get:
      summary: Full-text items search
      description: |
        Retrieves items that match a full-text query from a search index or a suggestion index. The results can be filtered and sorted.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: SearchFullTextGet
      tags:
        - Search
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-searchQuery"
        - $ref: "#/components/parameters/items-search-inPathIndexId"
        - $ref: "#/components/parameters/items-search-clientUUID"
        - $ref: "#/components/parameters/items-search-personalize"
        - $ref: "#/components/parameters/items-search-correlationId"
        - $ref: "#/components/parameters/items-search-searchId"
        - $ref: "#/components/parameters/items-search-sortByMetric"
        - $ref: "#/components/parameters/items-search-sortByGeoPoint"
        - $ref: "#/components/parameters/items-search-filterGeoPoints"
        - $ref: "#/components/parameters/items-search-filterAroundRadius"
        - $ref: "#/components/parameters/items-search-filters"
        - $ref: "#/components/parameters/items-search-facets"
        - $ref: "#/components/parameters/items-search-facetsSize"
        - $ref: "#/components/parameters/items-search-maxValuesPerFacet"
        - $ref: "#/components/parameters/items-search-caseSensitiveFacetValues"
        - $ref: "#/components/parameters/items-search-displayAttributes"
        - $ref: "#/components/parameters/items-search-context"
        - $ref: "#/components/parameters/items-search-includeFacets"
        - $ref: "#/components/parameters/items-search-facetsOrderBy"
        - $ref: "#/components/parameters/items-search-paginationPage"
        - $ref: "#/components/parameters/items-search-paginationLimit"
        - $ref: "#/components/parameters/items-search-paginationSortBy"
        - $ref: "#/components/parameters/items-search-paginationOrdering"
        - $ref: "#/components/parameters/items-search-paginationIncludeMeta"
        - $ref: "#/components/parameters/items-search-distinctFilter"
        - $ref: "#/components/parameters/items-search-ignoreQueryRules"
        - $ref: "#/components/parameters/items-search-excludeQueryRules"
        - $ref: "#/components/parameters/items-search-disableQueryClassification"
        - $ref: "#/components/parameters/items-search-disableDynamicReranker"
        - $ref: "#/components/parameters/items-search-params"
      responses:
        "200":
          $ref: "#/components/responses/items-search-FullTextSearchResponse200"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search/operation/SearchFullTextGet
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/query?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&params=source%3Amobile' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/query?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&params=source%3Amobile", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/query?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&params=source%3Amobile");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/query?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&params=source%3Amobile",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/query');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'query' => 'SOME_STRING_VALUE',
              'clientUUID' => 'SOME_STRING_VALUE',
              'personalize' => 'SOME_BOOLEAN_VALUE',
              'correlationId' => 'SOME_STRING_VALUE',
              'searchId' => 'SOME_STRING_VALUE',
              'sortByMetric' => 'SOME_STRING_VALUE',
              'sortByGeoPoint' => '34.052235,-118.243685',
              'filterGeoPoints' => [
                '34.052235,-118.243685',
                '15.0,65.0'
              ],
              'filterAroundRadius' => '5000',
              'filters' => 'SOME_STRING_VALUE',
              'facets' => 'SOME_ARRAY_VALUE',
              'facetsSize' => 'SOME_INTEGER_VALUE',
              'maxValuesPerFacet' => 'SOME_INTEGER_VALUE',
              'caseSensitiveFacetValues' => 'SOME_BOOLEAN_VALUE',
              'displayAttributes' => [
                'title',
                'price'
              ],
              'context' => [
                'mobile',
                'listing'
              ],
              'includeFacets' => 'SOME_STRING_VALUE',
              'facetsOrderBy' => 'SOME_STRING_VALUE',
              'page' => '4',
              'limit' => '10',
              'sortBy' => 'SOME_STRING_VALUE',
              'ordering' => 'SOME_STRING_VALUE',
              'includeMeta' => 'SOME_BOOLEAN_VALUE',
              'distinctFilter' => '{"attribute": "color", "maxNumItems": 3}',
              'ignoreQueryRules' => 'SOME_BOOLEAN_VALUE',
              'excludeQueryRules' => [
                '2',
                '5'
              ],
              'disableQueryClassification' => 'SOME_BOOLEAN_VALUE',
              'disableDynamicReranker' => 'SOME_BOOLEAN_VALUE',
              'params' => 'source:mobile'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/query?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&params=source%3Amobile")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Full-text items search
      description: |
        Retrieves items that match a full-text query from a search index or a suggestion index. The results can be filtered and sorted.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: SearchFullTextPost
      tags:
        - Search
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-inPathIndexId"
      requestBody:
        description: Request for performing full-text search
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/items-search-FullTextSearchRequest"
      responses:
        "200":
          $ref: "#/components/responses/items-search-FullTextSearchResponse200"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search/operation/SearchFullTextPost
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/query \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"query":"string","page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","personalize":true,"correlationId":"string","searchId":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"distinctFilter":{"attribute":"string","maxNumItems":1,"levelRangeModifier":0},"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"},"disableQueryClassification":false,"disableDynamicReranker":false}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"query\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"disableQueryClassification\":false,\"disableDynamicReranker\":false}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/query", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "query": "string",
              "page": 0,
              "limit": 10,
              "sortBy": "string",
              "ordering": "desc",
              "includeMeta": true,
              "clientUUID": "string",
              "personalize": true,
              "correlationId": "string",
              "searchId": "string",
              "sortByMetric": "TransactionsPopularity",
              "sortByGeoPoints": "34.052235,-118.243685",
              "filterGeoPoints": [
                "34.052235,-118.243685",
                "15.0,65.0"
              ],
              "filterAroundRadius": 2000,
              "filters": "string",
              "facets": [
                "string"
              ],
              "customFilteredFacets": {
                "brand": "price > 100",
                "price": "brand == foo"
              },
              "facetsSize": 2000,
              "maxValuesPerFacet": 50,
              "caseSensitiveFacetValues": false,
              "includeFacets": "all",
              "facetsOrderBy": "coverage",
              "context": [
                "mobile",
                "listing"
              ],
              "displayAttributes": [
                "title",
                "price"
              ],
              "distinctFilter": {
                "attribute": "string",
                "maxNumItems": 1,
                "levelRangeModifier": 0
              },
              "ignoreQueryRules": false,
              "excludeQueryRules": [
                2,
                5
              ],
              "params": {
                "source": "mobile"
              },
              "disableQueryClassification": false,
              "disableDynamicReranker": false
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/query");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/query",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              query: 'string',
              page: 0,
              limit: 10,
              sortBy: 'string',
              ordering: 'desc',
              includeMeta: true,
              clientUUID: 'string',
              personalize: true,
              correlationId: 'string',
              searchId: 'string',
              sortByMetric: 'TransactionsPopularity',
              sortByGeoPoints: '34.052235,-118.243685',
              filterGeoPoints: ['34.052235,-118.243685', '15.0,65.0'],
              filterAroundRadius: 2000,
              filters: 'string',
              facets: ['string'],
              customFilteredFacets: {brand: 'price > 100', price: 'brand == foo'},
              facetsSize: 2000,
              maxValuesPerFacet: 50,
              caseSensitiveFacetValues: false,
              includeFacets: 'all',
              facetsOrderBy: 'coverage',
              context: ['mobile', 'listing'],
              displayAttributes: ['title', 'price'],
              distinctFilter: {attribute: 'string', maxNumItems: 1, levelRangeModifier: 0},
              ignoreQueryRules: false,
              excludeQueryRules: [2, 5],
              params: {source: 'mobile'},
              disableQueryClassification: false,
              disableDynamicReranker: false
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/query');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"query":"string","page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","personalize":true,"correlationId":"string","searchId":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"distinctFilter":{"attribute":"string","maxNumItems":1,"levelRangeModifier":0},"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"},"disableQueryClassification":false,"disableDynamicReranker":false}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/query")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"query\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"disableQueryClassification\":false,\"disableDynamicReranker\":false}")
              .asString();
  /search/v2/indices/{indexId}/query/explain:
    get:
      summary: Explained full-text items search
      description: |
        Retrieves items that match a full-text query from a search index or a suggestion index. The results can be filtered and sorted.  The response contains an explanation of the factors that influenced the result.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: SearchFullTextGetWithExplanation
      tags:
        - Search
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-searchQuery"
        - $ref: "#/components/parameters/items-search-inPathIndexId"
        - $ref: "#/components/parameters/items-search-clientUUID"
        - $ref: "#/components/parameters/items-search-personalize"
        - $ref: "#/components/parameters/items-search-correlationId"
        - $ref: "#/components/parameters/items-search-searchId"
        - $ref: "#/components/parameters/items-search-sortByMetric"
        - $ref: "#/components/parameters/items-search-sortByGeoPoint"
        - $ref: "#/components/parameters/items-search-filterGeoPoints"
        - $ref: "#/components/parameters/items-search-filterAroundRadius"
        - $ref: "#/components/parameters/items-search-filters"
        - $ref: "#/components/parameters/items-search-facets"
        - $ref: "#/components/parameters/items-search-facetsSize"
        - $ref: "#/components/parameters/items-search-maxValuesPerFacet"
        - $ref: "#/components/parameters/items-search-caseSensitiveFacetValues"
        - $ref: "#/components/parameters/items-search-displayAttributes"
        - $ref: "#/components/parameters/items-search-context"
        - $ref: "#/components/parameters/items-search-includeFacets"
        - $ref: "#/components/parameters/items-search-facetsOrderBy"
        - $ref: "#/components/parameters/items-search-paginationPage"
        - $ref: "#/components/parameters/items-search-paginationLimit"
        - $ref: "#/components/parameters/items-search-paginationSortBy"
        - $ref: "#/components/parameters/items-search-paginationOrdering"
        - $ref: "#/components/parameters/items-search-paginationIncludeMeta"
        - $ref: "#/components/parameters/items-search-distinctFilter"
        - $ref: "#/components/parameters/items-search-ignoreQueryRules"
        - $ref: "#/components/parameters/items-search-disableQueryClassification"
        - $ref: "#/components/parameters/items-search-disableDynamicReranker"
        - $ref: "#/components/parameters/items-search-excludeQueryRules"
        - $ref: "#/components/parameters/items-search-crossWorkspaceModeEnabled"
        - $ref: "#/components/parameters/items-search-params"
      responses:
        "200":
          $ref: "#/components/responses/items-search-FullTextSearchResponse200WithExplanation"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search/operation/SearchFullTextGetWithExplanation
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/query/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/query/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/query/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/query/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/query/explain');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'query' => 'SOME_STRING_VALUE',
              'clientUUID' => 'SOME_STRING_VALUE',
              'personalize' => 'SOME_BOOLEAN_VALUE',
              'correlationId' => 'SOME_STRING_VALUE',
              'searchId' => 'SOME_STRING_VALUE',
              'sortByMetric' => 'SOME_STRING_VALUE',
              'sortByGeoPoint' => '34.052235,-118.243685',
              'filterGeoPoints' => [
                '34.052235,-118.243685',
                '15.0,65.0'
              ],
              'filterAroundRadius' => '5000',
              'filters' => 'SOME_STRING_VALUE',
              'facets' => 'SOME_ARRAY_VALUE',
              'facetsSize' => 'SOME_INTEGER_VALUE',
              'maxValuesPerFacet' => 'SOME_INTEGER_VALUE',
              'caseSensitiveFacetValues' => 'SOME_BOOLEAN_VALUE',
              'displayAttributes' => [
                'title',
                'price'
              ],
              'context' => [
                'mobile',
                'listing'
              ],
              'includeFacets' => 'SOME_STRING_VALUE',
              'facetsOrderBy' => 'SOME_STRING_VALUE',
              'page' => '4',
              'limit' => '10',
              'sortBy' => 'SOME_STRING_VALUE',
              'ordering' => 'SOME_STRING_VALUE',
              'includeMeta' => 'SOME_BOOLEAN_VALUE',
              'distinctFilter' => '{"attribute": "color", "maxNumItems": 3}',
              'ignoreQueryRules' => 'SOME_BOOLEAN_VALUE',
              'disableQueryClassification' => 'SOME_BOOLEAN_VALUE',
              'disableDynamicReranker' => 'SOME_BOOLEAN_VALUE',
              'excludeQueryRules' => [
                '2',
                '5'
              ],
              'crossWorkspaceModeEnabled' => 'SOME_BOOLEAN_VALUE',
              'params' => 'source:mobile'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/query/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Explained full-text items search
      description: |
        Retrieves items that match a full-text query from a search index or a suggestion index. The results can be filtered and sorted. The response contains an explanation of the factors that influenced the result.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: SearchFullTextPostWithExplanation
      tags:
        - Search
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-inPathIndexId"
      requestBody:
        description: Request for performing full-text search with explanation
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/items-search-FullTextSearchRequest"
                - type: object
                  properties:
                    crossWorkspaceMode:
                      $ref: "#/components/schemas/items-search-CrossWorkspaceMode"
      responses:
        "200":
          $ref: "#/components/responses/items-search-FullTextSearchResponse200WithExplanation"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search/operation/SearchFullTextPostWithExplanation
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/query/explain \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"query":"string","page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","personalize":true,"correlationId":"string","searchId":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"distinctFilter":{"attribute":"string","maxNumItems":1,"levelRangeModifier":0},"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"},"disableQueryClassification":false,"disableDynamicReranker":false,"crossWorkspaceMode":{"enabled":true}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"query\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"disableQueryClassification\":false,\"disableDynamicReranker\":false,\"crossWorkspaceMode\":{\"enabled\":true}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/query/explain", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "query": "string",
              "page": 0,
              "limit": 10,
              "sortBy": "string",
              "ordering": "desc",
              "includeMeta": true,
              "clientUUID": "string",
              "personalize": true,
              "correlationId": "string",
              "searchId": "string",
              "sortByMetric": "TransactionsPopularity",
              "sortByGeoPoints": "34.052235,-118.243685",
              "filterGeoPoints": [
                "34.052235,-118.243685",
                "15.0,65.0"
              ],
              "filterAroundRadius": 2000,
              "filters": "string",
              "facets": [
                "string"
              ],
              "customFilteredFacets": {
                "brand": "price > 100",
                "price": "brand == foo"
              },
              "facetsSize": 2000,
              "maxValuesPerFacet": 50,
              "caseSensitiveFacetValues": false,
              "includeFacets": "all",
              "facetsOrderBy": "coverage",
              "context": [
                "mobile",
                "listing"
              ],
              "displayAttributes": [
                "title",
                "price"
              ],
              "distinctFilter": {
                "attribute": "string",
                "maxNumItems": 1,
                "levelRangeModifier": 0
              },
              "ignoreQueryRules": false,
              "excludeQueryRules": [
                2,
                5
              ],
              "params": {
                "source": "mobile"
              },
              "disableQueryClassification": false,
              "disableDynamicReranker": false,
              "crossWorkspaceMode": {
                "enabled": true
              }
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/query/explain");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/query/explain",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              query: 'string',
              page: 0,
              limit: 10,
              sortBy: 'string',
              ordering: 'desc',
              includeMeta: true,
              clientUUID: 'string',
              personalize: true,
              correlationId: 'string',
              searchId: 'string',
              sortByMetric: 'TransactionsPopularity',
              sortByGeoPoints: '34.052235,-118.243685',
              filterGeoPoints: ['34.052235,-118.243685', '15.0,65.0'],
              filterAroundRadius: 2000,
              filters: 'string',
              facets: ['string'],
              customFilteredFacets: {brand: 'price > 100', price: 'brand == foo'},
              facetsSize: 2000,
              maxValuesPerFacet: 50,
              caseSensitiveFacetValues: false,
              includeFacets: 'all',
              facetsOrderBy: 'coverage',
              context: ['mobile', 'listing'],
              displayAttributes: ['title', 'price'],
              distinctFilter: {attribute: 'string', maxNumItems: 1, levelRangeModifier: 0},
              ignoreQueryRules: false,
              excludeQueryRules: [2, 5],
              params: {source: 'mobile'},
              disableQueryClassification: false,
              disableDynamicReranker: false,
              crossWorkspaceMode: {enabled: true}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/query/explain');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"query":"string","page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","personalize":true,"correlationId":"string","searchId":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"distinctFilter":{"attribute":"string","maxNumItems":1,"levelRangeModifier":0},"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"},"disableQueryClassification":false,"disableDynamicReranker":false,"crossWorkspaceMode":{"enabled":true}}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/query/explain")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"query\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"disableQueryClassification\":false,\"disableDynamicReranker\":false,\"crossWorkspaceMode\":{\"enabled\":true}}")
              .asString();
  /search/v2/indices/{indexId}/autocomplete:
    get:
      summary: Autocomplete items search
      description: |
        Retrieves items that match a query from a search index or a suggestion index. The results can be filtered and sorted. The results of this search type are not cached.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: SearchAutocompleteGet
      tags:
        - Search
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-searchQuery"
        - $ref: "#/components/parameters/items-search-inPathIndexId"
        - $ref: "#/components/parameters/items-search-clientUUID"
        - $ref: "#/components/parameters/items-search-personalize"
        - $ref: "#/components/parameters/items-search-sortByMetric"
        - $ref: "#/components/parameters/items-search-sortByGeoPoint"
        - $ref: "#/components/parameters/items-search-filterGeoPoints"
        - $ref: "#/components/parameters/items-search-filterAroundRadius"
        - $ref: "#/components/parameters/items-search-filters"
        - $ref: "#/components/parameters/items-search-facets"
        - $ref: "#/components/parameters/items-search-facetsSize"
        - $ref: "#/components/parameters/items-search-maxValuesPerFacet"
        - $ref: "#/components/parameters/items-search-caseSensitiveFacetValues"
        - $ref: "#/components/parameters/items-search-displayAttributes"
        - $ref: "#/components/parameters/items-search-context"
        - $ref: "#/components/parameters/items-search-includeFacets"
        - $ref: "#/components/parameters/items-search-facetsOrderBy"
        - $ref: "#/components/parameters/items-search-paginationPage"
        - $ref: "#/components/parameters/items-search-paginationLimit"
        - $ref: "#/components/parameters/items-search-paginationSortBy"
        - $ref: "#/components/parameters/items-search-paginationOrdering"
        - $ref: "#/components/parameters/items-search-paginationIncludeMeta"
        - $ref: "#/components/parameters/items-search-distinctFilter"
        - $ref: "#/components/parameters/items-search-ignoreQueryRules"
        - $ref: "#/components/parameters/items-search-excludeQueryRules"
        - $ref: "#/components/parameters/items-search-params"
        - $ref: "#/components/parameters/items-search-disableQueryClassification"
        - $ref: "#/components/parameters/items-search-disableDynamicReranker"
      responses:
        "200":
          $ref: "#/components/responses/items-search-AutocompleteSearchResponse200"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search/operation/SearchAutocompleteGet
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/autocomplete?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/autocomplete?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'query' => 'SOME_STRING_VALUE',
              'clientUUID' => 'SOME_STRING_VALUE',
              'personalize' => 'SOME_BOOLEAN_VALUE',
              'sortByMetric' => 'SOME_STRING_VALUE',
              'sortByGeoPoint' => '34.052235,-118.243685',
              'filterGeoPoints' => [
                '34.052235,-118.243685',
                '15.0,65.0'
              ],
              'filterAroundRadius' => '5000',
              'filters' => 'SOME_STRING_VALUE',
              'facets' => 'SOME_ARRAY_VALUE',
              'facetsSize' => 'SOME_INTEGER_VALUE',
              'maxValuesPerFacet' => 'SOME_INTEGER_VALUE',
              'caseSensitiveFacetValues' => 'SOME_BOOLEAN_VALUE',
              'displayAttributes' => [
                'title',
                'price'
              ],
              'context' => [
                'mobile',
                'listing'
              ],
              'includeFacets' => 'SOME_STRING_VALUE',
              'facetsOrderBy' => 'SOME_STRING_VALUE',
              'page' => '4',
              'limit' => '10',
              'sortBy' => 'SOME_STRING_VALUE',
              'ordering' => 'SOME_STRING_VALUE',
              'includeMeta' => 'SOME_BOOLEAN_VALUE',
              'distinctFilter' => '{"attribute": "color", "maxNumItems": 3}',
              'ignoreQueryRules' => 'SOME_BOOLEAN_VALUE',
              'excludeQueryRules' => [
                '2',
                '5'
              ],
              'params' => 'source:mobile',
              'disableQueryClassification' => 'SOME_BOOLEAN_VALUE',
              'disableDynamicReranker' => 'SOME_BOOLEAN_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Autocomplete items search
      description: |
        Retrieves items that match a query from a search index or a suggestion index. The results can be filtered and sorted. The results of this search type are not cached.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: SearchAutocompletePost
      tags:
        - Search
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-inPathIndexId"
      requestBody:
        description: Request for performing an autocomplete search
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/items-search-AutocompleteRequest"
      responses:
        "200":
          $ref: "#/components/responses/items-search-AutocompleteSearchResponse200"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search/operation/SearchAutocompletePost
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"query":"string","page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"distinctFilter":{"attribute":"string","maxNumItems":1,"levelRangeModifier":0},"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"},"disableQueryClassification":false,"disableDynamicReranker":false}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"query\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"disableQueryClassification\":false,\"disableDynamicReranker\":false}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/autocomplete", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "query": "string",
              "page": 0,
              "limit": 10,
              "sortBy": "string",
              "ordering": "desc",
              "includeMeta": true,
              "clientUUID": "string",
              "sortByMetric": "TransactionsPopularity",
              "sortByGeoPoints": "34.052235,-118.243685",
              "filterGeoPoints": [
                "34.052235,-118.243685",
                "15.0,65.0"
              ],
              "filterAroundRadius": 2000,
              "filters": "string",
              "facets": [
                "string"
              ],
              "customFilteredFacets": {
                "brand": "price > 100",
                "price": "brand == foo"
              },
              "facetsSize": 2000,
              "maxValuesPerFacet": 50,
              "caseSensitiveFacetValues": false,
              "includeFacets": "all",
              "facetsOrderBy": "coverage",
              "context": [
                "mobile",
                "listing"
              ],
              "displayAttributes": [
                "title",
                "price"
              ],
              "distinctFilter": {
                "attribute": "string",
                "maxNumItems": 1,
                "levelRangeModifier": 0
              },
              "ignoreQueryRules": false,
              "excludeQueryRules": [
                2,
                5
              ],
              "params": {
                "source": "mobile"
              },
              "disableQueryClassification": false,
              "disableDynamicReranker": false
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/autocomplete",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              query: 'string',
              page: 0,
              limit: 10,
              sortBy: 'string',
              ordering: 'desc',
              includeMeta: true,
              clientUUID: 'string',
              sortByMetric: 'TransactionsPopularity',
              sortByGeoPoints: '34.052235,-118.243685',
              filterGeoPoints: ['34.052235,-118.243685', '15.0,65.0'],
              filterAroundRadius: 2000,
              filters: 'string',
              facets: ['string'],
              customFilteredFacets: {brand: 'price > 100', price: 'brand == foo'},
              facetsSize: 2000,
              maxValuesPerFacet: 50,
              caseSensitiveFacetValues: false,
              includeFacets: 'all',
              facetsOrderBy: 'coverage',
              context: ['mobile', 'listing'],
              displayAttributes: ['title', 'price'],
              distinctFilter: {attribute: 'string', maxNumItems: 1, levelRangeModifier: 0},
              ignoreQueryRules: false,
              excludeQueryRules: [2, 5],
              params: {source: 'mobile'},
              disableQueryClassification: false,
              disableDynamicReranker: false
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"query":"string","page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"distinctFilter":{"attribute":"string","maxNumItems":1,"levelRangeModifier":0},"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"},"disableQueryClassification":false,"disableDynamicReranker":false}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"query\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"disableQueryClassification\":false,\"disableDynamicReranker\":false}")
              .asString();
  /search/v2/indices/{indexId}/autocomplete/explain:
    get:
      summary: Explained autocomplete items search
      description: |
        Retrieves items that match a query from a search index or a suggestion index. The results can be filtered and sorted. The results of this search type are not cached. The response contains an explanation of the factors that influenced the result.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: SearchAutocompleteGetWithExplanation
      tags:
        - Search
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-searchQuery"
        - $ref: "#/components/parameters/items-search-inPathIndexId"
        - $ref: "#/components/parameters/items-search-clientUUID"
        - $ref: "#/components/parameters/items-search-personalize"
        - $ref: "#/components/parameters/items-search-sortByMetric"
        - $ref: "#/components/parameters/items-search-sortByGeoPoint"
        - $ref: "#/components/parameters/items-search-filterGeoPoints"
        - $ref: "#/components/parameters/items-search-filterAroundRadius"
        - $ref: "#/components/parameters/items-search-filters"
        - $ref: "#/components/parameters/items-search-facets"
        - $ref: "#/components/parameters/items-search-facetsSize"
        - $ref: "#/components/parameters/items-search-maxValuesPerFacet"
        - $ref: "#/components/parameters/items-search-caseSensitiveFacetValues"
        - $ref: "#/components/parameters/items-search-displayAttributes"
        - $ref: "#/components/parameters/items-search-context"
        - $ref: "#/components/parameters/items-search-includeFacets"
        - $ref: "#/components/parameters/items-search-facetsOrderBy"
        - $ref: "#/components/parameters/items-search-paginationPage"
        - $ref: "#/components/parameters/items-search-paginationLimit"
        - $ref: "#/components/parameters/items-search-paginationSortBy"
        - $ref: "#/components/parameters/items-search-paginationOrdering"
        - $ref: "#/components/parameters/items-search-paginationIncludeMeta"
        - $ref: "#/components/parameters/items-search-distinctFilter"
        - $ref: "#/components/parameters/items-search-ignoreQueryRules"
        - $ref: "#/components/parameters/items-search-excludeQueryRules"
        - $ref: "#/components/parameters/items-search-crossWorkspaceModeEnabled"
        - $ref: "#/components/parameters/items-search-params"
        - $ref: "#/components/parameters/items-search-disableQueryClassification"
        - $ref: "#/components/parameters/items-search-disableDynamicReranker"
      responses:
        "200":
          $ref: "#/components/responses/items-search-AutocompleteSearchResponse200WithExplanation"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search/operation/SearchAutocompleteGetWithExplanation
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/autocomplete/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/autocomplete/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete/explain');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'query' => 'SOME_STRING_VALUE',
              'clientUUID' => 'SOME_STRING_VALUE',
              'personalize' => 'SOME_BOOLEAN_VALUE',
              'sortByMetric' => 'SOME_STRING_VALUE',
              'sortByGeoPoint' => '34.052235,-118.243685',
              'filterGeoPoints' => [
                '34.052235,-118.243685',
                '15.0,65.0'
              ],
              'filterAroundRadius' => '5000',
              'filters' => 'SOME_STRING_VALUE',
              'facets' => 'SOME_ARRAY_VALUE',
              'facetsSize' => 'SOME_INTEGER_VALUE',
              'maxValuesPerFacet' => 'SOME_INTEGER_VALUE',
              'caseSensitiveFacetValues' => 'SOME_BOOLEAN_VALUE',
              'displayAttributes' => [
                'title',
                'price'
              ],
              'context' => [
                'mobile',
                'listing'
              ],
              'includeFacets' => 'SOME_STRING_VALUE',
              'facetsOrderBy' => 'SOME_STRING_VALUE',
              'page' => '4',
              'limit' => '10',
              'sortBy' => 'SOME_STRING_VALUE',
              'ordering' => 'SOME_STRING_VALUE',
              'includeMeta' => 'SOME_BOOLEAN_VALUE',
              'distinctFilter' => '{"attribute": "color", "maxNumItems": 3}',
              'ignoreQueryRules' => 'SOME_BOOLEAN_VALUE',
              'excludeQueryRules' => [
                '2',
                '5'
              ],
              'crossWorkspaceModeEnabled' => 'SOME_BOOLEAN_VALUE',
              'params' => 'source:mobile',
              'disableQueryClassification' => 'SOME_BOOLEAN_VALUE',
              'disableDynamicReranker' => 'SOME_BOOLEAN_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Explained autocomplete items search
      description: |
        Retrieves items that match a query from a search index or a suggestion index. The results can be filtered and sorted. The results of this search type are not cached. The response contains an explanation of the factors that influenced the result.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: SearchAutocompletePostWithExplanation
      tags:
        - Search
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-inPathIndexId"
      requestBody:
        description: Request for performing an autocomplete search with explanation
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/items-search-AutocompleteRequest"
                - type: object
                  properties:
                    crossWorkspaceMode:
                      $ref: "#/components/schemas/items-search-CrossWorkspaceMode"
      responses:
        "200":
          $ref: "#/components/responses/items-search-AutocompleteSearchResponse200WithExplanation"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search/operation/SearchAutocompletePostWithExplanation
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete/explain \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"query":"string","page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"distinctFilter":{"attribute":"string","maxNumItems":1,"levelRangeModifier":0},"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"},"disableQueryClassification":false,"disableDynamicReranker":false,"crossWorkspaceMode":{"enabled":true}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"query\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"disableQueryClassification\":false,\"disableDynamicReranker\":false,\"crossWorkspaceMode\":{\"enabled\":true}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/autocomplete/explain", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "query": "string",
              "page": 0,
              "limit": 10,
              "sortBy": "string",
              "ordering": "desc",
              "includeMeta": true,
              "clientUUID": "string",
              "sortByMetric": "TransactionsPopularity",
              "sortByGeoPoints": "34.052235,-118.243685",
              "filterGeoPoints": [
                "34.052235,-118.243685",
                "15.0,65.0"
              ],
              "filterAroundRadius": 2000,
              "filters": "string",
              "facets": [
                "string"
              ],
              "customFilteredFacets": {
                "brand": "price > 100",
                "price": "brand == foo"
              },
              "facetsSize": 2000,
              "maxValuesPerFacet": 50,
              "caseSensitiveFacetValues": false,
              "includeFacets": "all",
              "facetsOrderBy": "coverage",
              "context": [
                "mobile",
                "listing"
              ],
              "displayAttributes": [
                "title",
                "price"
              ],
              "distinctFilter": {
                "attribute": "string",
                "maxNumItems": 1,
                "levelRangeModifier": 0
              },
              "ignoreQueryRules": false,
              "excludeQueryRules": [
                2,
                5
              ],
              "params": {
                "source": "mobile"
              },
              "disableQueryClassification": false,
              "disableDynamicReranker": false,
              "crossWorkspaceMode": {
                "enabled": true
              }
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete/explain");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/autocomplete/explain",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              query: 'string',
              page: 0,
              limit: 10,
              sortBy: 'string',
              ordering: 'desc',
              includeMeta: true,
              clientUUID: 'string',
              sortByMetric: 'TransactionsPopularity',
              sortByGeoPoints: '34.052235,-118.243685',
              filterGeoPoints: ['34.052235,-118.243685', '15.0,65.0'],
              filterAroundRadius: 2000,
              filters: 'string',
              facets: ['string'],
              customFilteredFacets: {brand: 'price > 100', price: 'brand == foo'},
              facetsSize: 2000,
              maxValuesPerFacet: 50,
              caseSensitiveFacetValues: false,
              includeFacets: 'all',
              facetsOrderBy: 'coverage',
              context: ['mobile', 'listing'],
              displayAttributes: ['title', 'price'],
              distinctFilter: {attribute: 'string', maxNumItems: 1, levelRangeModifier: 0},
              ignoreQueryRules: false,
              excludeQueryRules: [2, 5],
              params: {source: 'mobile'},
              disableQueryClassification: false,
              disableDynamicReranker: false,
              crossWorkspaceMode: {enabled: true}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete/explain');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"query":"string","page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"distinctFilter":{"attribute":"string","maxNumItems":1,"levelRangeModifier":0},"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"},"disableQueryClassification":false,"disableDynamicReranker":false,"crossWorkspaceMode":{"enabled":true}}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete/explain")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"query\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"disableQueryClassification\":false,\"disableDynamicReranker\":false,\"crossWorkspaceMode\":{\"enabled\":true}}")
              .asString();
  /search/v2/indices/{indexId}/list:
    get:
      summary: Items listing
      description: |
        Retrieves item listing, which is a search without a query. The results can be filtered and sorted.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: ListingGet
      tags:
        - Listing
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-inPathIndexId"
        - $ref: "#/components/parameters/items-search-clientUUID"
        - $ref: "#/components/parameters/items-search-personalize"
        - $ref: "#/components/parameters/items-search-correlationId"
        - $ref: "#/components/parameters/items-search-searchId"
        - $ref: "#/components/parameters/items-search-sortByMetric"
        - $ref: "#/components/parameters/items-search-sortByGeoPoint"
        - $ref: "#/components/parameters/items-search-filterGeoPoints"
        - $ref: "#/components/parameters/items-search-filterAroundRadius"
        - $ref: "#/components/parameters/items-search-filters"
        - $ref: "#/components/parameters/items-search-facets"
        - $ref: "#/components/parameters/items-search-facetsSize"
        - $ref: "#/components/parameters/items-search-maxValuesPerFacet"
        - $ref: "#/components/parameters/items-search-caseSensitiveFacetValues"
        - $ref: "#/components/parameters/items-search-displayAttributes"
        - $ref: "#/components/parameters/items-search-context"
        - $ref: "#/components/parameters/items-search-includeFacets"
        - $ref: "#/components/parameters/items-search-facetsOrderBy"
        - $ref: "#/components/parameters/items-search-paginationPage"
        - $ref: "#/components/parameters/items-search-paginationLimit"
        - $ref: "#/components/parameters/items-search-paginationSortBy"
        - $ref: "#/components/parameters/items-search-paginationOrdering"
        - $ref: "#/components/parameters/items-search-paginationIncludeMeta"
        - $ref: "#/components/parameters/items-search-distinctFilter"
        - $ref: "#/components/parameters/items-search-ignoreQueryRules"
        - $ref: "#/components/parameters/items-search-excludeQueryRules"
        - $ref: "#/components/parameters/items-search-params"
      responses:
        "200":
          $ref: "#/components/responses/items-search-ListingResponse200"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Listing/operation/ListingGet
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/list?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/list?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/list?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/list?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/list');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'clientUUID' => 'SOME_STRING_VALUE',
              'personalize' => 'SOME_BOOLEAN_VALUE',
              'correlationId' => 'SOME_STRING_VALUE',
              'searchId' => 'SOME_STRING_VALUE',
              'sortByMetric' => 'SOME_STRING_VALUE',
              'sortByGeoPoint' => '34.052235,-118.243685',
              'filterGeoPoints' => [
                '34.052235,-118.243685',
                '15.0,65.0'
              ],
              'filterAroundRadius' => '5000',
              'filters' => 'SOME_STRING_VALUE',
              'facets' => 'SOME_ARRAY_VALUE',
              'facetsSize' => 'SOME_INTEGER_VALUE',
              'maxValuesPerFacet' => 'SOME_INTEGER_VALUE',
              'caseSensitiveFacetValues' => 'SOME_BOOLEAN_VALUE',
              'displayAttributes' => [
                'title',
                'price'
              ],
              'context' => [
                'mobile',
                'listing'
              ],
              'includeFacets' => 'SOME_STRING_VALUE',
              'facetsOrderBy' => 'SOME_STRING_VALUE',
              'page' => '4',
              'limit' => '10',
              'sortBy' => 'SOME_STRING_VALUE',
              'ordering' => 'SOME_STRING_VALUE',
              'includeMeta' => 'SOME_BOOLEAN_VALUE',
              'distinctFilter' => '{"attribute": "color", "maxNumItems": 3}',
              'ignoreQueryRules' => 'SOME_BOOLEAN_VALUE',
              'excludeQueryRules' => [
                '2',
                '5'
              ],
              'params' => 'source:mobile'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/list?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Items listing
      description: |
        Retrieves item listing, which is a search without a query. The results can be filtered and sorted.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: ListingPost
      tags:
        - Listing
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-inPathIndexId"
      requestBody:
        description: Request for item listing
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/items-search-ListingRequest"
      responses:
        "200":
          $ref: "#/components/responses/items-search-ListingResponse200"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Listing/operation/ListingPost
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/list \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","personalize":true,"correlationId":"string","searchId":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"distinctFilter":{"attribute":"string","maxNumItems":1,"levelRangeModifier":0},"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/list", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "page": 0,
              "limit": 10,
              "sortBy": "string",
              "ordering": "desc",
              "includeMeta": true,
              "clientUUID": "string",
              "personalize": true,
              "correlationId": "string",
              "searchId": "string",
              "sortByMetric": "TransactionsPopularity",
              "sortByGeoPoints": "34.052235,-118.243685",
              "filterGeoPoints": [
                "34.052235,-118.243685",
                "15.0,65.0"
              ],
              "filterAroundRadius": 2000,
              "filters": "string",
              "facets": [
                "string"
              ],
              "customFilteredFacets": {
                "brand": "price > 100",
                "price": "brand == foo"
              },
              "facetsSize": 2000,
              "maxValuesPerFacet": 50,
              "caseSensitiveFacetValues": false,
              "includeFacets": "all",
              "facetsOrderBy": "coverage",
              "context": [
                "mobile",
                "listing"
              ],
              "displayAttributes": [
                "title",
                "price"
              ],
              "distinctFilter": {
                "attribute": "string",
                "maxNumItems": 1,
                "levelRangeModifier": 0
              },
              "ignoreQueryRules": false,
              "excludeQueryRules": [
                2,
                5
              ],
              "params": {
                "source": "mobile"
              }
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/list");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/list",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              page: 0,
              limit: 10,
              sortBy: 'string',
              ordering: 'desc',
              includeMeta: true,
              clientUUID: 'string',
              personalize: true,
              correlationId: 'string',
              searchId: 'string',
              sortByMetric: 'TransactionsPopularity',
              sortByGeoPoints: '34.052235,-118.243685',
              filterGeoPoints: ['34.052235,-118.243685', '15.0,65.0'],
              filterAroundRadius: 2000,
              filters: 'string',
              facets: ['string'],
              customFilteredFacets: {brand: 'price > 100', price: 'brand == foo'},
              facetsSize: 2000,
              maxValuesPerFacet: 50,
              caseSensitiveFacetValues: false,
              includeFacets: 'all',
              facetsOrderBy: 'coverage',
              context: ['mobile', 'listing'],
              displayAttributes: ['title', 'price'],
              distinctFilter: {attribute: 'string', maxNumItems: 1, levelRangeModifier: 0},
              ignoreQueryRules: false,
              excludeQueryRules: [2, 5],
              params: {source: 'mobile'}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/list');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","personalize":true,"correlationId":"string","searchId":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"distinctFilter":{"attribute":"string","maxNumItems":1,"levelRangeModifier":0},"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"}}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/list")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"}}")
              .asString();
  /search/v2/indices/{indexId}/list/explain:
    get:
      summary: Explained items listing
      description: |
        Retrieves item listing, which is a search without a query. The results can be filtered and sorted. The response contains an explanation of the factors that influenced the result.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: ListingGetWithExplanation
      tags:
        - Listing
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-inPathIndexId"
        - $ref: "#/components/parameters/items-search-clientUUID"
        - $ref: "#/components/parameters/items-search-personalize"
        - $ref: "#/components/parameters/items-search-correlationId"
        - $ref: "#/components/parameters/items-search-searchId"
        - $ref: "#/components/parameters/items-search-sortByMetric"
        - $ref: "#/components/parameters/items-search-sortByGeoPoint"
        - $ref: "#/components/parameters/items-search-filterGeoPoints"
        - $ref: "#/components/parameters/items-search-filterAroundRadius"
        - $ref: "#/components/parameters/items-search-filters"
        - $ref: "#/components/parameters/items-search-facets"
        - $ref: "#/components/parameters/items-search-facetsSize"
        - $ref: "#/components/parameters/items-search-maxValuesPerFacet"
        - $ref: "#/components/parameters/items-search-caseSensitiveFacetValues"
        - $ref: "#/components/parameters/items-search-displayAttributes"
        - $ref: "#/components/parameters/items-search-context"
        - $ref: "#/components/parameters/items-search-includeFacets"
        - $ref: "#/components/parameters/items-search-facetsOrderBy"
        - $ref: "#/components/parameters/items-search-paginationPage"
        - $ref: "#/components/parameters/items-search-paginationLimit"
        - $ref: "#/components/parameters/items-search-paginationSortBy"
        - $ref: "#/components/parameters/items-search-paginationOrdering"
        - $ref: "#/components/parameters/items-search-paginationIncludeMeta"
        - $ref: "#/components/parameters/items-search-distinctFilter"
        - $ref: "#/components/parameters/items-search-ignoreQueryRules"
        - $ref: "#/components/parameters/items-search-excludeQueryRules"
        - $ref: "#/components/parameters/items-search-crossWorkspaceModeEnabled"
        - $ref: "#/components/parameters/items-search-params"
      responses:
        "200":
          $ref: "#/components/responses/items-search-ListingResponse200WithExplanation"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Listing/operation/ListingGetWithExplanation
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/list/explain?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/list/explain?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/list/explain?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/list/explain?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/list/explain');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'clientUUID' => 'SOME_STRING_VALUE',
              'personalize' => 'SOME_BOOLEAN_VALUE',
              'correlationId' => 'SOME_STRING_VALUE',
              'searchId' => 'SOME_STRING_VALUE',
              'sortByMetric' => 'SOME_STRING_VALUE',
              'sortByGeoPoint' => '34.052235,-118.243685',
              'filterGeoPoints' => [
                '34.052235,-118.243685',
                '15.0,65.0'
              ],
              'filterAroundRadius' => '5000',
              'filters' => 'SOME_STRING_VALUE',
              'facets' => 'SOME_ARRAY_VALUE',
              'facetsSize' => 'SOME_INTEGER_VALUE',
              'maxValuesPerFacet' => 'SOME_INTEGER_VALUE',
              'caseSensitiveFacetValues' => 'SOME_BOOLEAN_VALUE',
              'displayAttributes' => [
                'title',
                'price'
              ],
              'context' => [
                'mobile',
                'listing'
              ],
              'includeFacets' => 'SOME_STRING_VALUE',
              'facetsOrderBy' => 'SOME_STRING_VALUE',
              'page' => '4',
              'limit' => '10',
              'sortBy' => 'SOME_STRING_VALUE',
              'ordering' => 'SOME_STRING_VALUE',
              'includeMeta' => 'SOME_BOOLEAN_VALUE',
              'distinctFilter' => '{"attribute": "color", "maxNumItems": 3}',
              'ignoreQueryRules' => 'SOME_BOOLEAN_VALUE',
              'excludeQueryRules' => [
                '2',
                '5'
              ],
              'crossWorkspaceModeEnabled' => 'SOME_BOOLEAN_VALUE',
              'params' => 'source:mobile'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/list/explain?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Explained items listing
      description: |
        Retrieves item listing, which is a search without a query. The results can be filtered and sorted. The response contains an explanation of the factors that influenced the result.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: ListingPostWithExplanation
      tags:
        - Listing
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-inPathIndexId"
      requestBody:
        description: Request for item listing with explanation
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/items-search-ListingRequest"
                - type: object
                  properties:
                    crossWorkspaceMode:
                      $ref: "#/components/schemas/items-search-CrossWorkspaceMode"
      responses:
        "200":
          $ref: "#/components/responses/items-search-ListingResponse200WithExplanation"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Listing/operation/ListingPostWithExplanation
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/list/explain \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","personalize":true,"correlationId":"string","searchId":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"distinctFilter":{"attribute":"string","maxNumItems":1,"levelRangeModifier":0},"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"},"crossWorkspaceMode":{"enabled":true}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"crossWorkspaceMode\":{\"enabled\":true}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/list/explain", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "page": 0,
              "limit": 10,
              "sortBy": "string",
              "ordering": "desc",
              "includeMeta": true,
              "clientUUID": "string",
              "personalize": true,
              "correlationId": "string",
              "searchId": "string",
              "sortByMetric": "TransactionsPopularity",
              "sortByGeoPoints": "34.052235,-118.243685",
              "filterGeoPoints": [
                "34.052235,-118.243685",
                "15.0,65.0"
              ],
              "filterAroundRadius": 2000,
              "filters": "string",
              "facets": [
                "string"
              ],
              "customFilteredFacets": {
                "brand": "price > 100",
                "price": "brand == foo"
              },
              "facetsSize": 2000,
              "maxValuesPerFacet": 50,
              "caseSensitiveFacetValues": false,
              "includeFacets": "all",
              "facetsOrderBy": "coverage",
              "context": [
                "mobile",
                "listing"
              ],
              "displayAttributes": [
                "title",
                "price"
              ],
              "distinctFilter": {
                "attribute": "string",
                "maxNumItems": 1,
                "levelRangeModifier": 0
              },
              "ignoreQueryRules": false,
              "excludeQueryRules": [
                2,
                5
              ],
              "params": {
                "source": "mobile"
              },
              "crossWorkspaceMode": {
                "enabled": true
              }
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/list/explain");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/list/explain",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              page: 0,
              limit: 10,
              sortBy: 'string',
              ordering: 'desc',
              includeMeta: true,
              clientUUID: 'string',
              personalize: true,
              correlationId: 'string',
              searchId: 'string',
              sortByMetric: 'TransactionsPopularity',
              sortByGeoPoints: '34.052235,-118.243685',
              filterGeoPoints: ['34.052235,-118.243685', '15.0,65.0'],
              filterAroundRadius: 2000,
              filters: 'string',
              facets: ['string'],
              customFilteredFacets: {brand: 'price > 100', price: 'brand == foo'},
              facetsSize: 2000,
              maxValuesPerFacet: 50,
              caseSensitiveFacetValues: false,
              includeFacets: 'all',
              facetsOrderBy: 'coverage',
              context: ['mobile', 'listing'],
              displayAttributes: ['title', 'price'],
              distinctFilter: {attribute: 'string', maxNumItems: 1, levelRangeModifier: 0},
              ignoreQueryRules: false,
              excludeQueryRules: [2, 5],
              params: {source: 'mobile'},
              crossWorkspaceMode: {enabled: true}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/list/explain');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","personalize":true,"correlationId":"string","searchId":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"distinctFilter":{"attribute":"string","maxNumItems":1,"levelRangeModifier":0},"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"},"crossWorkspaceMode":{"enabled":true}}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/list/explain")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"crossWorkspaceMode\":{\"enabled\":true}}")
              .asString();
  /search/v2/indices/{indexId}/attributes/filterable/values:
    get:
      summary: Get values of filterable attributes
      description: |
        Retrieve values of filterable attributes.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`

        **User role permission required:** `assets_search: read`
      operationId: getFilterableAttributesValues
      tags:
        - Search Configuration
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-inPathIndexId"
        - $ref: "#/components/parameters/items-search-filterableAttributes"
      responses:
        "200":
          description: Values returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-FilterableAttributesValues"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search-Configuration/operation/getFilterableAttributesValues
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/attributes/filterable/values?attribute=SOME_ARRAY_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/attributes/filterable/values?attribute=SOME_ARRAY_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/attributes/filterable/values?attribute=SOME_ARRAY_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/attributes/filterable/values?attribute=SOME_ARRAY_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/attributes/filterable/values');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'attribute' => 'SOME_ARRAY_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/attributes/filterable/values?attribute=SOME_ARRAY_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/indices/{indexId}/explain-match:
    get:
      summary: Searchable attributes match
      description: |
        Enter a query and an item ID to check if a token (a word or a synonym which replaced it) matches a value or part of a value from the item's searchable attributes.


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`

        **User role permission required:** `assets_search: read`
      operationId: searchableAttributesMatch
      tags:
        - Search
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-inPathIndexId"
        - $ref: "#/components/parameters/items-search-searchQuery"
        - $ref: "#/components/parameters/items-search-itemId"
      responses:
        "200":
          $ref: "#/components/responses/items-search-SearchableAttributesMatchResponse200"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search/operation/searchableAttributesMatch
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/explain-match?query=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/explain-match?query=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/explain-match?query=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/explain-match?query=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/explain-match');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'query' => 'SOME_STRING_VALUE',
              'itemId' => 'SOME_STRING_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/explain-match?query=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/indices:
    get:
      summary: Get configurations of all indices
      description: |
        Retrieve the configurations of all indices.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_READ`

        **User role permission required:** `assets_search: read`
      operationId: getIndicesConfigsV2
      tags:
        - Search Configuration
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-config-paginationPage"
        - $ref: "#/components/parameters/items-search-config-paginationLimit"
        - $ref: "#/components/parameters/items-search-config-paginationSortBy"
        - $ref: "#/components/parameters/items-search-config-paginationOrdering"
        - $ref: "#/components/parameters/items-search-config-paginationIncludeMeta"
        - $ref: "#/components/parameters/items-search-config-nameFilter"
        - $ref: "#/components/parameters/items-search-config-queryFilter"
        - $ref: "#/components/parameters/items-search-config-excludeAbTests"
        - $ref: "#/components/parameters/items-search-config-inQueryDirectoryId"
        - $ref: "#/components/parameters/items-search-config-inQueryType"
      responses:
        "200":
          description: Configurations returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-PaginatedSearchConfigsSchema"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search-Configuration/operation/getIndicesConfigsV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE&excludeAbTests=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&type=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE&excludeAbTests=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&type=SOME_STRING_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE&excludeAbTests=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&type=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE&excludeAbTests=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&type=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => '4',
              'limit' => '100',
              'sortBy' => 'SOME_STRING_VALUE',
              'ordering' => 'SOME_STRING_VALUE',
              'includeMeta' => 'SOME_BOOLEAN_VALUE',
              'name' => 'SOME_STRING_VALUE',
              'query' => 'SOME_STRING_VALUE',
              'excludeAbTests' => 'SOME_BOOLEAN_VALUE',
              'directoryId' => 'SOME_STRING_VALUE',
              'type' => 'SOME_STRING_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE&excludeAbTests=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&type=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Post index configuration
      description: |
        Creates a new configuration of a single index.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_CREATE`

        **User role permission required:** `assets_search: create`
      operationId: postIndexConfigV2
      tags:
        - Search Configuration
      security:
        - JWT: []
      requestBody:
        description: Request for posting search configuration
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - indexName
                - itemsCatalogId
                - language
                - searchableAttributes
                - enabled
              properties:
                indexName:
                  $ref: "#/components/schemas/items-search-config-IndexNameSchema"
                description:
                  $ref: "#/components/schemas/items-search-config-IndexDescriptionSchema"
                itemsCatalogId:
                  $ref: "#/components/schemas/items-search-config-ItemsCatalogIdSchema"
                language:
                  $ref: "#/components/schemas/items-search-config-LanguageSchema"
                enabled:
                  $ref: "#/components/schemas/items-search-config-EnabledSchema"
                ignoreUnavailableItems:
                  $ref: "#/components/schemas/items-search-config-IgnoreUnavailableItemsSchema"
                scoring:
                  $ref: "#/components/schemas/items-search-config-ScoringSchema"
                suggestions:
                  $ref: "#/components/schemas/items-search-config-Suggestions"
                tokenizer:
                  $ref: "#/components/schemas/items-search-config-Tokenizer"
                analyzers:
                  $ref: "#/components/schemas/items-search-config-Analyzers"
                attributesWithoutPrefixSearch:
                  $ref: "#/components/schemas/items-search-config-AttributesWithoutPrefixSearchSchema"
                attributesWithoutTypoTolerance:
                  $ref: "#/components/schemas/items-search-config-AttributesWithoutTypoToleranceSchema"
                valuesWithoutTypoTolerance:
                  $ref: "#/components/schemas/items-search-config-ValuesWithoutTypoToleranceSchema"
                typoToleranceOnNumericValues:
                  $ref: "#/components/schemas/items-search-config-TypoToleranceOnNumericValuesSchema"
                searchableAttributes:
                  $ref: "#/components/schemas/items-search-config-SearchableAttributesSchema"
                displayableAttributes:
                  $ref: "#/components/schemas/items-search-config-DisplayableAttributesSchema"
                facetableAttributes:
                  $ref: "#/components/schemas/items-search-config-FacetableAttributesSchema"
                filterableAttributes:
                  $ref: "#/components/schemas/items-search-config-FilterableAttributesSchema"
                sortableAttributes:
                  $ref: "#/components/schemas/items-search-config-SortableAttributesSchema"
                distinctFilterAttributes:
                  $ref: "#/components/schemas/items-search-config-DistinctFilterAttributesSchema"
                recentSearches:
                  $ref: "#/components/schemas/items-search-config-RecentSearchesConfig"
                reranking:
                  $ref: "#/components/schemas/items-search-config-RerankingSchema"
                geoSearch:
                  $ref: "#/components/schemas/items-search-config-GeoSearchSchema"
                queryRules:
                  $ref: "#/components/schemas/items-search-config-QueryRulesSchema"
      responses:
        "200":
          description: Returned created configuration
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-SearchConfigSchema"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search-Configuration/operation/postIndexConfigV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"indexName":"string","description":"string","itemsCatalogId":"string","language":"string","enabled":true,"ignoreUnavailableItems":true,"scoring":{"pageVisitsPopularity":0,"transactionsPopularity":0,"personalized":0,"tieBreaker":0,"matching":{"type":"MinimumMatching","value":1},"fallbackMatching":{"type":"MinimumMatching","value":1},"similarity":{"type":"BM25","k1":1.2,"b":0.75},"crossWorkspaceMode":{"enabled":true}},"suggestions":{"smoothingModel":"Popularity","gramSize":3,"maxErrors":2,"minWordLength":4,"useAlways":false},"tokenizer":{"type":"Whitespace"},"analyzers":{"autocomplete":"Ngram"},"attributesWithoutPrefixSearch":["brand","color","promotion.type"],"attributesWithoutTypoTolerance":["itemId","link"],"valuesWithoutTypoTolerance":["Nike","blue","74997"],"typoToleranceOnNumericValues":true,"searchableAttributes":{"fullText":["brand","color","promotion.type"],"fullTextBoosted":["brand","color","promotion.type"],"fullTextStronglyBoosted":["brand","color","promotion.type"]},"displayableAttributes":["brand","color","promotion.type"],"facetableAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"filterableAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"sortableAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"distinctFilterAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"recentSearches":{"windowSize":100,"timeSpan":{"type":"DAYS","value":30}},"reranking":{"dynamicReranker":{"enabled":true,"filter":"string","numberOfItems":1,"minNumberOfEvents":0},"queryClassification":{"enabled":true,"actions":[{"action":"staticFilter","minReliabilityLevel":"certain"}],"excludedPhrases":["string"],"excludedCategories":["string"]}},"geoSearch":{"geoSearchableAttribute":"string"},"queryRules":{"consequencesJoinOperators":{"standardFilters":"AND","elasticFilters":"AND"}}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"indexName\":\"string\",\"description\":\"string\",\"itemsCatalogId\":\"string\",\"language\":\"string\",\"enabled\":true,\"ignoreUnavailableItems\":true,\"scoring\":{\"pageVisitsPopularity\":0,\"transactionsPopularity\":0,\"personalized\":0,\"tieBreaker\":0,\"matching\":{\"type\":\"MinimumMatching\",\"value\":1},\"fallbackMatching\":{\"type\":\"MinimumMatching\",\"value\":1},\"similarity\":{\"type\":\"BM25\",\"k1\":1.2,\"b\":0.75},\"crossWorkspaceMode\":{\"enabled\":true}},\"suggestions\":{\"smoothingModel\":\"Popularity\",\"gramSize\":3,\"maxErrors\":2,\"minWordLength\":4,\"useAlways\":false},\"tokenizer\":{\"type\":\"Whitespace\"},\"analyzers\":{\"autocomplete\":\"Ngram\"},\"attributesWithoutPrefixSearch\":[\"brand\",\"color\",\"promotion.type\"],\"attributesWithoutTypoTolerance\":[\"itemId\",\"link\"],\"valuesWithoutTypoTolerance\":[\"Nike\",\"blue\",\"74997\"],\"typoToleranceOnNumericValues\":true,\"searchableAttributes\":{\"fullText\":[\"brand\",\"color\",\"promotion.type\"],\"fullTextBoosted\":[\"brand\",\"color\",\"promotion.type\"],\"fullTextStronglyBoosted\":[\"brand\",\"color\",\"promotion.type\"]},\"displayableAttributes\":[\"brand\",\"color\",\"promotion.type\"],\"facetableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"filterableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"sortableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"distinctFilterAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"recentSearches\":{\"windowSize\":100,\"timeSpan\":{\"type\":\"DAYS\",\"value\":30}},\"reranking\":{\"dynamicReranker\":{\"enabled\":true,\"filter\":\"string\",\"numberOfItems\":1,\"minNumberOfEvents\":0},\"queryClassification\":{\"enabled\":true,\"actions\":[{\"action\":\"staticFilter\",\"minReliabilityLevel\":\"certain\"}],\"excludedPhrases\":[\"string\"],\"excludedCategories\":[\"string\"]}},\"geoSearch\":{\"geoSearchableAttribute\":\"string\"},\"queryRules\":{\"consequencesJoinOperators\":{\"standardFilters\":\"AND\",\"elasticFilters\":\"AND\"}}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/search/v2/indices", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "indexName": "string",
              "description": "string",
              "itemsCatalogId": "string",
              "language": "string",
              "enabled": true,
              "ignoreUnavailableItems": true,
              "scoring": {
                "pageVisitsPopularity": 0,
                "transactionsPopularity": 0,
                "personalized": 0,
                "tieBreaker": 0,
                "matching": {
                  "type": "MinimumMatching",
                  "value": 1
                },
                "fallbackMatching": {
                  "type": "MinimumMatching",
                  "value": 1
                },
                "similarity": {
                  "type": "BM25",
                  "k1": 1.2,
                  "b": 0.75
                },
                "crossWorkspaceMode": {
                  "enabled": true
                }
              },
              "suggestions": {
                "smoothingModel": "Popularity",
                "gramSize": 3,
                "maxErrors": 2,
                "minWordLength": 4,
                "useAlways": false
              },
              "tokenizer": {
                "type": "Whitespace"
              },
              "analyzers": {
                "autocomplete": "Ngram"
              },
              "attributesWithoutPrefixSearch": [
                "brand",
                "color",
                "promotion.type"
              ],
              "attributesWithoutTypoTolerance": [
                "itemId",
                "link"
              ],
              "valuesWithoutTypoTolerance": [
                "Nike",
                "blue",
                "74997"
              ],
              "typoToleranceOnNumericValues": true,
              "searchableAttributes": {
                "fullText": [
                  "brand",
                  "color",
                  "promotion.type"
                ],
                "fullTextBoosted": [
                  "brand",
                  "color",
                  "promotion.type"
                ],
                "fullTextStronglyBoosted": [
                  "brand",
                  "color",
                  "promotion.type"
                ]
              },
              "displayableAttributes": [
                "brand",
                "color",
                "promotion.type"
              ],
              "facetableAttributes": {
                "range": [
                  "age",
                  "customScore.value",
                  "salePrice.value"
                ],
                "text": [
                  "brand",
                  "color",
                  "promotion.type"
                ],
                "datetime": [
                  "created",
                  "attributes.modifiedAt"
                ]
              },
              "filterableAttributes": {
                "range": [
                  "age",
                  "customScore.value",
                  "salePrice.value"
                ],
                "text": [
                  "brand",
                  "color",
                  "promotion.type"
                ],
                "datetime": [
                  "created",
                  "attributes.modifiedAt"
                ]
              },
              "sortableAttributes": {
                "range": [
                  "age",
                  "customScore.value",
                  "salePrice.value"
                ],
                "text": [
                  "brand",
                  "color",
                  "promotion.type"
                ],
                "datetime": [
                  "created",
                  "attributes.modifiedAt"
                ]
              },
              "distinctFilterAttributes": {
                "range": [
                  "age",
                  "customScore.value",
                  "salePrice.value"
                ],
                "text": [
                  "brand",
                  "color",
                  "promotion.type"
                ],
                "datetime": [
                  "created",
                  "attributes.modifiedAt"
                ]
              },
              "recentSearches": {
                "windowSize": 100,
                "timeSpan": {
                  "type": "DAYS",
                  "value": 30
                }
              },
              "reranking": {
                "dynamicReranker": {
                  "enabled": true,
                  "filter": "string",
                  "numberOfItems": 1,
                  "minNumberOfEvents": 0
                },
                "queryClassification": {
                  "enabled": true,
                  "actions": [
                    {
                      "action": "staticFilter",
                      "minReliabilityLevel": "certain"
                    }
                  ],
                  "excludedPhrases": [
                    "string"
                  ],
                  "excludedCategories": [
                    "string"
                  ]
                }
              },
              "geoSearch": {
                "geoSearchableAttribute": "string"
              },
              "queryRules": {
                "consequencesJoinOperators": {
                  "standardFilters": "AND",
                  "elasticFilters": "AND"
                }
              }
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              indexName: 'string',
              description: 'string',
              itemsCatalogId: 'string',
              language: 'string',
              enabled: true,
              ignoreUnavailableItems: true,
              scoring: {
                pageVisitsPopularity: 0,
                transactionsPopularity: 0,
                personalized: 0,
                tieBreaker: 0,
                matching: {type: 'MinimumMatching', value: 1},
                fallbackMatching: {type: 'MinimumMatching', value: 1},
                similarity: {type: 'BM25', k1: 1.2, b: 0.75},
                crossWorkspaceMode: {enabled: true}
              },
              suggestions: {
                smoothingModel: 'Popularity',
                gramSize: 3,
                maxErrors: 2,
                minWordLength: 4,
                useAlways: false
              },
              tokenizer: {type: 'Whitespace'},
              analyzers: {autocomplete: 'Ngram'},
              attributesWithoutPrefixSearch: ['brand', 'color', 'promotion.type'],
              attributesWithoutTypoTolerance: ['itemId', 'link'],
              valuesWithoutTypoTolerance: ['Nike', 'blue', '74997'],
              typoToleranceOnNumericValues: true,
              searchableAttributes: {
                fullText: ['brand', 'color', 'promotion.type'],
                fullTextBoosted: ['brand', 'color', 'promotion.type'],
                fullTextStronglyBoosted: ['brand', 'color', 'promotion.type']
              },
              displayableAttributes: ['brand', 'color', 'promotion.type'],
              facetableAttributes: {
                range: ['age', 'customScore.value', 'salePrice.value'],
                text: ['brand', 'color', 'promotion.type'],
                datetime: ['created', 'attributes.modifiedAt']
              },
              filterableAttributes: {
                range: ['age', 'customScore.value', 'salePrice.value'],
                text: ['brand', 'color', 'promotion.type'],
                datetime: ['created', 'attributes.modifiedAt']
              },
              sortableAttributes: {
                range: ['age', 'customScore.value', 'salePrice.value'],
                text: ['brand', 'color', 'promotion.type'],
                datetime: ['created', 'attributes.modifiedAt']
              },
              distinctFilterAttributes: {
                range: ['age', 'customScore.value', 'salePrice.value'],
                text: ['brand', 'color', 'promotion.type'],
                datetime: ['created', 'attributes.modifiedAt']
              },
              recentSearches: {windowSize: 100, timeSpan: {type: 'DAYS', value: 30}},
              reranking: {
                dynamicReranker: {enabled: true, filter: 'string', numberOfItems: 1, minNumberOfEvents: 0},
                queryClassification: {
                  enabled: true,
                  actions: [{action: 'staticFilter', minReliabilityLevel: 'certain'}],
                  excludedPhrases: ['string'],
                  excludedCategories: ['string']
                }
              },
              geoSearch: {geoSearchableAttribute: 'string'},
              queryRules: {consequencesJoinOperators: {standardFilters: 'AND', elasticFilters: 'AND'}}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"indexName":"string","description":"string","itemsCatalogId":"string","language":"string","enabled":true,"ignoreUnavailableItems":true,"scoring":{"pageVisitsPopularity":0,"transactionsPopularity":0,"personalized":0,"tieBreaker":0,"matching":{"type":"MinimumMatching","value":1},"fallbackMatching":{"type":"MinimumMatching","value":1},"similarity":{"type":"BM25","k1":1.2,"b":0.75},"crossWorkspaceMode":{"enabled":true}},"suggestions":{"smoothingModel":"Popularity","gramSize":3,"maxErrors":2,"minWordLength":4,"useAlways":false},"tokenizer":{"type":"Whitespace"},"analyzers":{"autocomplete":"Ngram"},"attributesWithoutPrefixSearch":["brand","color","promotion.type"],"attributesWithoutTypoTolerance":["itemId","link"],"valuesWithoutTypoTolerance":["Nike","blue","74997"],"typoToleranceOnNumericValues":true,"searchableAttributes":{"fullText":["brand","color","promotion.type"],"fullTextBoosted":["brand","color","promotion.type"],"fullTextStronglyBoosted":["brand","color","promotion.type"]},"displayableAttributes":["brand","color","promotion.type"],"facetableAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"filterableAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"sortableAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"distinctFilterAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"recentSearches":{"windowSize":100,"timeSpan":{"type":"DAYS","value":30}},"reranking":{"dynamicReranker":{"enabled":true,"filter":"string","numberOfItems":1,"minNumberOfEvents":0},"queryClassification":{"enabled":true,"actions":[{"action":"staticFilter","minReliabilityLevel":"certain"}],"excludedPhrases":["string"],"excludedCategories":["string"]}},"geoSearch":{"geoSearchableAttribute":"string"},"queryRules":{"consequencesJoinOperators":{"standardFilters":"AND","elasticFilters":"AND"}}}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"indexName\":\"string\",\"description\":\"string\",\"itemsCatalogId\":\"string\",\"language\":\"string\",\"enabled\":true,\"ignoreUnavailableItems\":true,\"scoring\":{\"pageVisitsPopularity\":0,\"transactionsPopularity\":0,\"personalized\":0,\"tieBreaker\":0,\"matching\":{\"type\":\"MinimumMatching\",\"value\":1},\"fallbackMatching\":{\"type\":\"MinimumMatching\",\"value\":1},\"similarity\":{\"type\":\"BM25\",\"k1\":1.2,\"b\":0.75},\"crossWorkspaceMode\":{\"enabled\":true}},\"suggestions\":{\"smoothingModel\":\"Popularity\",\"gramSize\":3,\"maxErrors\":2,\"minWordLength\":4,\"useAlways\":false},\"tokenizer\":{\"type\":\"Whitespace\"},\"analyzers\":{\"autocomplete\":\"Ngram\"},\"attributesWithoutPrefixSearch\":[\"brand\",\"color\",\"promotion.type\"],\"attributesWithoutTypoTolerance\":[\"itemId\",\"link\"],\"valuesWithoutTypoTolerance\":[\"Nike\",\"blue\",\"74997\"],\"typoToleranceOnNumericValues\":true,\"searchableAttributes\":{\"fullText\":[\"brand\",\"color\",\"promotion.type\"],\"fullTextBoosted\":[\"brand\",\"color\",\"promotion.type\"],\"fullTextStronglyBoosted\":[\"brand\",\"color\",\"promotion.type\"]},\"displayableAttributes\":[\"brand\",\"color\",\"promotion.type\"],\"facetableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"filterableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"sortableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"distinctFilterAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"recentSearches\":{\"windowSize\":100,\"timeSpan\":{\"type\":\"DAYS\",\"value\":30}},\"reranking\":{\"dynamicReranker\":{\"enabled\":true,\"filter\":\"string\",\"numberOfItems\":1,\"minNumberOfEvents\":0},\"queryClassification\":{\"enabled\":true,\"actions\":[{\"action\":\"staticFilter\",\"minReliabilityLevel\":\"certain\"}],\"excludedPhrases\":[\"string\"],\"excludedCategories\":[\"string\"]}},\"geoSearch\":{\"geoSearchableAttribute\":\"string\"},\"queryRules\":{\"consequencesJoinOperators\":{\"standardFilters\":\"AND\",\"elasticFilters\":\"AND\"}}}")
              .asString();
  /search/v2/indices/{indexId}/config:
    get:
      summary: Get index configuration
      description: |
        Retrieve the configuration of a single index.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_READ`

        **User role permission required:** `assets_search: read`
      operationId: getIndexConfigV2
      tags:
        - Search Configuration
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-config-InPathIndexId"
      responses:
        "200":
          description: Configuration returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-SearchConfigSchema"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search-Configuration/operation/getIndexConfigV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/config \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/config", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/config");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/config",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/config');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/config")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    delete:
      summary: Delete index configuration
      description: |
        Delete the configuration of a single index.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_DELETE`

        **User role permission required:** `assets_search: delete`
      operationId: deleteIndexConfigV2
      tags:
        - Search Configuration
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-config-InPathIndexId"
      responses:
        "204":
          description: Configuration deleted
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search-Configuration/operation/deleteIndexConfigV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/config \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("DELETE", "/search/v2/indices/%7BindexId%7D/config", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("DELETE", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/config");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/config",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/config');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/search/v2/indices/%7BindexId%7D/config")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    put:
      summary: Update index configuration
      description: |
        Update the configuration of a single index.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_UPDATE`

        **User role permission required:** `assets_search: update`
      operationId: updateIndexConfigV2
      tags:
        - Search Configuration
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-config-InPathIndexId"
      requestBody:
        description: Request for posting search configuration
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - indexName
                - itemsCatalogId
                - language
                - searchableAttributes
                - enabled
              properties:
                indexName:
                  $ref: "#/components/schemas/items-search-config-IndexNameSchema"
                description:
                  $ref: "#/components/schemas/items-search-config-IndexDescriptionSchema"
                itemsCatalogId:
                  $ref: "#/components/schemas/items-search-config-ItemsCatalogIdSchema"
                language:
                  $ref: "#/components/schemas/items-search-config-LanguageSchema"
                enabled:
                  $ref: "#/components/schemas/items-search-config-EnabledSchema"
                ignoreUnavailableItems:
                  $ref: "#/components/schemas/items-search-config-IgnoreUnavailableItemsSchema"
                scoring:
                  $ref: "#/components/schemas/items-search-config-ScoringSchema"
                suggestions:
                  $ref: "#/components/schemas/items-search-config-Suggestions"
                tokenizer:
                  $ref: "#/components/schemas/items-search-config-Tokenizer"
                analyzers:
                  $ref: "#/components/schemas/items-search-config-Analyzers"
                attributesWithoutPrefixSearch:
                  $ref: "#/components/schemas/items-search-config-AttributesWithoutPrefixSearchSchema"
                attributesWithoutTypoTolerance:
                  $ref: "#/components/schemas/items-search-config-AttributesWithoutTypoToleranceSchema"
                valuesWithoutTypoTolerance:
                  $ref: "#/components/schemas/items-search-config-ValuesWithoutTypoToleranceSchema"
                typoToleranceOnNumericValues:
                  $ref: "#/components/schemas/items-search-config-TypoToleranceOnNumericValuesSchema"
                searchableAttributes:
                  $ref: "#/components/schemas/items-search-config-SearchableAttributesSchema"
                displayableAttributes:
                  $ref: "#/components/schemas/items-search-config-DisplayableAttributesSchema"
                facetableAttributes:
                  $ref: "#/components/schemas/items-search-config-FacetableAttributesSchema"
                filterableAttributes:
                  $ref: "#/components/schemas/items-search-config-FilterableAttributesSchema"
                sortableAttributes:
                  $ref: "#/components/schemas/items-search-config-SortableAttributesSchema"
                distinctFilterAttributes:
                  $ref: "#/components/schemas/items-search-config-DistinctFilterAttributesSchema"
                recentSearches:
                  $ref: "#/components/schemas/items-search-config-RecentSearchesConfig"
                reranking:
                  $ref: "#/components/schemas/items-search-config-RerankingSchema"
                geoSearch:
                  $ref: "#/components/schemas/items-search-config-GeoSearchSchema"
                queryRules:
                  $ref: "#/components/schemas/items-search-config-QueryRulesSchema"
      responses:
        "200":
          description: Returned updated configuration
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-SearchConfigSchema"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search-Configuration/operation/updateIndexConfigV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/config \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"indexName":"string","description":"string","itemsCatalogId":"string","language":"string","enabled":true,"ignoreUnavailableItems":true,"scoring":{"pageVisitsPopularity":0,"transactionsPopularity":0,"personalized":0,"tieBreaker":0,"matching":{"type":"MinimumMatching","value":1},"fallbackMatching":{"type":"MinimumMatching","value":1},"similarity":{"type":"BM25","k1":1.2,"b":0.75},"crossWorkspaceMode":{"enabled":true}},"suggestions":{"smoothingModel":"Popularity","gramSize":3,"maxErrors":2,"minWordLength":4,"useAlways":false},"tokenizer":{"type":"Whitespace"},"analyzers":{"autocomplete":"Ngram"},"attributesWithoutPrefixSearch":["brand","color","promotion.type"],"attributesWithoutTypoTolerance":["itemId","link"],"valuesWithoutTypoTolerance":["Nike","blue","74997"],"typoToleranceOnNumericValues":true,"searchableAttributes":{"fullText":["brand","color","promotion.type"],"fullTextBoosted":["brand","color","promotion.type"],"fullTextStronglyBoosted":["brand","color","promotion.type"]},"displayableAttributes":["brand","color","promotion.type"],"facetableAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"filterableAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"sortableAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"distinctFilterAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"recentSearches":{"windowSize":100,"timeSpan":{"type":"DAYS","value":30}},"reranking":{"dynamicReranker":{"enabled":true,"filter":"string","numberOfItems":1,"minNumberOfEvents":0},"queryClassification":{"enabled":true,"actions":[{"action":"staticFilter","minReliabilityLevel":"certain"}],"excludedPhrases":["string"],"excludedCategories":["string"]}},"geoSearch":{"geoSearchableAttribute":"string"},"queryRules":{"consequencesJoinOperators":{"standardFilters":"AND","elasticFilters":"AND"}}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"indexName\":\"string\",\"description\":\"string\",\"itemsCatalogId\":\"string\",\"language\":\"string\",\"enabled\":true,\"ignoreUnavailableItems\":true,\"scoring\":{\"pageVisitsPopularity\":0,\"transactionsPopularity\":0,\"personalized\":0,\"tieBreaker\":0,\"matching\":{\"type\":\"MinimumMatching\",\"value\":1},\"fallbackMatching\":{\"type\":\"MinimumMatching\",\"value\":1},\"similarity\":{\"type\":\"BM25\",\"k1\":1.2,\"b\":0.75},\"crossWorkspaceMode\":{\"enabled\":true}},\"suggestions\":{\"smoothingModel\":\"Popularity\",\"gramSize\":3,\"maxErrors\":2,\"minWordLength\":4,\"useAlways\":false},\"tokenizer\":{\"type\":\"Whitespace\"},\"analyzers\":{\"autocomplete\":\"Ngram\"},\"attributesWithoutPrefixSearch\":[\"brand\",\"color\",\"promotion.type\"],\"attributesWithoutTypoTolerance\":[\"itemId\",\"link\"],\"valuesWithoutTypoTolerance\":[\"Nike\",\"blue\",\"74997\"],\"typoToleranceOnNumericValues\":true,\"searchableAttributes\":{\"fullText\":[\"brand\",\"color\",\"promotion.type\"],\"fullTextBoosted\":[\"brand\",\"color\",\"promotion.type\"],\"fullTextStronglyBoosted\":[\"brand\",\"color\",\"promotion.type\"]},\"displayableAttributes\":[\"brand\",\"color\",\"promotion.type\"],\"facetableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"filterableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"sortableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"distinctFilterAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"recentSearches\":{\"windowSize\":100,\"timeSpan\":{\"type\":\"DAYS\",\"value\":30}},\"reranking\":{\"dynamicReranker\":{\"enabled\":true,\"filter\":\"string\",\"numberOfItems\":1,\"minNumberOfEvents\":0},\"queryClassification\":{\"enabled\":true,\"actions\":[{\"action\":\"staticFilter\",\"minReliabilityLevel\":\"certain\"}],\"excludedPhrases\":[\"string\"],\"excludedCategories\":[\"string\"]}},\"geoSearch\":{\"geoSearchableAttribute\":\"string\"},\"queryRules\":{\"consequencesJoinOperators\":{\"standardFilters\":\"AND\",\"elasticFilters\":\"AND\"}}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("PUT", "/search/v2/indices/%7BindexId%7D/config", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "indexName": "string",
              "description": "string",
              "itemsCatalogId": "string",
              "language": "string",
              "enabled": true,
              "ignoreUnavailableItems": true,
              "scoring": {
                "pageVisitsPopularity": 0,
                "transactionsPopularity": 0,
                "personalized": 0,
                "tieBreaker": 0,
                "matching": {
                  "type": "MinimumMatching",
                  "value": 1
                },
                "fallbackMatching": {
                  "type": "MinimumMatching",
                  "value": 1
                },
                "similarity": {
                  "type": "BM25",
                  "k1": 1.2,
                  "b": 0.75
                },
                "crossWorkspaceMode": {
                  "enabled": true
                }
              },
              "suggestions": {
                "smoothingModel": "Popularity",
                "gramSize": 3,
                "maxErrors": 2,
                "minWordLength": 4,
                "useAlways": false
              },
              "tokenizer": {
                "type": "Whitespace"
              },
              "analyzers": {
                "autocomplete": "Ngram"
              },
              "attributesWithoutPrefixSearch": [
                "brand",
                "color",
                "promotion.type"
              ],
              "attributesWithoutTypoTolerance": [
                "itemId",
                "link"
              ],
              "valuesWithoutTypoTolerance": [
                "Nike",
                "blue",
                "74997"
              ],
              "typoToleranceOnNumericValues": true,
              "searchableAttributes": {
                "fullText": [
                  "brand",
                  "color",
                  "promotion.type"
                ],
                "fullTextBoosted": [
                  "brand",
                  "color",
                  "promotion.type"
                ],
                "fullTextStronglyBoosted": [
                  "brand",
                  "color",
                  "promotion.type"
                ]
              },
              "displayableAttributes": [
                "brand",
                "color",
                "promotion.type"
              ],
              "facetableAttributes": {
                "range": [
                  "age",
                  "customScore.value",
                  "salePrice.value"
                ],
                "text": [
                  "brand",
                  "color",
                  "promotion.type"
                ],
                "datetime": [
                  "created",
                  "attributes.modifiedAt"
                ]
              },
              "filterableAttributes": {
                "range": [
                  "age",
                  "customScore.value",
                  "salePrice.value"
                ],
                "text": [
                  "brand",
                  "color",
                  "promotion.type"
                ],
                "datetime": [
                  "created",
                  "attributes.modifiedAt"
                ]
              },
              "sortableAttributes": {
                "range": [
                  "age",
                  "customScore.value",
                  "salePrice.value"
                ],
                "text": [
                  "brand",
                  "color",
                  "promotion.type"
                ],
                "datetime": [
                  "created",
                  "attributes.modifiedAt"
                ]
              },
              "distinctFilterAttributes": {
                "range": [
                  "age",
                  "customScore.value",
                  "salePrice.value"
                ],
                "text": [
                  "brand",
                  "color",
                  "promotion.type"
                ],
                "datetime": [
                  "created",
                  "attributes.modifiedAt"
                ]
              },
              "recentSearches": {
                "windowSize": 100,
                "timeSpan": {
                  "type": "DAYS",
                  "value": 30
                }
              },
              "reranking": {
                "dynamicReranker": {
                  "enabled": true,
                  "filter": "string",
                  "numberOfItems": 1,
                  "minNumberOfEvents": 0
                },
                "queryClassification": {
                  "enabled": true,
                  "actions": [
                    {
                      "action": "staticFilter",
                      "minReliabilityLevel": "certain"
                    }
                  ],
                  "excludedPhrases": [
                    "string"
                  ],
                  "excludedCategories": [
                    "string"
                  ]
                }
              },
              "geoSearch": {
                "geoSearchableAttribute": "string"
              },
              "queryRules": {
                "consequencesJoinOperators": {
                  "standardFilters": "AND",
                  "elasticFilters": "AND"
                }
              }
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("PUT", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/config");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/config",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              indexName: 'string',
              description: 'string',
              itemsCatalogId: 'string',
              language: 'string',
              enabled: true,
              ignoreUnavailableItems: true,
              scoring: {
                pageVisitsPopularity: 0,
                transactionsPopularity: 0,
                personalized: 0,
                tieBreaker: 0,
                matching: {type: 'MinimumMatching', value: 1},
                fallbackMatching: {type: 'MinimumMatching', value: 1},
                similarity: {type: 'BM25', k1: 1.2, b: 0.75},
                crossWorkspaceMode: {enabled: true}
              },
              suggestions: {
                smoothingModel: 'Popularity',
                gramSize: 3,
                maxErrors: 2,
                minWordLength: 4,
                useAlways: false
              },
              tokenizer: {type: 'Whitespace'},
              analyzers: {autocomplete: 'Ngram'},
              attributesWithoutPrefixSearch: ['brand', 'color', 'promotion.type'],
              attributesWithoutTypoTolerance: ['itemId', 'link'],
              valuesWithoutTypoTolerance: ['Nike', 'blue', '74997'],
              typoToleranceOnNumericValues: true,
              searchableAttributes: {
                fullText: ['brand', 'color', 'promotion.type'],
                fullTextBoosted: ['brand', 'color', 'promotion.type'],
                fullTextStronglyBoosted: ['brand', 'color', 'promotion.type']
              },
              displayableAttributes: ['brand', 'color', 'promotion.type'],
              facetableAttributes: {
                range: ['age', 'customScore.value', 'salePrice.value'],
                text: ['brand', 'color', 'promotion.type'],
                datetime: ['created', 'attributes.modifiedAt']
              },
              filterableAttributes: {
                range: ['age', 'customScore.value', 'salePrice.value'],
                text: ['brand', 'color', 'promotion.type'],
                datetime: ['created', 'attributes.modifiedAt']
              },
              sortableAttributes: {
                range: ['age', 'customScore.value', 'salePrice.value'],
                text: ['brand', 'color', 'promotion.type'],
                datetime: ['created', 'attributes.modifiedAt']
              },
              distinctFilterAttributes: {
                range: ['age', 'customScore.value', 'salePrice.value'],
                text: ['brand', 'color', 'promotion.type'],
                datetime: ['created', 'attributes.modifiedAt']
              },
              recentSearches: {windowSize: 100, timeSpan: {type: 'DAYS', value: 30}},
              reranking: {
                dynamicReranker: {enabled: true, filter: 'string', numberOfItems: 1, minNumberOfEvents: 0},
                queryClassification: {
                  enabled: true,
                  actions: [{action: 'staticFilter', minReliabilityLevel: 'certain'}],
                  excludedPhrases: ['string'],
                  excludedCategories: ['string']
                }
              },
              geoSearch: {geoSearchableAttribute: 'string'},
              queryRules: {consequencesJoinOperators: {standardFilters: 'AND', elasticFilters: 'AND'}}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/config');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"indexName":"string","description":"string","itemsCatalogId":"string","language":"string","enabled":true,"ignoreUnavailableItems":true,"scoring":{"pageVisitsPopularity":0,"transactionsPopularity":0,"personalized":0,"tieBreaker":0,"matching":{"type":"MinimumMatching","value":1},"fallbackMatching":{"type":"MinimumMatching","value":1},"similarity":{"type":"BM25","k1":1.2,"b":0.75},"crossWorkspaceMode":{"enabled":true}},"suggestions":{"smoothingModel":"Popularity","gramSize":3,"maxErrors":2,"minWordLength":4,"useAlways":false},"tokenizer":{"type":"Whitespace"},"analyzers":{"autocomplete":"Ngram"},"attributesWithoutPrefixSearch":["brand","color","promotion.type"],"attributesWithoutTypoTolerance":["itemId","link"],"valuesWithoutTypoTolerance":["Nike","blue","74997"],"typoToleranceOnNumericValues":true,"searchableAttributes":{"fullText":["brand","color","promotion.type"],"fullTextBoosted":["brand","color","promotion.type"],"fullTextStronglyBoosted":["brand","color","promotion.type"]},"displayableAttributes":["brand","color","promotion.type"],"facetableAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"filterableAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"sortableAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"distinctFilterAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"recentSearches":{"windowSize":100,"timeSpan":{"type":"DAYS","value":30}},"reranking":{"dynamicReranker":{"enabled":true,"filter":"string","numberOfItems":1,"minNumberOfEvents":0},"queryClassification":{"enabled":true,"actions":[{"action":"staticFilter","minReliabilityLevel":"certain"}],"excludedPhrases":["string"],"excludedCategories":["string"]}},"geoSearch":{"geoSearchableAttribute":"string"},"queryRules":{"consequencesJoinOperators":{"standardFilters":"AND","elasticFilters":"AND"}}}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.put("https://api.synerise.com/search/v2/indices/%7BindexId%7D/config")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"indexName\":\"string\",\"description\":\"string\",\"itemsCatalogId\":\"string\",\"language\":\"string\",\"enabled\":true,\"ignoreUnavailableItems\":true,\"scoring\":{\"pageVisitsPopularity\":0,\"transactionsPopularity\":0,\"personalized\":0,\"tieBreaker\":0,\"matching\":{\"type\":\"MinimumMatching\",\"value\":1},\"fallbackMatching\":{\"type\":\"MinimumMatching\",\"value\":1},\"similarity\":{\"type\":\"BM25\",\"k1\":1.2,\"b\":0.75},\"crossWorkspaceMode\":{\"enabled\":true}},\"suggestions\":{\"smoothingModel\":\"Popularity\",\"gramSize\":3,\"maxErrors\":2,\"minWordLength\":4,\"useAlways\":false},\"tokenizer\":{\"type\":\"Whitespace\"},\"analyzers\":{\"autocomplete\":\"Ngram\"},\"attributesWithoutPrefixSearch\":[\"brand\",\"color\",\"promotion.type\"],\"attributesWithoutTypoTolerance\":[\"itemId\",\"link\"],\"valuesWithoutTypoTolerance\":[\"Nike\",\"blue\",\"74997\"],\"typoToleranceOnNumericValues\":true,\"searchableAttributes\":{\"fullText\":[\"brand\",\"color\",\"promotion.type\"],\"fullTextBoosted\":[\"brand\",\"color\",\"promotion.type\"],\"fullTextStronglyBoosted\":[\"brand\",\"color\",\"promotion.type\"]},\"displayableAttributes\":[\"brand\",\"color\",\"promotion.type\"],\"facetableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"filterableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"sortableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"distinctFilterAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"recentSearches\":{\"windowSize\":100,\"timeSpan\":{\"type\":\"DAYS\",\"value\":30}},\"reranking\":{\"dynamicReranker\":{\"enabled\":true,\"filter\":\"string\",\"numberOfItems\":1,\"minNumberOfEvents\":0},\"queryClassification\":{\"enabled\":true,\"actions\":[{\"action\":\"staticFilter\",\"minReliabilityLevel\":\"certain\"}],\"excludedPhrases\":[\"string\"],\"excludedCategories\":[\"string\"]}},\"geoSearch\":{\"geoSearchableAttribute\":\"string\"},\"queryRules\":{\"consequencesJoinOperators\":{\"standardFilters\":\"AND\",\"elasticFilters\":\"AND\"}}}")
              .asString();
  /search/v2/indices/{indexId}/state:
    get:
      summary: Get index state
      description: |
        Retrieve the state of a single index.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_READ`

        **User role permission required:** `assets_search: read`
      operationId: getIndexStateV2
      tags:
        - Search Configuration
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-config-InPathIndexId"
      responses:
        "200":
          description: State returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-IndexStateResponseSchema"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search-Configuration/operation/getIndexStateV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/state \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/state", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/state");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/state",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/state');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/state")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/supported-languages:
    get:
      summary: Get supported languages
      description: |
        Retrieve supported languages.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_READ`

        **User role permission required:** `assets_search: read`
      operationId: getSupportedLanguagesV2
      tags:
        - Search Configuration
      security:
        - JWT: []
      responses:
        "200":
          description: Supported search languages as ISO 639-1 codes
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-SupportedLanguages"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search-Configuration/operation/getSupportedLanguagesV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/search/v2/supported-languages \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/supported-languages", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/supported-languages");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/supported-languages",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/supported-languages');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/supported-languages")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/indices/{indexId}/duplicate:
    get:
      summary: Duplicate index
      description: |
        duplicate index.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_CREATE`

        **User role permission required:** `assets_search: create`
      operationId: duplicateIndexV2Get
      tags:
        - Search Configuration
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-config-InPathIndexId"
      responses:
        "200":
          description: Returned newly created duplicate index
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-SearchConfigSchema"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search-Configuration/operation/duplicateIndexV2Get
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/duplicate \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/duplicate", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/duplicate");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/duplicate",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/duplicate');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/duplicate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/suggestion-indices:
    get:
      summary: Get suggestion indices
      description: |
        Retrieve a list of all suggestion index configurations in the workspace.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_READ`

        **User role permission required:** `assets_search: read`
      operationId: GetSuggestionsIndices
      tags:
        - Suggestions Configuration
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-config-paginationPage"
        - $ref: "#/components/parameters/items-search-config-paginationLimit"
        - $ref: "#/components/parameters/items-search-config-paginationSortBy"
        - $ref: "#/components/parameters/items-search-config-paginationOrdering"
        - $ref: "#/components/parameters/items-search-config-paginationIncludeMeta"
        - $ref: "#/components/parameters/items-search-config-nameFilter"
        - $ref: "#/components/parameters/items-search-config-queryFilter"
      responses:
        "200":
          description: List of suggestion index configurations
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-GetSuggestionIndicesResponseSchema"
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Suggestions-Configuration/operation/GetSuggestionsIndices
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/suggestion-indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/suggestion-indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/suggestion-indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/suggestion-indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/suggestion-indices');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => '4',
              'limit' => '100',
              'sortBy' => 'SOME_STRING_VALUE',
              'ordering' => 'SOME_STRING_VALUE',
              'includeMeta' => 'SOME_BOOLEAN_VALUE',
              'name' => 'SOME_STRING_VALUE',
              'query' => 'SOME_STRING_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/suggestion-indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Create suggestion index
      description: |
        Create a suggestion index configuration.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_CREATE`

        **User role permission required:** `assets_search: create`
      operationId: PostSuggestionIndexConfig
      tags:
        - Suggestions Configuration
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                indexName:
                  $ref: "#/components/schemas/items-search-config-SuggestionIndexNameSchema"
                description:
                  $ref: "#/components/schemas/items-search-config-SuggestionIndexDescriptionSchema"
                author:
                  $ref: "#/components/schemas/items-search-config-SuggestionIndexAuthorSchema"
                enabled:
                  $ref: "#/components/schemas/items-search-config-SuggestionIndexEnabledSchema"
                sources:
                  $ref: "#/components/schemas/items-search-config-SuggestionIndexSourcesSchema"
                denylist:
                  $ref: "#/components/schemas/items-search-config-SuggestionIndexDenylistSchema"
              required:
                - indexName
                - enabled
                - sources
      responses:
        "200":
          description: Suggestion index config created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-SuggestionIndexSchema"
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Suggestions-Configuration/operation/PostSuggestionIndexConfig
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/suggestion-indices \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"indexName":"string","description":"string","author":0,"enabled":true,"sources":{"indices":[{"indexId":"string","minPopularity":5,"minHits":1,"minLetters":2,"daysInterval":30,"validate":false}],"external":[{"query":"string","count":0}],"generate":[{"itemsCatalogId":"string","attributes":["string"]}]},"denylist":[{"pattern":"string","matchingType":"Phrase"}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"indexName\":\"string\",\"description\":\"string\",\"author\":0,\"enabled\":true,\"sources\":{\"indices\":[{\"indexId\":\"string\",\"minPopularity\":5,\"minHits\":1,\"minLetters\":2,\"daysInterval\":30,\"validate\":false}],\"external\":[{\"query\":\"string\",\"count\":0}],\"generate\":[{\"itemsCatalogId\":\"string\",\"attributes\":[\"string\"]}]},\"denylist\":[{\"pattern\":\"string\",\"matchingType\":\"Phrase\"}]}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/search/v2/suggestion-indices", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "indexName": "string",
              "description": "string",
              "author": 0,
              "enabled": true,
              "sources": {
                "indices": [
                  {
                    "indexId": "string",
                    "minPopularity": 5,
                    "minHits": 1,
                    "minLetters": 2,
                    "daysInterval": 30,
                    "validate": false
                  }
                ],
                "external": [
                  {
                    "query": "string",
                    "count": 0
                  }
                ],
                "generate": [
                  {
                    "itemsCatalogId": "string",
                    "attributes": [
                      "string"
                    ]
                  }
                ]
              },
              "denylist": [
                {
                  "pattern": "string",
                  "matchingType": "Phrase"
                }
              ]
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/suggestion-indices");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/suggestion-indices",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              indexName: 'string',
              description: 'string',
              author: 0,
              enabled: true,
              sources: {
                indices: [
                  {
                    indexId: 'string',
                    minPopularity: 5,
                    minHits: 1,
                    minLetters: 2,
                    daysInterval: 30,
                    validate: false
                  }
                ],
                external: [{query: 'string', count: 0}],
                generate: [{itemsCatalogId: 'string', attributes: ['string']}]
              },
              denylist: [{pattern: 'string', matchingType: 'Phrase'}]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/suggestion-indices');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"indexName":"string","description":"string","author":0,"enabled":true,"sources":{"indices":[{"indexId":"string","minPopularity":5,"minHits":1,"minLetters":2,"daysInterval":30,"validate":false}],"external":[{"query":"string","count":0}],"generate":[{"itemsCatalogId":"string","attributes":["string"]}]},"denylist":[{"pattern":"string","matchingType":"Phrase"}]}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/suggestion-indices")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"indexName\":\"string\",\"description\":\"string\",\"author\":0,\"enabled\":true,\"sources\":{\"indices\":[{\"indexId\":\"string\",\"minPopularity\":5,\"minHits\":1,\"minLetters\":2,\"daysInterval\":30,\"validate\":false}],\"external\":[{\"query\":\"string\",\"count\":0}],\"generate\":[{\"itemsCatalogId\":\"string\",\"attributes\":[\"string\"]}]},\"denylist\":[{\"pattern\":\"string\",\"matchingType\":\"Phrase\"}]}")
              .asString();
  /search/v2/suggestion-indices/{indexId}/config:
    get:
      summary: Get suggestion index
      description: |
        Retrieve a suggestion index configuration.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_READ`

        **User role permission required:** `assets_search: read`
      operationId: GetSuggestionsIndex
      tags:
        - Suggestions Configuration
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-config-InPathIndexId"
      responses:
        "200":
          description: Suggestion index configuration
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-SuggestionIndexSchema"
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Suggestions-Configuration/operation/GetSuggestionsIndex
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/suggestion-indices/%7BindexId%7D/config", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/suggestion-indices/%7BindexId%7D/config",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    put:
      summary: Create/replace suggestion index
      description: |
        Create a suggestion index configuration or replace an existing one, given the index ID.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_UPDATE`

        **User role permission required:** `assets_search: update`
      operationId: PutSuggestionIndexConfig
      tags:
        - Suggestions Configuration
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-config-InPathIndexId"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                indexName:
                  $ref: "#/components/schemas/items-search-config-SuggestionIndexNameSchema"
                description:
                  $ref: "#/components/schemas/items-search-config-SuggestionIndexDescriptionSchema"
                author:
                  $ref: "#/components/schemas/items-search-config-SuggestionIndexAuthorSchema"
                enabled:
                  $ref: "#/components/schemas/items-search-config-SuggestionIndexEnabledSchema"
                sources:
                  $ref: "#/components/schemas/items-search-config-SuggestionIndexSourcesSchema"
                denylist:
                  $ref: "#/components/schemas/items-search-config-SuggestionIndexDenylistSchema"
              required:
                - indexName
                - enabled
                - sources
      responses:
        "200":
          description: Suggestion index config created or replaced successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-SuggestionIndexSchema"
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Suggestions-Configuration/operation/PutSuggestionIndexConfig
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"indexName":"string","description":"string","author":0,"enabled":true,"sources":{"indices":[{"indexId":"string","minPopularity":5,"minHits":1,"minLetters":2,"daysInterval":30,"validate":false}],"external":[{"query":"string","count":0}],"generate":[{"itemsCatalogId":"string","attributes":["string"]}]},"denylist":[{"pattern":"string","matchingType":"Phrase"}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"indexName\":\"string\",\"description\":\"string\",\"author\":0,\"enabled\":true,\"sources\":{\"indices\":[{\"indexId\":\"string\",\"minPopularity\":5,\"minHits\":1,\"minLetters\":2,\"daysInterval\":30,\"validate\":false}],\"external\":[{\"query\":\"string\",\"count\":0}],\"generate\":[{\"itemsCatalogId\":\"string\",\"attributes\":[\"string\"]}]},\"denylist\":[{\"pattern\":\"string\",\"matchingType\":\"Phrase\"}]}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("PUT", "/search/v2/suggestion-indices/%7BindexId%7D/config", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "indexName": "string",
              "description": "string",
              "author": 0,
              "enabled": true,
              "sources": {
                "indices": [
                  {
                    "indexId": "string",
                    "minPopularity": 5,
                    "minHits": 1,
                    "minLetters": 2,
                    "daysInterval": 30,
                    "validate": false
                  }
                ],
                "external": [
                  {
                    "query": "string",
                    "count": 0
                  }
                ],
                "generate": [
                  {
                    "itemsCatalogId": "string",
                    "attributes": [
                      "string"
                    ]
                  }
                ]
              },
              "denylist": [
                {
                  "pattern": "string",
                  "matchingType": "Phrase"
                }
              ]
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("PUT", "https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/suggestion-indices/%7BindexId%7D/config",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              indexName: 'string',
              description: 'string',
              author: 0,
              enabled: true,
              sources: {
                indices: [
                  {
                    indexId: 'string',
                    minPopularity: 5,
                    minHits: 1,
                    minLetters: 2,
                    daysInterval: 30,
                    validate: false
                  }
                ],
                external: [{query: 'string', count: 0}],
                generate: [{itemsCatalogId: 'string', attributes: ['string']}]
              },
              denylist: [{pattern: 'string', matchingType: 'Phrase'}]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"indexName":"string","description":"string","author":0,"enabled":true,"sources":{"indices":[{"indexId":"string","minPopularity":5,"minHits":1,"minLetters":2,"daysInterval":30,"validate":false}],"external":[{"query":"string","count":0}],"generate":[{"itemsCatalogId":"string","attributes":["string"]}]},"denylist":[{"pattern":"string","matchingType":"Phrase"}]}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.put("https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"indexName\":\"string\",\"description\":\"string\",\"author\":0,\"enabled\":true,\"sources\":{\"indices\":[{\"indexId\":\"string\",\"minPopularity\":5,\"minHits\":1,\"minLetters\":2,\"daysInterval\":30,\"validate\":false}],\"external\":[{\"query\":\"string\",\"count\":0}],\"generate\":[{\"itemsCatalogId\":\"string\",\"attributes\":[\"string\"]}]},\"denylist\":[{\"pattern\":\"string\",\"matchingType\":\"Phrase\"}]}")
              .asString();
    delete:
      summary: Delete suggestion index
      description: |
        Delete a suggestion index configuration.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_DELETE`

        **User role permission required:** `assets_search: delete`
      operationId: DeleteSuggestionIndexConfig
      tags:
        - Suggestions Configuration
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-config-InPathIndexId"
      responses:
        "204":
          description: Suggestion index config deleted
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Suggestions-Configuration/operation/DeleteSuggestionIndexConfig
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("DELETE", "/search/v2/suggestion-indices/%7BindexId%7D/config", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("DELETE", "https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/suggestion-indices/%7BindexId%7D/config",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/suggestion-indices/{indexId}/state:
    get:
      summary: Get suggestion index state
      description: |
        Retrieve the state of a single suggestion index.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_READ`

        **User role permission required:** `assets_search: read`
      operationId: GetSuggestionsIndexState
      tags:
        - Suggestions Configuration
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-config-InPathIndexId"
      responses:
        "200":
          description: Suggestion index state
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-IndexStateResponseSchema"
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Suggestions-Configuration/operation/GetSuggestionsIndexState
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/state \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/suggestion-indices/%7BindexId%7D/state", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/state");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/suggestion-indices/%7BindexId%7D/state",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/state');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/state")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/indices/{indexId}/deleted-searches:
    get:
      summary: Get deleted searches
      description: |
        Retrieve the searches deleted from a profile's history.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>

        **API key permission required:** `ITEMS_SEARCH_RECENT_SEARCH_READ`
      operationId: GetDeletedSearches
      tags:
        - Search
      security:
        - JWT: []
        - TrackerKey: []
      parameters:
        - $ref: "#/components/parameters/items-search-recent-indexId"
        - $ref: "#/components/parameters/items-search-recent-clientUUID"
      responses:
        "200":
          description: Deleted searches returned
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/items-search-recent-DeletedSearch"
        "400":
          description: Check error message for more details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-recent-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search/operation/GetDeletedSearches
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'clientUUID' => 'e0097757-d1e2-44ac-ba3c-d97979a354c1'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Soft-delete a recent search
      description: |
        Delete a recent search from the history accessible to a profile. The search remains in the database and you can retrieve it by using [this endpoint](#operation/GetDeletedSearches).

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>

        **API key permission required:** `ITEMS_SEARCH_RECENT_SEARCH_CREATE`
      operationId: PostDeletedSearch
      tags:
        - Search
      security:
        - JWT: []
        - TrackerKey: []
      parameters:
        - $ref: "#/components/parameters/items-search-recent-indexId"
        - $ref: "#/components/parameters/items-search-recent-clientUUID"
      requestBody:
        description: Request for deleting search query
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/items-search-recent-DeletedSearch"
      responses:
        "204":
          description: Soft-delete successful
        "400":
          description: Check error message for more details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-recent-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search/operation/PostDeletedSearch
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"query":"string","match":"query","timestamp":"2019-08-24T14:15:22Z"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"query\":\"string\",\"match\":\"query\",\"timestamp\":\"2019-08-24T14:15:22Z\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "query": "string",
              "match": "query",
              "timestamp": "2019-08-24T14:15:22Z"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({query: 'string', match: 'query', timestamp: '2019-08-24T14:15:22Z'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches');
            $request->setMethod(HTTP_METH_POST);

            $request->setQueryData([
              'clientUUID' => 'e0097757-d1e2-44ac-ba3c-d97979a354c1'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"query":"string","match":"query","timestamp":"2019-08-24T14:15:22Z"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"query\":\"string\",\"match\":\"query\",\"timestamp\":\"2019-08-24T14:15:22Z\"}")
              .asString();
  /search/v2/indices/{indexId}/recent-searches:
    get:
      summary: Get recent searches
      description: |
        Get a profile's recent searches from a particular index.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>

        **API key permission required:** `ITEMS_SEARCH_RECENT_SEARCH_READ`
      operationId: GetRecentSearches
      tags:
        - Search
      security:
        - JWT: []
        - TrackerKey: []
      parameters:
        - $ref: "#/components/parameters/items-search-recent-indexId"
        - $ref: "#/components/parameters/items-search-recent-clientUUID"
        - $ref: "#/components/parameters/items-search-recent-windowSize"
        - $ref: "#/components/parameters/items-search-recent-timeUnit"
        - $ref: "#/components/parameters/items-search-recent-timeValue"
      responses:
        "200":
          description: Recent searches returned
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
                  description: Recent search query
        "400":
          description: Check error message for more details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-recent-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search/operation/GetRecentSearches
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/recent-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1&windowSize=SOME_INTEGER_VALUE&timeUnit=SOME_STRING_VALUE&timeValue=SOME_INTEGER_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/recent-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1&windowSize=SOME_INTEGER_VALUE&timeUnit=SOME_STRING_VALUE&timeValue=SOME_INTEGER_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/recent-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1&windowSize=SOME_INTEGER_VALUE&timeUnit=SOME_STRING_VALUE&timeValue=SOME_INTEGER_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/recent-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1&windowSize=SOME_INTEGER_VALUE&timeUnit=SOME_STRING_VALUE&timeValue=SOME_INTEGER_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/recent-searches');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'clientUUID' => 'e0097757-d1e2-44ac-ba3c-d97979a354c1',
              'windowSize' => 'SOME_INTEGER_VALUE',
              'timeUnit' => 'SOME_STRING_VALUE',
              'timeValue' => 'SOME_INTEGER_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/recent-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1&windowSize=SOME_INTEGER_VALUE&timeUnit=SOME_STRING_VALUE&timeValue=SOME_INTEGER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /metrics/v2/available:
    get:
      summary: Check available metrics (recommendations)
      description: |
        Returns metrics available for the Workspace. The metrics can be used when defining boostMetric and sortMetric query parameters in recommendations and in metric-based recommendations.

        ---

        **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:** `METRICS_RECOMMENDATIONS_READ`

        **User role permission required:** `campaigns_recommendations: read`
      operationId: ApiGetAvailableMetricsV2
      tags:
        - "AI: Metrics"
      security:
        - JWT: []
      responses:
        "200":
          description: Available metrics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/metrics-AvailableMetrics"
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/metrics-Error"
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/AI:-Metrics/operation/ApiGetAvailableMetricsV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/metrics/v2/available \
              --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", "/metrics/v2/available", 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/metrics/v2/available");
            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": "/metrics/v2/available",
              "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/metrics/v2/available');
            $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/metrics/v2/available")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /metrics/v2/available-ids:
    get:
      summary: Retrieve IDs of available metrics (recommendations)
      description: |
        Returns IDs of metrics that are available for the Workspace. The metrics can be used when defining boostMetric and sortMetric query parameters in recommendations and in metric-based recommendations.

        ---

        **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:** `METRICS_RECOMMENDATIONS_READ`

        **User role permission required:** `campaigns_recommendations: read`
      operationId: ApiGetAvailableMetricsIdsV2
      tags:
        - "AI: Metrics"
      security:
        - JWT: []
      responses:
        "200":
          description: IDs of available metrics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/metrics-AvailableMetricsIds"
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/metrics-Error"
      x-snr-doc-urls:
        - /api-reference/analytics-suite#tag/AI:-Metrics/operation/ApiGetAvailableMetricsIdsV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/metrics/v2/available-ids \
              --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", "/metrics/v2/available-ids", 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/metrics/v2/available-ids");
            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": "/metrics/v2/available-ids",
              "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/metrics/v2/available-ids');
            $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/metrics/v2/available-ids")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /morph/logs/automation/{automationWorkflowId}/last-run/with-stages:
    get:
      tags:
        - Data Processing Job Logs
      operationId: getExtendedInfoAboutLastRun
      summary: Get last log with stages
      description: |
        
        Retrieve the status of a workflow's last run and its stages.

        The workflow must contain at least one of the following nodes:
        - Any Data Transformation node
        - Any node that pulls data into a workflow (for example local file, SFTP, Azure Blob Storage)
        - Any node that pushes data out of the workflow (for example SFTP, Pub/Sub)
        - Any node that imports data into Synerise


        ---

        **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:** `MORPH_JOBS_READ`

        **User role permission required:** `automation_2_journeys: read`
      parameters:
        - name: automationWorkflowId
          in: path
          required: true
          description: "`diagramId` of the workflow to fetch last job from"
          schema:
            type: string
            format: uuid
        - $ref: "#/components/parameters/morph-LogsLimitInQuery"
      responses:
        "200":
          description: Information about last data transformation journey status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/morph-DtDiagramLastRunResponse"
        "401":
          $ref: "#/components/responses/morph-401"
        "403":
          $ref: "#/components/responses/morph-403"
        "404":
          description: |
            - workflow doesn't exist; 
            - no journeys exist for a workflow; 
            - workflow doesn't contain any of the required nodes (returns a "no journeys found" error)
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/morph-HttpErrorDetails"
              example:
                error: Not found
                status: 404
                timestamp: 2023-09-06T11:54:08.564Z
                message: No journeys for diagram fe7e3a80-91bb-433a-94cf-744253cc442c found
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/automation#tag/Data-Processing-Job-Logs/operation/getExtendedInfoAboutLastRun
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/morph/logs/automation/%7BautomationWorkflowId%7D/last-run/with-stages?limit=SOME_NUMBER_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/morph/logs/automation/%7BautomationWorkflowId%7D/last-run/with-stages?limit=SOME_NUMBER_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/morph/logs/automation/%7BautomationWorkflowId%7D/last-run/with-stages?limit=SOME_NUMBER_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/morph/logs/automation/%7BautomationWorkflowId%7D/last-run/with-stages?limit=SOME_NUMBER_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/morph/logs/automation/%7BautomationWorkflowId%7D/last-run/with-stages');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'limit' => 'SOME_NUMBER_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/morph/logs/automation/%7BautomationWorkflowId%7D/last-run/with-stages?limit=SOME_NUMBER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /morph/exports/clients/segmentation:
    post:
      tags:
        - Profile management
      operationId: runProfileExport
      summary: Create and run profile export
      description: |
        Request an export of profiles. The group of profiles to export is selected by pointing to a segmentation. After the export is completed, you can access the data with [GET /exports/clients/{taskId}/data](#operation/getExportedProfileData) or from [https://app.synerise.com/assets/exports](https://app.synerise.com/assets/exports).

        ---

        **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:** `CLIENT_EXPORTER_REPORT_CREATE`

        **User role permission required:** `settings_export: create`
      security:
        - JWT: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/morph-NewProfileExport"
      responses:
        "200":
          description: Export task created and queued
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/morph-ExportResponse"
        "400":
          $ref: "#/components/responses/morph-BadRequest"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/runProfileExport
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/morph/exports/clients/segmentation \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"string","fields":["id","attr1","attr2"],"agreementFilter":"NONE","segmentationHash":"e7cff342-b484-4fcb-aa34-4735122bc9e7","tags":["string"],"expressions":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"aggregates":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"segmentations":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"excludedIds":[0]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"name\":\"string\",\"fields\":[\"id\",\"attr1\",\"attr2\"],\"agreementFilter\":\"NONE\",\"segmentationHash\":\"e7cff342-b484-4fcb-aa34-4735122bc9e7\",\"tags\":[\"string\"],\"expressions\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"aggregates\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"segmentations\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"excludedIds\":[0]}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/morph/exports/clients/segmentation", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "name": "string",
              "fields": [
                "id",
                "attr1",
                "attr2"
              ],
              "agreementFilter": "NONE",
              "segmentationHash": "e7cff342-b484-4fcb-aa34-4735122bc9e7",
              "tags": [
                "string"
              ],
              "expressions": [
                "497f6eca-6276-4993-bfeb-53cbbbba6f08"
              ],
              "aggregates": [
                "497f6eca-6276-4993-bfeb-53cbbbba6f08"
              ],
              "segmentations": [
                "497f6eca-6276-4993-bfeb-53cbbbba6f08"
              ],
              "excludedIds": [
                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/morph/exports/clients/segmentation");
            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": "/morph/exports/clients/segmentation",
              "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',
              fields: ['id', 'attr1', 'attr2'],
              agreementFilter: 'NONE',
              segmentationHash: 'e7cff342-b484-4fcb-aa34-4735122bc9e7',
              tags: ['string'],
              expressions: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],
              aggregates: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],
              segmentations: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],
              excludedIds: [0]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/morph/exports/clients/segmentation');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"name":"string","fields":["id","attr1","attr2"],"agreementFilter":"NONE","segmentationHash":"e7cff342-b484-4fcb-aa34-4735122bc9e7","tags":["string"],"expressions":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"aggregates":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"segmentations":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"excludedIds":[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/morph/exports/clients/segmentation")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\",\"fields\":[\"id\",\"attr1\",\"attr2\"],\"agreementFilter\":\"NONE\",\"segmentationHash\":\"e7cff342-b484-4fcb-aa34-4735122bc9e7\",\"tags\":[\"string\"],\"expressions\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"aggregates\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"segmentations\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"excludedIds\":[0]}")
              .asString();
  /morph/exports/clients/{taskId}/status:
    get:
      tags:
        - Profile management
      operationId: getProfileExportStatus
      summary: Check profile export status
      description: |
        After creating an export with [POST /exports/clients/segmentation](#operation/runProfileExport), you can check its status. When the export is ready, you can access the data with [GET /exports/clients/{taskId}/data](#operation/getExportedProfileData).

        ---

        **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:** `CLIENT_EXPORTER_REPORT_CREATE`

        **User role permission required:** `settings_export: create`
      security:
        - JWT: []
      parameters:
        - name: taskId
          in: path
          required: true
          description: Unique ID of the export task
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: Status of the export task
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/morph-JobStatus"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/getProfileExportStatus
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/morph/exports/clients/%7BtaskId%7D/status \
              --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", "/morph/exports/clients/%7BtaskId%7D/status", 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/morph/exports/clients/%7BtaskId%7D/status");
            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": "/morph/exports/clients/%7BtaskId%7D/status",
              "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/morph/exports/clients/%7BtaskId%7D/status');
            $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/morph/exports/clients/%7BtaskId%7D/status")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /morph/exports/clients/{taskId}/data:
    get:
      tags:
        - Profile management
      operationId: getExportedProfileData
      summary: Get exported profiles
      description: |
        Get exported profiles as a list. To create the export, use [POST /exports/clients/segmentation](#operation/runProfileExport).

        **Tip**: If you want to download a CSV, JSON, or JSONL, find your export in [https://app.synerise.com/assets/exports](https://app.synerise.com/assets/exports).


        ---

        **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:** `CLIENT_EXPORTER_REPORT_CREATE`

        **User role permission required:** `settings_export: create`
      security:
        - JWT: []
      parameters:
        - name: taskId
          in: path
          required: true
          description: Unique ID of the export task
          schema:
            type: string
            format: uuid
        - name: offset
          in: query
          required: true
          description: The index of the first record to retrieve. Use this to paginate the exported data.
          schema:
            type: number
            minimum: 0
        - name: limit
          in: query
          required: true
          description: The number of records to retrieve. Use this to paginate the exported data.
          schema:
            type: integer
            minimum: 1
      responses:
        "200":
          description: Exported profile data
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  example:
                    id: "1234"
                    exampleAttribute: foo
                    exampleTag: "true"
                    exampleExpression: "23"
                    exampleAggregate: "74"
                    exampleSegmentation: "false"
                  additionalProperties:
                    type: string
                    description: |
                      - Profile attributes are key/value pairs.
                      - Tags are key/value pairs, where the key is the name of the tag and the value is "true" (string) if the tag is assigned to the profile.
                      - Expressions are key/value pairs, where the key is the name of the expression and the value is the result of the expression.
                      - Aggregates are key/value pairs, where the key is the name of the aggregate and the value is the result of the aggregate.
                      - Segmentations are key/value pairs, where the key is the name of the segmentation, and the value is "true" (string) if the profile belongs to the segmentation.
        "400":
          $ref: "#/components/responses/morph-BadRequest"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/getExportedProfileData
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/morph/exports/clients/%7BtaskId%7D/data?offset=SOME_NUMBER_VALUE&limit=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", "/morph/exports/clients/%7BtaskId%7D/data?offset=SOME_NUMBER_VALUE&limit=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/morph/exports/clients/%7BtaskId%7D/data?offset=SOME_NUMBER_VALUE&limit=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": "/morph/exports/clients/%7BtaskId%7D/data?offset=SOME_NUMBER_VALUE&limit=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/morph/exports/clients/%7BtaskId%7D/data');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'offset' => 'SOME_NUMBER_VALUE',
              'limit' => '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/morph/exports/clients/%7BtaskId%7D/data?offset=SOME_NUMBER_VALUE&limit=SOME_INTEGER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /notes-service/by-id/{clientId}:
    get:
      tags:
        - Profile management
      summary: Get all Profile notes
      description: |
        Retrieve all notes associated with a single profile.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `client_notes: read`
      operationId: getAllNotesUsingGET
      parameters:
        - $ref: "#/components/parameters/notes-service-profileId"
      responses:
        "200":
          description: An array of notes
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/notes-service-NoteResponse"
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/getAllNotesUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/notes-service/by-id/%7BclientId%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", "/notes-service/by-id/%7BclientId%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/notes-service/by-id/%7BclientId%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": "/notes-service/by-id/%7BclientId%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/notes-service/by-id/%7BclientId%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/notes-service/by-id/%7BclientId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - Profile management
      summary: Create a note
      description: |
        Create a new note in the profile

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `client_notes: create`
      operationId: createNoteUsingPOST
      parameters:
        - $ref: "#/components/parameters/notes-service-profileId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/notes-service-NoteRequest"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/notes-service-NoteResponse"
        "201":
          description: Created
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/createNoteUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/notes-service/by-id/%7BclientId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"subject":"Note 1","body":"<h1>NOTE 1</h1>\\n<p>Some text</p>\\n<ul>\\n<li>1</li>\\n<li>2</li>\\n<li>3</li>\\n</ul>\\n<blockquote>Lorem ipsum in quote</blockquote>\\n<p><strong>Lorem ipsum in bold</strong></p>\\n"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"subject\":\"Note 1\",\"body\":\"<h1>NOTE 1</h1>\\\\n<p>Some text</p>\\\\n<ul>\\\\n<li>1</li>\\\\n<li>2</li>\\\\n<li>3</li>\\\\n</ul>\\\\n<blockquote>Lorem ipsum in quote</blockquote>\\\\n<p><strong>Lorem ipsum in bold</strong></p>\\\\n\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/notes-service/by-id/%7BclientId%7D", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "subject": "Note 1",
              "body": "<h1>NOTE 1</h1>\\n<p>Some text</p>\\n<ul>\\n<li>1</li>\\n<li>2</li>\\n<li>3</li>\\n</ul>\\n<blockquote>Lorem ipsum in quote</blockquote>\\n<p><strong>Lorem ipsum in bold</strong></p>\\n"
            });

            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/notes-service/by-id/%7BclientId%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": "/notes-service/by-id/%7BclientId%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({
              subject: 'Note 1',
              body: '<h1>NOTE 1</h1>\n<p>Some text</p>\n<ul>\n<li>1</li>\n<li>2</li>\n<li>3</li>\n</ul>\n<blockquote>Lorem ipsum in quote</blockquote>\n<p><strong>Lorem ipsum in bold</strong></p>\n'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/notes-service/by-id/%7BclientId%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"subject":"Note 1","body":"<h1>NOTE 1</h1>\\\\n<p>Some text</p>\\\\n<ul>\\\\n<li>1</li>\\\\n<li>2</li>\\\\n<li>3</li>\\\\n</ul>\\\\n<blockquote>Lorem ipsum in quote</blockquote>\\\\n<p><strong>Lorem ipsum in bold</strong></p>\\\\n"}');

            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/notes-service/by-id/%7BclientId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"subject\":\"Note 1\",\"body\":\"<h1>NOTE 1</h1>\\\\n<p>Some text</p>\\\\n<ul>\\\\n<li>1</li>\\\\n<li>2</li>\\\\n<li>3</li>\\\\n</ul>\\\\n<blockquote>Lorem ipsum in quote</blockquote>\\\\n<p><strong>Lorem ipsum in bold</strong></p>\\\\n\"}")
              .asString();
  /notes-service/by-id/{clientId}/{noteId}:
    get:
      tags:
        - Profile management
      summary: Get note
      description: |
        Retrieve a single note

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `client_notes: read`
      operationId: getNoteUsingGET
      parameters:
        - $ref: "#/components/parameters/notes-service-profileId"
        - name: noteId
          in: path
          description: Note UUID
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/notes-service-NoteResponse"
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/getNoteUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/notes-service/by-id/%7BclientId%7D/%7BnoteId%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", "/notes-service/by-id/%7BclientId%7D/%7BnoteId%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/notes-service/by-id/%7BclientId%7D/%7BnoteId%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": "/notes-service/by-id/%7BclientId%7D/%7BnoteId%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/notes-service/by-id/%7BclientId%7D/%7BnoteId%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/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    put:
      tags:
        - Profile management
      summary: Update note
      description: |
        You can update an existing note.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `client_notes: update`
      operationId: updateNoteUsingPUT
      parameters:
        - name: clientId
          in: path
          required: true
          description: Profile ID
          schema:
            type: integer
            format: int64
        - name: noteId
          in: path
          description: Note UUID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/notes-service-NoteRequest"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/notes-service-NoteResponse"
        "201":
          description: Created
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/updateNoteUsingPUT
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"subject":"Note 1","body":"<h1>NOTE 1</h1>\\n<p>Some text</p>\\n<ul>\\n<li>1</li>\\n<li>2</li>\\n<li>3</li>\\n</ul>\\n<blockquote>Lorem ipsum in quote</blockquote>\\n<p><strong>Lorem ipsum in bold</strong></p>\\n"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"subject\":\"Note 1\",\"body\":\"<h1>NOTE 1</h1>\\\\n<p>Some text</p>\\\\n<ul>\\\\n<li>1</li>\\\\n<li>2</li>\\\\n<li>3</li>\\\\n</ul>\\\\n<blockquote>Lorem ipsum in quote</blockquote>\\\\n<p><strong>Lorem ipsum in bold</strong></p>\\\\n\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("PUT", "/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "subject": "Note 1",
              "body": "<h1>NOTE 1</h1>\\n<p>Some text</p>\\n<ul>\\n<li>1</li>\\n<li>2</li>\\n<li>3</li>\\n</ul>\\n<blockquote>Lorem ipsum in quote</blockquote>\\n<p><strong>Lorem ipsum in bold</strong></p>\\n"
            });

            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/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/notes-service/by-id/%7BclientId%7D/%7BnoteId%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({
              subject: 'Note 1',
              body: '<h1>NOTE 1</h1>\n<p>Some text</p>\n<ul>\n<li>1</li>\n<li>2</li>\n<li>3</li>\n</ul>\n<blockquote>Lorem ipsum in quote</blockquote>\n<p><strong>Lorem ipsum in bold</strong></p>\n'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"subject":"Note 1","body":"<h1>NOTE 1</h1>\\\\n<p>Some text</p>\\\\n<ul>\\\\n<li>1</li>\\\\n<li>2</li>\\\\n<li>3</li>\\\\n</ul>\\\\n<blockquote>Lorem ipsum in quote</blockquote>\\\\n<p><strong>Lorem ipsum in bold</strong></p>\\\\n"}');

            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/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"subject\":\"Note 1\",\"body\":\"<h1>NOTE 1</h1>\\\\n<p>Some text</p>\\\\n<ul>\\\\n<li>1</li>\\\\n<li>2</li>\\\\n<li>3</li>\\\\n</ul>\\\\n<blockquote>Lorem ipsum in quote</blockquote>\\\\n<p><strong>Lorem ipsum in bold</strong></p>\\\\n\"}")
              .asString();
    delete:
      tags:
        - Profile management
      summary: Delete note
      description: |
        You can delete a note. 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:** `client_notes: delete`
      operationId: deleteNoteUsingDELETE
      parameters:
        - $ref: "#/components/parameters/notes-service-profileId"
        - name: noteId
          in: path
          description: Note UUID
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
        "204":
          description: No Content
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/deleteNoteUsingDELETE
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/notes-service/by-id/%7BclientId%7D/%7BnoteId%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", "/notes-service/by-id/%7BclientId%7D/%7BnoteId%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/notes-service/by-id/%7BclientId%7D/%7BnoteId%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": "/notes-service/by-id/%7BclientId%7D/%7BnoteId%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/notes-service/by-id/%7BclientId%7D/%7BnoteId%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/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/promotion/get-for-client:
    get:
      tags:
        - Promotions
      summary: Get a Profile's promotions as Profile
      description: |
        A Profile can retrieve a list of all its promotions, assigned or activated. By default, only non-expired promotions are retrieved.

        **IMPORTANT**: 
        - As a result of this request, the `targetSegments` of all the matching promotions are checked. If this results in checking more than 30 unique segments, any segments above this limit may be ignored.
        - The endpoint is limited to 25000 requests per minute (per workspace).


        ---

        **API consumers:** <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>
      operationId: GetAClientsPromotions
      parameters:
        - $ref: "#/components/parameters/promotions-queryPromotionSort"
        - $ref: "#/components/parameters/promotions-queryPromotionStatus"
        - $ref: "#/components/parameters/promotions-queryPromotionPresentOnly"
        - $ref: "#/components/parameters/promotions-queryPromotionDisplayableOnly"
        - $ref: "#/components/parameters/promotions-queryTagNames"
        - $ref: "#/components/parameters/promotions-queryLimit"
        - $ref: "#/components/parameters/promotions-queryPage"
        - $ref: "#/components/parameters/promotions-queryIncludeMeta"
        - $ref: "#/components/parameters/promotions-queryCheckGlobalActivationLimits"
        - $ref: "#/components/parameters/promotions-queryIncludeVouchers"
        - $ref: "#/components/parameters/promotions-queryStoreIds"
      responses:
        "200":
          description: An array of promotions
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/promotions-promotionClientDataResponse"
                    description: An array of promotions
                  meta:
                    $ref: "#/components/schemas/promotions-responseMeta"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/GetAClientsPromotions
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/promotions/promotion/get-for-client?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=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", "/v4/promotions/promotion/get-for-client?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=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/v4/promotions/promotion/get-for-client?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=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": "/v4/promotions/promotion/get-for-client?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=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/v4/promotions/promotion/get-for-client');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'sort' => 'requireRedeemedPoints,desc',
              'status' => 'SOME_ARRAY_VALUE',
              'presentOnly' => 'true',
              'displayableOnly' => 'true',
              'tagNames' => 'SOME_ARRAY_VALUE',
              'limit' => '100',
              'page' => '4',
              'includeMeta' => 'false',
              'checkGlobalActivationLimits' => 'true',
              'includeVouchers' => 'false',
              'storeIds' => '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/v4/promotions/promotion/get-for-client?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/promotion/duplicate:
    post:
      tags:
        - Promotions
      summary: Duplicate existing promotion
      description: |
        You can duplicate an existing promotion.

        ---

        **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:** `PROMOTIONS_DUPLICATE_PROMOTIONS_CREATE`

        **User role permission required:** `campaigns_promotions: create`
      operationId: duplicatePromotion
      requestBody:
        required: true
        description: Provide only one of the parameters.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-duplicatePromotionRequest"
      responses:
        "200":
          description: Promotion duplicated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-promotionDataResponse"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          description: Promotion not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Promotion not found
        "500":
          description: Internal Server Error
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/duplicatePromotion
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/promotion/duplicate \
              --header 'content-type: application/json' \
              --data '{"uuid":"string","code":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"uuid\":\"string\",\"code\":\"string\"}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/v4/promotions/promotion/duplicate", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "uuid": "string",
              "code": "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/v4/promotions/promotion/duplicate");
            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": "/v4/promotions/promotion/duplicate",
              "headers": {
                "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({uuid: 'string', code: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/duplicate');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"uuid":"string","code":"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/v4/promotions/promotion/duplicate")
              .header("content-type", "application/json")
              .body("{\"uuid\":\"string\",\"code\":\"string\"}")
              .asString();
  /v4/promotions/promotion/activate:
    post:
      tags:
        - Promotions
      summary: Activate a promotion
      description: |
        A Profile can change the status of a promotion from `assigned` to `active`, the promotion can now be applied to a purchase.

        ---

        **API consumers:** <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>
      operationId: ActivateAPromotion
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-promotionActivation"
        required: true
      responses:
        "200":
          description: Promotion activated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-promotionClientDataResponse"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          $ref: "#/components/responses/promotions-Promotion404"
        "409":
          $ref: "#/components/responses/promotions-WaitingForProfileLockReleaseError"
        "412":
          $ref: "#/components/responses/promotions-PromotionActivate412"
        "422":
          $ref: "#/components/responses/promotions-PromotionActivate422"
        "423":
          $ref: "#/components/responses/promotions-ProfilePromotionsBlockedError"
        "500":
          $ref: "#/components/responses/promotions-500"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/ActivateAPromotion
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/promotion/activate \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"key":"code","value":"7893467834GG","pointsToUse":100}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/promotions/promotion/activate", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "key": "code",
              "value": "7893467834GG",
              "pointsToUse": 100
            });

            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/v4/promotions/promotion/activate");
            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": "/v4/promotions/promotion/activate",
              "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({key: 'code', value: '7893467834GG', pointsToUse: 100}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/activate');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"key":"code","value":"7893467834GG","pointsToUse":100}');

            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/v4/promotions/promotion/activate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}")
              .asString();
  /v4/promotions/promotion/batch-activate:
    post:
      tags:
        - Promotions
      summary: Batch activate promotions
      description: |
        A Profile can change the status of a number of promotions from `assigned` to `active`, the promotion can now be applied to a purchase.

        ---

        **API consumers:** <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>
      operationId: BatchActivate
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/promotions-promotionActivation"
        required: true
      responses:
        "200":
          description: Promotions activated
          content:
            application/json:
              schema:
                type: object
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          $ref: "#/components/responses/promotions-Promotion404"
        "409":
          $ref: "#/components/responses/promotions-WaitingForProfileLockReleaseError"
        "412":
          $ref: "#/components/responses/promotions-PromotionActivate412"
        "423":
          $ref: "#/components/responses/promotions-ProfilePromotionsBlockedError"
        "500":
          $ref: "#/components/responses/promotions-500"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/BatchActivate
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/promotion/batch-activate \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '[{"key":"code","value":"7893467834GG","pointsToUse":100}]'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/promotions/promotion/batch-activate", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              {
                "key": "code",
                "value": "7893467834GG",
                "pointsToUse": 100
              }
            ]);

            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/v4/promotions/promotion/batch-activate");
            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": "/v4/promotions/promotion/batch-activate",
              "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([{key: 'code', value: '7893467834GG', pointsToUse: 100}]));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/batch-activate');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('[{"key":"code","value":"7893467834GG","pointsToUse":100}]');

            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/v4/promotions/promotion/batch-activate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]")
              .asString();
  /v4/promotions/promotion/deactivate:
    post:
      tags:
        - Promotions
      summary: Deactivate a promotion
      description: |
        A Profile can change the status of an activated promotion back to `assigned`.

        ---

        **API consumers:** <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>
      operationId: DeactivateAPromotion
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-promotionActivation"
        required: true
      responses:
        "200":
          description: Promotion deactivated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-promotionClientDataResponse"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-PromotionDeactivationForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Promotion for profile not found
        "429":
          $ref: "#/components/responses/promotions-WaitingForProfileLockReleaseError"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/DeactivateAPromotion
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/promotion/deactivate \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"key":"code","value":"7893467834GG","pointsToUse":100}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/promotions/promotion/deactivate", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "key": "code",
              "value": "7893467834GG",
              "pointsToUse": 100
            });

            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/v4/promotions/promotion/deactivate");
            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": "/v4/promotions/promotion/deactivate",
              "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({key: 'code', value: '7893467834GG', pointsToUse: 100}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/deactivate');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"key":"code","value":"7893467834GG","pointsToUse":100}');

            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/v4/promotions/promotion/deactivate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}")
              .asString();
  /v4/promotions/promotion/batch-deactivate:
    post:
      tags:
        - Promotions
      summary: Batch deactivate promotions
      description: |
        A Profile can change the status of a number of activated promotions back to `assigned`.

        ---

        **API consumers:** <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>
      operationId: BatchDeactivate
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/promotions-promotionActivation"
        required: true
      responses:
        "200":
          description: Promotions deactivated
          content:
            application/json:
              schema:
                type: object
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Promotions for profile not found
        "429":
          $ref: "#/components/responses/promotions-WaitingForProfileLockReleaseError"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/BatchDeactivate
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/promotion/batch-deactivate \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '[{"key":"code","value":"7893467834GG","pointsToUse":100}]'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/promotions/promotion/batch-deactivate", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              {
                "key": "code",
                "value": "7893467834GG",
                "pointsToUse": 100
              }
            ]);

            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/v4/promotions/promotion/batch-deactivate");
            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": "/v4/promotions/promotion/batch-deactivate",
              "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([{key: 'code', value: '7893467834GG', pointsToUse: 100}]));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/batch-deactivate');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('[{"key":"code","value":"7893467834GG","pointsToUse":100}]');

            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/v4/promotions/promotion/batch-deactivate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]")
              .asString();
  /v4/promotions/promotion/deactivate-all-for-client/{identifierType}/{identifierValue}:
    post:
      tags:
        - Promotions
      summary: Deactivate all promotions for a Profile as Workspace
      description: |
        You can deactivate all promotions assigned to a Profile.

        ---

        **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:** `PROMOTIONS_DEACTIVATE_PROMOTIONS_UPDATE`

        **User role permission required:** `campaigns_promotions: update`
      operationId: deactivateAllPromotions
      parameters:
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
        - $ref: "#/components/parameters/promotions-queryReturnCodes"
        - $ref: "#/components/parameters/promotions-queryLockPoints"
        - $ref: "#/components/parameters/promotions-queryExcludeTag"
      responses:
        "200":
          description: All promotions deactivated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Profile not found
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/deactivateAllPromotions
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api.synerise.com/v4/promotions/promotion/deactivate-all-for-client/email/%7BidentifierValue%7D?returnCodes=true&lockPoints=true&excludeTags=SOME_ARRAY_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            conn.request("POST", "/v4/promotions/promotion/deactivate-all-for-client/email/%7BidentifierValue%7D?returnCodes=true&lockPoints=true&excludeTags=SOME_ARRAY_VALUE")

            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/v4/promotions/promotion/deactivate-all-for-client/email/%7BidentifierValue%7D?returnCodes=true&lockPoints=true&excludeTags=SOME_ARRAY_VALUE");

            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": "/v4/promotions/promotion/deactivate-all-for-client/email/%7BidentifierValue%7D?returnCodes=true&lockPoints=true&excludeTags=SOME_ARRAY_VALUE",
              "headers": {}
            };

            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/v4/promotions/promotion/deactivate-all-for-client/email/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setQueryData([
              'returnCodes' => 'true',
              'lockPoints' => 'true',
              'excludeTags' => 'SOME_ARRAY_VALUE'
            ]);

            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/v4/promotions/promotion/deactivate-all-for-client/email/%7BidentifierValue%7D?returnCodes=true&lockPoints=true&excludeTags=SOME_ARRAY_VALUE")
              .asString();
  /v4/promotions/promotion/redeem:
    post:
      tags:
        - Promotions
      summary: Redeem a promotion
      description: |
        You can redeem a promotion and loyalty points.

        ---

        **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:** `PROMOTIONS_REDEEM_PROMOTIONS_CREATE`

        **User role permission required:** `campaigns_promotions: create`
      operationId: RedeemAPromotion
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-RedeemPromotionsRequest"
        required: true
      responses:
        "201":
          description: Promotion redeemed successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Promotion redeemed successfully
        "209":
          description: Promotion is already redeemed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Promotion is already redeemed
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          description: Not found error
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: "#/components/schemas/promotions-ProfileNotFoundErrorV1"
                  - $ref: "#/components/schemas/promotions-PromotionNotFoundErrorV1"
        "409":
          $ref: "#/components/responses/promotions-WaitingForProfileLockReleaseError"
        "412":
          description: Unprocessable redemption
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: "#/components/schemas/promotions-PromotionNotActivatedErrorV1"
                  - $ref: "#/components/schemas/promotions-PromotionRedeemLimitExceededErrorV1"
                  - $ref: "#/components/schemas/promotions-PromotionAlreadyRedeemedErrorV1"
        "423":
          $ref: "#/components/responses/promotions-ProfilePromotionsBlockedError"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/RedeemAPromotion
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/promotion/redeem \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"code":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9","clientKey":"clientId","clientKeyValue":"434428563"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"code\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\",\"clientKey\":\"clientId\",\"clientKeyValue\":\"434428563\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/promotions/promotion/redeem", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "code": "75d9090f-06ac-46a2-a0ce-4b8eb287efb9",
              "clientKey": "clientId",
              "clientKeyValue": "434428563"
            });

            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/v4/promotions/promotion/redeem");
            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": "/v4/promotions/promotion/redeem",
              "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({
              code: '75d9090f-06ac-46a2-a0ce-4b8eb287efb9',
              clientKey: 'clientId',
              clientKeyValue: '434428563'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/redeem');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"code":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9","clientKey":"clientId","clientKeyValue":"434428563"}');

            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/v4/promotions/promotion/redeem")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"code\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\",\"clientKey\":\"clientId\",\"clientKeyValue\":\"434428563\"}")
              .asString();
  /v4/promotions/promotion/batch-redeem:
    post:
      tags:
        - Promotions
      summary: Batch redeem promotions
      description: |
        You can redeem up to 100 promotions and loyalty points relevant to them.

        ---

        **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:** `PROMOTIONS_BATCH_REDEEM_PROMOTIONS_CREATE`

        **User role permission required:** `campaigns_promotions: create`
      operationId: BatchRedeemPromotions
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/promotions-RedeemPromotionsRequest"
        required: true
      responses:
        "201":
          description: Promotion redeemed successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Promotion redeemed successfully
        "209":
          description: Promotion is already redeemed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Promotion is already redeemed
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          description: Not found error
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: "#/components/schemas/promotions-ProfileNotFoundErrorV1"
                  - $ref: "#/components/schemas/promotions-PromotionNotFoundErrorV1"
        "409":
          $ref: "#/components/responses/promotions-WaitingForProfileLockReleaseError"
        "412":
          description: Unprocessable redemption
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: "#/components/schemas/promotions-PromotionNotActivatedErrorV1"
                  - $ref: "#/components/schemas/promotions-PromotionRedeemLimitExceededErrorV1"
                  - $ref: "#/components/schemas/promotions-PromotionAlreadyRedeemedErrorV1"
        "423":
          $ref: "#/components/responses/promotions-ProfilePromotionsBlockedError"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/BatchRedeemPromotions
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/promotion/batch-redeem \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '[{"code":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9","clientKey":"clientId","clientKeyValue":"434428563"}]'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "[{\"code\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\",\"clientKey\":\"clientId\",\"clientKeyValue\":\"434428563\"}]"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/promotions/promotion/batch-redeem", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              {
                "code": "75d9090f-06ac-46a2-a0ce-4b8eb287efb9",
                "clientKey": "clientId",
                "clientKeyValue": "434428563"
              }
            ]);

            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/v4/promotions/promotion/batch-redeem");
            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": "/v4/promotions/promotion/batch-redeem",
              "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([
              {
                code: '75d9090f-06ac-46a2-a0ce-4b8eb287efb9',
                clientKey: 'clientId',
                clientKeyValue: '434428563'
              }
            ]));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/batch-redeem');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('[{"code":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9","clientKey":"clientId","clientKeyValue":"434428563"}]');

            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/v4/promotions/promotion/batch-redeem")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[{\"code\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\",\"clientKey\":\"clientId\",\"clientKeyValue\":\"434428563\"}]")
              .asString();
  /v4/promotions/v2/promotion/get-for-client/{identifierType}/{identifierValue}:
    get:
      tags:
        - Promotions
      summary: Get a Profile's promotions as Workspace (v2)
      description: |
        A Workspace can retrieve a list of a profile's promotions. By default, only non-expired promotions are retrieved.

        **IMPORTANT**: 
        - As a result of this request, the `targetSegments` of all the matching promotions are checked. If this results in checking more than 30 unique segments, any segments above this limit may be ignored.
        - The endpoint is limited to 25000 requests per minute (per workspace).


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `PROMOTIONS_LIST_PROMOTIONS_READ`

        **User role permission required:** `campaigns_promotions: read`
      operationId: GetAllClientPromotionsV2
      parameters:
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
        - $ref: "#/components/parameters/promotions-queryPromotionSort"
        - $ref: "#/components/parameters/promotions-queryPromotionStatus"
        - $ref: "#/components/parameters/promotions-queryPromotionPresentOnly"
        - $ref: "#/components/parameters/promotions-queryPromotionDisplayableOnly"
        - $ref: "#/components/parameters/promotions-queryTagNames"
        - $ref: "#/components/parameters/promotions-queryLimit"
        - $ref: "#/components/parameters/promotions-queryPage"
        - $ref: "#/components/parameters/promotions-queryIncludeMeta"
        - $ref: "#/components/parameters/promotions-queryPromotionFields"
        - $ref: "#/components/parameters/promotions-queryPromotionUuids"
        - $ref: "#/components/parameters/promotions-queryCheckGlobalActivationLimits"
        - $ref: "#/components/parameters/promotions-queryIncludeVouchers"
        - $ref: "#/components/parameters/promotions-queryStoreIds"
      responses:
        "200":
          description: An array of promotions
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/promotions-promotionClientDataResponse"
                    description: An array of promotions
                  meta:
                    $ref: "#/components/schemas/promotions-responseMeta"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          $ref: "#/components/responses/promotions-ClientNotFoundError"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/GetAllClientPromotionsV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=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", "/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=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/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=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": "/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=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/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'sort' => 'requireRedeemedPoints,desc',
              'status' => 'SOME_ARRAY_VALUE',
              'presentOnly' => 'true',
              'displayableOnly' => 'true',
              'tagNames' => 'SOME_ARRAY_VALUE',
              'limit' => '100',
              'page' => '4',
              'includeMeta' => 'false',
              'fields' => 'uuid,requireRedeemedPoints,requireRedeemedPoints,possibleRedeems,status,currentRedeemedQuantity,lastingAt',
              'promotionUuids' => 'fc1ee5bf-ad97-47a8-a474-e1b6e755ff38,aabaed4e-4ee7-44d5-b079-445a017ec6fe',
              'checkGlobalActivationLimits' => 'true',
              'includeVouchers' => 'false',
              'storeIds' => '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/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/promotion/get-item-for-client/{identifierType}/{identifierValue}:
    get:
      tags:
        - Promotions
      summary: View promotion details as Profile
      description: |
        A Profile can view all the details of an assigned or activated promotion.

        ---

        **API consumers:** <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>

        **User role permission required:** `campaigns_promotions: read`
      operationId: ViewPromotionDetailsAsClient
      parameters:
        - $ref: "#/components/parameters/promotions-pathPromoIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
        - $ref: "#/components/parameters/promotions-queryLastingOnly"
      responses:
        "200":
          description: Details of a promotion
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/promotions-promotionClientDataResponse"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Object not found
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/ViewPromotionDetailsAsClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/promotions/promotion/get-item-for-client/%7BidentifierType%7D/%7BidentifierValue%7D?lastingOnly=true' \
              --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", "/v4/promotions/promotion/get-item-for-client/%7BidentifierType%7D/%7BidentifierValue%7D?lastingOnly=true", 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/v4/promotions/promotion/get-item-for-client/%7BidentifierType%7D/%7BidentifierValue%7D?lastingOnly=true");
            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": "/v4/promotions/promotion/get-item-for-client/%7BidentifierType%7D/%7BidentifierValue%7D?lastingOnly=true",
              "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/v4/promotions/promotion/get-item-for-client/%7BidentifierType%7D/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'lastingOnly' => 'true'
            ]);

            $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/v4/promotions/promotion/get-item-for-client/%7BidentifierType%7D/%7BidentifierValue%7D?lastingOnly=true")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/promotion/get-item-for-client-no-data/{identifierType}/{identifierValue}:
    get:
      tags:
        - Promotions
      summary: View promotion details as Profile
      description: |
        A Profile can view all the details of an assigned or activated promotion.

        ---

        **API consumers:** <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>

        **User role permission required:** `campaigns_promotions: read`
      operationId: ViewPromotionDetailsAsClientNoData
      parameters:
        - $ref: "#/components/parameters/promotions-pathPromoIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
      responses:
        "200":
          description: Details of a promotion
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/promotions-promotionClientDataResponse"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Object not found
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/ViewPromotionDetailsAsClientNoData
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/promotions/promotion/get-item-for-client-no-data/%7BidentifierType%7D/%7BidentifierValue%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", "/v4/promotions/promotion/get-item-for-client-no-data/%7BidentifierType%7D/%7BidentifierValue%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/v4/promotions/promotion/get-item-for-client-no-data/%7BidentifierType%7D/%7BidentifierValue%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": "/v4/promotions/promotion/get-item-for-client-no-data/%7BidentifierType%7D/%7BidentifierValue%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/v4/promotions/promotion/get-item-for-client-no-data/%7BidentifierType%7D/%7BidentifierValue%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/v4/promotions/promotion/get-item-for-client-no-data/%7BidentifierType%7D/%7BidentifierValue%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/promotion/list:
    get:
      tags:
        - Promotions
      summary: View Workspace promotions
      description: |
        You can retrieve a list of all promotions defined in your Workspaces. It includes configured promotions, ready to be used or already in use.

        ---

        **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:** `PROMOTIONS_LIST_PROMOTIONS_READ`

        **User role permission required:** `campaigns_promotions: read`
      operationId: ViewBusinessProfilePromotions
      parameters:
        - $ref: "#/components/parameters/promotions-queryLimit"
        - $ref: "#/components/parameters/promotions-queryPage"
        - $ref: "#/components/parameters/promotions-queryStoreCatalog"
        - $ref: "#/components/parameters/promotions-queryStoreIds"
        - $ref: "#/components/parameters/promotions-queryIncludeMeta"
        - $ref: "#/components/parameters/promotions-queryOrderFieldName"
        - $ref: "#/components/parameters/promotions-queryOrder"
        - $ref: "#/components/parameters/promotions-queryQuery"
        - $ref: "#/components/parameters/promotions-queryPromotionUuids"
        - $ref: "#/components/parameters/promotions-queryTargetByType"
      responses:
        "200":
          description: An array of promotions
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/promotions-promotionDataResponse"
                    description: An array of promotions
                  meta:
                    $ref: "#/components/schemas/promotions-responseMeta"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/ViewBusinessProfilePromotions
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/promotions/promotion/list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&targetByType=%5BSEGMENT%5D%3DACTIVE' \
              --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", "/v4/promotions/promotion/list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&targetByType=%5BSEGMENT%5D%3DACTIVE", 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/v4/promotions/promotion/list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&targetByType=%5BSEGMENT%5D%3DACTIVE");
            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": "/v4/promotions/promotion/list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&targetByType=%5BSEGMENT%5D%3DACTIVE",
              "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/v4/promotions/promotion/list');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'limit' => '100',
              'page' => '4',
              'storeCatalog' => 'SOME_STRING_VALUE',
              'storeIds' => 'SOME_STRING_VALUE',
              'includeMeta' => 'false',
              'orderFieldName' => 'SOME_STRING_VALUE',
              'order' => 'SOME_STRING_VALUE',
              'query' => 'SOME_STRING_VALUE',
              'promotionUuids' => 'fc1ee5bf-ad97-47a8-a474-e1b6e755ff38,aabaed4e-4ee7-44d5-b079-445a017ec6fe',
              'targetByType' => '[SEGMENT]=ACTIVE'
            ]);

            $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/v4/promotions/promotion/list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&targetByType=%5BSEGMENT%5D%3DACTIVE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/promotion/diff-list:
    get:
      tags:
        - Promotions
      summary: View recently updated promotions
      description: |
        You can retrieve a list of promotions that were updated. You can filter, sort, and paginate the results.

        ---

        **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:** `PROMOTIONS_DIFF_LIST_PROMOTIONS_READ`

        **User role permission required:** `campaigns_promotions: read`
      operationId: ViewBusinessProfilePromotionsDiff
      parameters:
        - $ref: "#/components/parameters/promotions-queryLimit"
        - $ref: "#/components/parameters/promotions-queryPage"
        - $ref: "#/components/parameters/promotions-queryStoreCatalog"
        - $ref: "#/components/parameters/promotions-queryStoreIds"
        - $ref: "#/components/parameters/promotions-queryTarget"
        - $ref: "#/components/parameters/promotions-queryIncludeMeta"
        - $ref: "#/components/parameters/promotions-queryPromotionPresentOnly"
        - $ref: "#/components/parameters/promotions-queryVisibilityStatus"
        - in: query
          name: upsertTimestamp
          description: Defines the date since which the differences are shown. If not defined, defaults to infinity.
          schema:
            type: string
            format: date-time
        - $ref: "#/components/parameters/promotions-queryOrderFieldName"
        - $ref: "#/components/parameters/promotions-queryOrder"
        - $ref: "#/components/parameters/promotions-queryQuery"
      responses:
        "200":
          description: An array of promotions. If a promotion was deleted, the `deletedAt` field is included
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/promotions-promotionDataResponse"
                    description: An array of promotions
                  meta:
                    $ref: "#/components/schemas/promotions-responseMeta"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/ViewBusinessProfilePromotionsDiff
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/promotions/promotion/diff-list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&target=SOME_ARRAY_VALUE&includeMeta=false&presentOnly=true&visibilityStatus=SOME_ARRAY_VALUE&upsertTimestamp=SOME_STRING_VALUE&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/v4/promotions/promotion/diff-list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&target=SOME_ARRAY_VALUE&includeMeta=false&presentOnly=true&visibilityStatus=SOME_ARRAY_VALUE&upsertTimestamp=SOME_STRING_VALUE&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/v4/promotions/promotion/diff-list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&target=SOME_ARRAY_VALUE&includeMeta=false&presentOnly=true&visibilityStatus=SOME_ARRAY_VALUE&upsertTimestamp=SOME_STRING_VALUE&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/promotion/diff-list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&target=SOME_ARRAY_VALUE&includeMeta=false&presentOnly=true&visibilityStatus=SOME_ARRAY_VALUE&upsertTimestamp=SOME_STRING_VALUE&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/diff-list');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'limit' => '100',
              'page' => '4',
              'storeCatalog' => 'SOME_STRING_VALUE',
              'storeIds' => 'SOME_STRING_VALUE',
              'target' => 'SOME_ARRAY_VALUE',
              'includeMeta' => 'false',
              'presentOnly' => 'true',
              'visibilityStatus' => 'SOME_ARRAY_VALUE',
              'upsertTimestamp' => 'SOME_STRING_VALUE',
              'orderFieldName' => 'SOME_STRING_VALUE',
              'order' => 'SOME_STRING_VALUE',
              'query' => 'SOME_STRING_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/promotions/promotion/diff-list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&target=SOME_ARRAY_VALUE&includeMeta=false&presentOnly=true&visibilityStatus=SOME_ARRAY_VALUE&upsertTimestamp=SOME_STRING_VALUE&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/promotion/get-for-client/{identifierType}/{identifierValue}:
    get:
      tags:
        - Promotions
      summary: Get a Profile's promotions as Workspace
      description: |
        A Workspace can retrieve a list of all promotions assigned to a Profile.

        **IMPORTANT**: 
        - As a result of this request, the `targetSegments` of all the matching promotions are checked. If this results in checking more than 30 unique segments, any segments above this limit may be ignored.
        - The endpoint does not support redemption limits per client for Multi-buy promotions (promotions with redeemQuantityPerActivation greater than 1). For redemption limits, please use [/v2/promotion/get-for-client/{identifierType}/{identifierValue}](#operation/GetAllClientPromotionsV2).
        - The endpoint is limited to 25000 requests per minute (per workspace).


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `PROMOTIONS_LIST_PROMOTIONS_READ`

        **User role permission required:** `campaigns_promotions: read`
      operationId: GetAllClientPromotions
      parameters:
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
        - $ref: "#/components/parameters/promotions-queryPromotionSort"
        - name: status
          in: query
          description: Filter by promotion status. If not provided, defaults to ACTIVE. If status is not provided and no promotions are active, the response is an empty array.
          required: false
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              enum:
                - ACTIVE
                - ASSIGNED
                - REDEEMED
              default: ACTIVE
        - $ref: "#/components/parameters/promotions-queryTagNames"
        - $ref: "#/components/parameters/promotions-queryTarget"
        - $ref: "#/components/parameters/promotions-queryPromotionType"
        - $ref: "#/components/parameters/promotions-queryPromotionPresentOnly"
        - $ref: "#/components/parameters/promotions-queryLastingOnly"
        - $ref: "#/components/parameters/promotions-queryPromotionDisplayableOnly"
        - $ref: "#/components/parameters/promotions-queryLimit"
        - $ref: "#/components/parameters/promotions-queryPage"
        - $ref: "#/components/parameters/promotions-queryIncludeMeta"
        - $ref: "#/components/parameters/promotions-queryIncludeVouchers"
        - $ref: "#/components/parameters/promotions-queryStoreIds"
      responses:
        "200":
          description: An array of promotions
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/promotions-promotionClientDataResponse"
                    description: An array of promotions
                  meta:
                    $ref: "#/components/schemas/promotions-responseMeta"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/GetAllClientPromotions
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&displayableOnly=true&limit=100&page=4&includeMeta=false&includeVouchers=false&storeIds=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", "/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&displayableOnly=true&limit=100&page=4&includeMeta=false&includeVouchers=false&storeIds=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/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&displayableOnly=true&limit=100&page=4&includeMeta=false&includeVouchers=false&storeIds=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": "/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&displayableOnly=true&limit=100&page=4&includeMeta=false&includeVouchers=false&storeIds=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/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'sort' => 'requireRedeemedPoints,desc',
              'status' => 'SOME_ARRAY_VALUE',
              'tagNames' => 'SOME_ARRAY_VALUE',
              'target' => 'SOME_ARRAY_VALUE',
              'type' => 'SOME_ARRAY_VALUE',
              'presentOnly' => 'true',
              'lastingOnly' => 'true',
              'displayableOnly' => 'true',
              'limit' => '100',
              'page' => '4',
              'includeMeta' => 'false',
              'includeVouchers' => 'false',
              'storeIds' => '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/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&displayableOnly=true&limit=100&page=4&includeMeta=false&includeVouchers=false&storeIds=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/promotion/get-for-client-possible-to-redeem/{identifierType}/{identifierValue}:
    get:
      tags:
        - Promotions
      summary: Get redeemable promotions of a Profile
      description: |
        Retrieve all redeemable promotions related to a Profile.

        **IMPORTANT**: 
        - As a result of this request, the `targetSegments` of all the matching promotions are checked. If this results in checking more than 30 unique segments, any segments above this limit may be ignored.
        - The endpoint is limited to 25000 requests per minute (per workspace).

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `PROMOTIONS_REDEEM_PROMOTIONS_READ`

        **User role permission required:** `campaigns_promotions: read`
      operationId: GetRedeemablePromotions
      parameters:
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
        - $ref: "#/components/parameters/promotions-queryPromotionSort"
        - $ref: "#/components/parameters/promotions-queryPromotionPresentOnly"
        - $ref: "#/components/parameters/promotions-queryLastingOnly"
        - $ref: "#/components/parameters/promotions-queryPromotionDisplayableOnly"
        - $ref: "#/components/parameters/promotions-queryPromotionStatus"
        - $ref: "#/components/parameters/promotions-queryPromotionType"
        - $ref: "#/components/parameters/promotions-queryStatusByType"
        - $ref: "#/components/parameters/promotions-queryTargetByType"
        - $ref: "#/components/parameters/promotions-queryIncludeMeta"
        - $ref: "#/components/parameters/promotions-queryPage"
        - $ref: "#/components/parameters/promotions-queryLimit"
        - $ref: "#/components/parameters/promotions-queryTarget"
        - $ref: "#/components/parameters/promotions-queryStoreIds"
      responses:
        "200":
          description: An array of promotions
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/promotions-promotionClientPossibleToRedeemResponse"
                  meta:
                    $ref: "#/components/schemas/promotions-responseMeta"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/GetRedeemablePromotions
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/promotions/promotion/get-for-client-possible-to-redeem/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&presentOnly=true&lastingOnly=true&displayableOnly=true&status=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&statusByType=%5BCUSTOM%5D%3DACTIVE&targetByType=%5BSEGMENT%5D%3DACTIVE&includeMeta=false&page=4&limit=100&target=SOME_ARRAY_VALUE&storeIds=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", "/v4/promotions/promotion/get-for-client-possible-to-redeem/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&presentOnly=true&lastingOnly=true&displayableOnly=true&status=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&statusByType=%5BCUSTOM%5D%3DACTIVE&targetByType=%5BSEGMENT%5D%3DACTIVE&includeMeta=false&page=4&limit=100&target=SOME_ARRAY_VALUE&storeIds=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/v4/promotions/promotion/get-for-client-possible-to-redeem/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&presentOnly=true&lastingOnly=true&displayableOnly=true&status=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&statusByType=%5BCUSTOM%5D%3DACTIVE&targetByType=%5BSEGMENT%5D%3DACTIVE&includeMeta=false&page=4&limit=100&target=SOME_ARRAY_VALUE&storeIds=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": "/v4/promotions/promotion/get-for-client-possible-to-redeem/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&presentOnly=true&lastingOnly=true&displayableOnly=true&status=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&statusByType=%5BCUSTOM%5D%3DACTIVE&targetByType=%5BSEGMENT%5D%3DACTIVE&includeMeta=false&page=4&limit=100&target=SOME_ARRAY_VALUE&storeIds=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/v4/promotions/promotion/get-for-client-possible-to-redeem/email/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'sort' => 'requireRedeemedPoints,desc',
              'presentOnly' => 'true',
              'lastingOnly' => 'true',
              'displayableOnly' => 'true',
              'status' => 'SOME_ARRAY_VALUE',
              'type' => 'SOME_ARRAY_VALUE',
              'statusByType' => '[CUSTOM]=ACTIVE',
              'targetByType' => '[SEGMENT]=ACTIVE',
              'includeMeta' => 'false',
              'page' => '4',
              'limit' => '100',
              'target' => 'SOME_ARRAY_VALUE',
              'storeIds' => '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/v4/promotions/promotion/get-for-client-possible-to-redeem/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&presentOnly=true&lastingOnly=true&displayableOnly=true&status=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&statusByType=%5BCUSTOM%5D%3DACTIVE&targetByType=%5BSEGMENT%5D%3DACTIVE&includeMeta=false&page=4&limit=100&target=SOME_ARRAY_VALUE&storeIds=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/promotion/{identifierType}/{identifierValue}:
    get:
      tags:
        - Promotions
      summary: Get promotion details as Workspace
      description: |
        Retrieve the details of a promotion by its code.

        ---

        **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:** `PROMOTIONS_DETAILS_FOR_PROFILE_PROMOTIONS_READ`

        **User role permission required:** `campaigns_promotions: read`
      operationId: GetPromotionDetailsAsBusinessProfile
      parameters:
        - $ref: "#/components/parameters/promotions-pathPromoIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
      responses:
        "200":
          description: Details of a promotion
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-Viewpromotiondetails-HTTP200"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Object not found
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/GetPromotionDetailsAsBusinessProfile
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%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", "/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%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/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%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": "/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%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/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%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/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    put:
      tags:
        - Promotions
      summary: Update a promotion
      description: |
        You can update an existing promotion. Include only the fields that you want to change. Inserting a null value overwrites an existing value.

        ---

        **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:** `PROMOTIONS_DETAILS_FOR_PROFILE_PROMOTIONS_UPDATE`

        **User role permission required:** `campaigns_promotions: update`
      operationId: UpdateAPromotion
      parameters:
        - $ref: "#/components/parameters/promotions-pathPromoIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-promotionDataCreate"
        required: true
      responses:
        "200":
          description: Promotion updated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionCreateUpdateDeleteRes"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/UpdateAPromotion
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"visibilityStatus":"DRAFT","type":"MEMBERS_ONLY","redeemLimitPerClient":0,"redeemQuantityPerActivation":8388607,"redeemLimitGlobal":0,"redeemType":"FULL","details":{"discountType":{"name":"BOGO","outerScope":true,"requiredItemsCount":2,"requiredItems":{"catalog":"221","catalogItemType":"FILTERED","catalogIndexItems":[],"catalogFilterIds":["f978b20f-7156-40ed-99c2-3af62b76af12"]},"discountedItemsCount":1},"cashbackSettings":{"exchangeRate":0.01,"limits":{"minPoints":10,"maxPoints":1000,"maxTransactionAmount":20,"maxTransactionPercentage":50}}},"discountType":"PERCENT","discountValue":0,"discountMode":"STATIC","discountModeDetails":{"discountSteps":[{"discountValue":0,"usageThreshold":0}],"discountUsageTrigger":"TRANSACTION"},"preDiscountValue":0,"requireRedeemedPoints":0,"headerName":"string","headerDescription":"string","name":"string","headline":"string","description":"string","images":[{"url":"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png","type":"image"}],"tags":[{"hash":"6f54671d-157f-4c4e-a577-11fac3111293"}],"startAt":"2019-08-24T14:15:22Z","expireAt":"2019-08-24T14:15:22Z","displayFrom":"string","displayTo":"string","lastingTime":0,"params":{},"itemScope":"LINE_ITEM","minBasketValue":null,"maxBasketValue":null,"catalog":"221","catalogItemType":"FILTERED","catalogIndexItems":[],"catalogFilterIds":["f978b20f-7156-40ed-99c2-3af62b76af12"],"excludeCatalog":["311"],"excludeCatalogItemType":"SELECTED","excludeCatalogIndexItems":["29727276"],"excludeCatalogFilterIds":[],"activationLimitGlobalType":"RELATIVE","activationLimitGlobalLimit":1,"activationLimitGlobalRelativeMinutes":null,"storeCatalog":"string","storeItemType":"ALL","storeIds":["string"],"targetType":"ALL","targetSegment":["string"],"price":0,"priority":250,"voucherPool":{"enabled":false,"uuid":"095be615-a8ad-4c33-8e9c-c7612fbf6c9f","transferable":false},"importHash":"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"visibilityStatus\":\"DRAFT\",\"type\":\"MEMBERS_ONLY\",\"redeemLimitPerClient\":0,\"redeemQuantityPerActivation\":8388607,\"redeemLimitGlobal\":0,\"redeemType\":\"FULL\",\"details\":{\"discountType\":{\"name\":\"BOGO\",\"outerScope\":true,\"requiredItemsCount\":2,\"requiredItems\":{\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"]},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.01,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}},\"discountType\":\"PERCENT\",\"discountValue\":0,\"discountMode\":\"STATIC\",\"discountModeDetails\":{\"discountSteps\":[{\"discountValue\":0,\"usageThreshold\":0}],\"discountUsageTrigger\":\"TRANSACTION\"},\"preDiscountValue\":0,\"requireRedeemedPoints\":0,\"headerName\":\"string\",\"headerDescription\":\"string\",\"name\":\"string\",\"headline\":\"string\",\"description\":\"string\",\"images\":[{\"url\":\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\",\"type\":\"image\"}],\"tags\":[{\"hash\":\"6f54671d-157f-4c4e-a577-11fac3111293\"}],\"startAt\":\"2019-08-24T14:15:22Z\",\"expireAt\":\"2019-08-24T14:15:22Z\",\"displayFrom\":\"string\",\"displayTo\":\"string\",\"lastingTime\":0,\"params\":{},\"itemScope\":\"LINE_ITEM\",\"minBasketValue\":null,\"maxBasketValue\":null,\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"],\"excludeCatalog\":[\"311\"],\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"29727276\"],\"excludeCatalogFilterIds\":[],\"activationLimitGlobalType\":\"RELATIVE\",\"activationLimitGlobalLimit\":1,\"activationLimitGlobalRelativeMinutes\":null,\"storeCatalog\":\"string\",\"storeItemType\":\"ALL\",\"storeIds\":[\"string\"],\"targetType\":\"ALL\",\"targetSegment\":[\"string\"],\"price\":0,\"priority\":250,\"voucherPool\":{\"enabled\":false,\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"transferable\":false},\"importHash\":\"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("PUT", "/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "visibilityStatus": "DRAFT",
              "type": "MEMBERS_ONLY",
              "redeemLimitPerClient": 0,
              "redeemQuantityPerActivation": 8388607,
              "redeemLimitGlobal": 0,
              "redeemType": "FULL",
              "details": {
                "discountType": {
                  "name": "BOGO",
                  "outerScope": true,
                  "requiredItemsCount": 2,
                  "requiredItems": {
                    "catalog": "221",
                    "catalogItemType": "FILTERED",
                    "catalogIndexItems": [],
                    "catalogFilterIds": [
                      "f978b20f-7156-40ed-99c2-3af62b76af12"
                    ]
                  },
                  "discountedItemsCount": 1
                },
                "cashbackSettings": {
                  "exchangeRate": 0.01,
                  "limits": {
                    "minPoints": 10,
                    "maxPoints": 1000,
                    "maxTransactionAmount": 20,
                    "maxTransactionPercentage": 50
                  }
                }
              },
              "discountType": "PERCENT",
              "discountValue": 0,
              "discountMode": "STATIC",
              "discountModeDetails": {
                "discountSteps": [
                  {
                    "discountValue": 0,
                    "usageThreshold": 0
                  }
                ],
                "discountUsageTrigger": "TRANSACTION"
              },
              "preDiscountValue": 0,
              "requireRedeemedPoints": 0,
              "headerName": "string",
              "headerDescription": "string",
              "name": "string",
              "headline": "string",
              "description": "string",
              "images": [
                {
                  "url": "https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png",
                  "type": "image"
                }
              ],
              "tags": [
                {
                  "hash": "6f54671d-157f-4c4e-a577-11fac3111293"
                }
              ],
              "startAt": "2019-08-24T14:15:22Z",
              "expireAt": "2019-08-24T14:15:22Z",
              "displayFrom": "string",
              "displayTo": "string",
              "lastingTime": 0,
              "params": {},
              "itemScope": "LINE_ITEM",
              "minBasketValue": null,
              "maxBasketValue": null,
              "catalog": "221",
              "catalogItemType": "FILTERED",
              "catalogIndexItems": [],
              "catalogFilterIds": [
                "f978b20f-7156-40ed-99c2-3af62b76af12"
              ],
              "excludeCatalog": [
                "311"
              ],
              "excludeCatalogItemType": "SELECTED",
              "excludeCatalogIndexItems": [
                "29727276"
              ],
              "excludeCatalogFilterIds": [],
              "activationLimitGlobalType": "RELATIVE",
              "activationLimitGlobalLimit": 1,
              "activationLimitGlobalRelativeMinutes": null,
              "storeCatalog": "string",
              "storeItemType": "ALL",
              "storeIds": [
                "string"
              ],
              "targetType": "ALL",
              "targetSegment": [
                "string"
              ],
              "price": 0,
              "priority": 250,
              "voucherPool": {
                "enabled": false,
                "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
                "transferable": false
              },
              "importHash": "ced8a4ad-6d6e-48ca-a663-3fb07e6216a9"
            });

            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/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%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({
              visibilityStatus: 'DRAFT',
              type: 'MEMBERS_ONLY',
              redeemLimitPerClient: 0,
              redeemQuantityPerActivation: 8388607,
              redeemLimitGlobal: 0,
              redeemType: 'FULL',
              details: {
                discountType: {
                  name: 'BOGO',
                  outerScope: true,
                  requiredItemsCount: 2,
                  requiredItems: {
                    catalog: '221',
                    catalogItemType: 'FILTERED',
                    catalogIndexItems: [],
                    catalogFilterIds: ['f978b20f-7156-40ed-99c2-3af62b76af12']
                  },
                  discountedItemsCount: 1
                },
                cashbackSettings: {
                  exchangeRate: 0.01,
                  limits: {
                    minPoints: 10,
                    maxPoints: 1000,
                    maxTransactionAmount: 20,
                    maxTransactionPercentage: 50
                  }
                }
              },
              discountType: 'PERCENT',
              discountValue: 0,
              discountMode: 'STATIC',
              discountModeDetails: {
                discountSteps: [{discountValue: 0, usageThreshold: 0}],
                discountUsageTrigger: 'TRANSACTION'
              },
              preDiscountValue: 0,
              requireRedeemedPoints: 0,
              headerName: 'string',
              headerDescription: 'string',
              name: 'string',
              headline: 'string',
              description: 'string',
              images: [
                {
                  url: 'https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png',
                  type: 'image'
                }
              ],
              tags: [{hash: '6f54671d-157f-4c4e-a577-11fac3111293'}],
              startAt: '2019-08-24T14:15:22Z',
              expireAt: '2019-08-24T14:15:22Z',
              displayFrom: 'string',
              displayTo: 'string',
              lastingTime: 0,
              params: {},
              itemScope: 'LINE_ITEM',
              minBasketValue: null,
              maxBasketValue: null,
              catalog: '221',
              catalogItemType: 'FILTERED',
              catalogIndexItems: [],
              catalogFilterIds: ['f978b20f-7156-40ed-99c2-3af62b76af12'],
              excludeCatalog: ['311'],
              excludeCatalogItemType: 'SELECTED',
              excludeCatalogIndexItems: ['29727276'],
              excludeCatalogFilterIds: [],
              activationLimitGlobalType: 'RELATIVE',
              activationLimitGlobalLimit: 1,
              activationLimitGlobalRelativeMinutes: null,
              storeCatalog: 'string',
              storeItemType: 'ALL',
              storeIds: ['string'],
              targetType: 'ALL',
              targetSegment: ['string'],
              price: 0,
              priority: 250,
              voucherPool: {
                enabled: false,
                uuid: '095be615-a8ad-4c33-8e9c-c7612fbf6c9f',
                transferable: false
              },
              importHash: 'ced8a4ad-6d6e-48ca-a663-3fb07e6216a9'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"visibilityStatus":"DRAFT","type":"MEMBERS_ONLY","redeemLimitPerClient":0,"redeemQuantityPerActivation":8388607,"redeemLimitGlobal":0,"redeemType":"FULL","details":{"discountType":{"name":"BOGO","outerScope":true,"requiredItemsCount":2,"requiredItems":{"catalog":"221","catalogItemType":"FILTERED","catalogIndexItems":[],"catalogFilterIds":["f978b20f-7156-40ed-99c2-3af62b76af12"]},"discountedItemsCount":1},"cashbackSettings":{"exchangeRate":0.01,"limits":{"minPoints":10,"maxPoints":1000,"maxTransactionAmount":20,"maxTransactionPercentage":50}}},"discountType":"PERCENT","discountValue":0,"discountMode":"STATIC","discountModeDetails":{"discountSteps":[{"discountValue":0,"usageThreshold":0}],"discountUsageTrigger":"TRANSACTION"},"preDiscountValue":0,"requireRedeemedPoints":0,"headerName":"string","headerDescription":"string","name":"string","headline":"string","description":"string","images":[{"url":"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png","type":"image"}],"tags":[{"hash":"6f54671d-157f-4c4e-a577-11fac3111293"}],"startAt":"2019-08-24T14:15:22Z","expireAt":"2019-08-24T14:15:22Z","displayFrom":"string","displayTo":"string","lastingTime":0,"params":{},"itemScope":"LINE_ITEM","minBasketValue":null,"maxBasketValue":null,"catalog":"221","catalogItemType":"FILTERED","catalogIndexItems":[],"catalogFilterIds":["f978b20f-7156-40ed-99c2-3af62b76af12"],"excludeCatalog":["311"],"excludeCatalogItemType":"SELECTED","excludeCatalogIndexItems":["29727276"],"excludeCatalogFilterIds":[],"activationLimitGlobalType":"RELATIVE","activationLimitGlobalLimit":1,"activationLimitGlobalRelativeMinutes":null,"storeCatalog":"string","storeItemType":"ALL","storeIds":["string"],"targetType":"ALL","targetSegment":["string"],"price":0,"priority":250,"voucherPool":{"enabled":false,"uuid":"095be615-a8ad-4c33-8e9c-c7612fbf6c9f","transferable":false},"importHash":"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9"}');

            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/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"visibilityStatus\":\"DRAFT\",\"type\":\"MEMBERS_ONLY\",\"redeemLimitPerClient\":0,\"redeemQuantityPerActivation\":8388607,\"redeemLimitGlobal\":0,\"redeemType\":\"FULL\",\"details\":{\"discountType\":{\"name\":\"BOGO\",\"outerScope\":true,\"requiredItemsCount\":2,\"requiredItems\":{\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"]},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.01,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}},\"discountType\":\"PERCENT\",\"discountValue\":0,\"discountMode\":\"STATIC\",\"discountModeDetails\":{\"discountSteps\":[{\"discountValue\":0,\"usageThreshold\":0}],\"discountUsageTrigger\":\"TRANSACTION\"},\"preDiscountValue\":0,\"requireRedeemedPoints\":0,\"headerName\":\"string\",\"headerDescription\":\"string\",\"name\":\"string\",\"headline\":\"string\",\"description\":\"string\",\"images\":[{\"url\":\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\",\"type\":\"image\"}],\"tags\":[{\"hash\":\"6f54671d-157f-4c4e-a577-11fac3111293\"}],\"startAt\":\"2019-08-24T14:15:22Z\",\"expireAt\":\"2019-08-24T14:15:22Z\",\"displayFrom\":\"string\",\"displayTo\":\"string\",\"lastingTime\":0,\"params\":{},\"itemScope\":\"LINE_ITEM\",\"minBasketValue\":null,\"maxBasketValue\":null,\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"],\"excludeCatalog\":[\"311\"],\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"29727276\"],\"excludeCatalogFilterIds\":[],\"activationLimitGlobalType\":\"RELATIVE\",\"activationLimitGlobalLimit\":1,\"activationLimitGlobalRelativeMinutes\":null,\"storeCatalog\":\"string\",\"storeItemType\":\"ALL\",\"storeIds\":[\"string\"],\"targetType\":\"ALL\",\"targetSegment\":[\"string\"],\"price\":0,\"priority\":250,\"voucherPool\":{\"enabled\":false,\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"transferable\":false},\"importHash\":\"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9\"}")
              .asString();
  /v4/promotions/promotion/get-for-client-by-custom-settings/{identifierType}/{identifierValue}:
    get:
      tags:
        - Promotions
      summary: Get Profile promotions by a custom filter
      description: |
        Retrieve a list of promotions related to a Profile by a custom,
        pre-defined filter.

        The filter is maintained by your backend administrator.

        **IMPORTANT**: 
        - As a result of this request, the `targetSegments` of all the matching promotions are checked. If this results in checking more than 30 unique segments, any segments above this limit may be ignored.
        - The endpoint is limited to 25000 requests per minute (per workspace).


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `PROMOTIONS_GET_FOR_CLIENT_BY_CUSTOM_SETTINGS_PROMOTIONS_READ`

        **User role permission required:** `campaigns_promotions: read`
      operationId: GetClientPromotionsByACustomFilter
      parameters:
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
        - $ref: "#/components/parameters/promotions-queryPage"
        - $ref: "#/components/parameters/promotions-queryLimit"
        - $ref: "#/components/parameters/promotions-queryLockIdentifier"
      responses:
        "200":
          description: An array of promotions
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/promotions-promotionClientDataResponse"
                    description: An array of promotions
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "409":
          $ref: "#/components/responses/promotions-WaitingForProfileLockReleaseError"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/GetClientPromotionsByACustomFilter
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/promotions/promotion/get-for-client-by-custom-settings/email/%7BidentifierValue%7D?page=4&limit=100&lockIdentifier=6561d87b-2697-46ad-8f9a-0550736b86e3' \
              --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", "/v4/promotions/promotion/get-for-client-by-custom-settings/email/%7BidentifierValue%7D?page=4&limit=100&lockIdentifier=6561d87b-2697-46ad-8f9a-0550736b86e3", 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/v4/promotions/promotion/get-for-client-by-custom-settings/email/%7BidentifierValue%7D?page=4&limit=100&lockIdentifier=6561d87b-2697-46ad-8f9a-0550736b86e3");
            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": "/v4/promotions/promotion/get-for-client-by-custom-settings/email/%7BidentifierValue%7D?page=4&limit=100&lockIdentifier=6561d87b-2697-46ad-8f9a-0550736b86e3",
              "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/v4/promotions/promotion/get-for-client-by-custom-settings/email/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => '4',
              'limit' => '100',
              'lockIdentifier' => '6561d87b-2697-46ad-8f9a-0550736b86e3'
            ]);

            $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/v4/promotions/promotion/get-for-client-by-custom-settings/email/%7BidentifierValue%7D?page=4&limit=100&lockIdentifier=6561d87b-2697-46ad-8f9a-0550736b86e3")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/promotion/activate-for-client/{identifierType}/{identifierValue}:
    post:
      tags:
        - Promotions
      summary: Activate a promotion as Workspace
      description: |
        You can change the status of a Profile's promotion from `assigned` to `active`, the promotion can now be applied to a purchase.

        ---

        **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:** `PROMOTIONS_ACTIVATE_PROMOTIONS_UPDATE`

        **User role permission required:** `campaigns_promotions: update`
      operationId: ActivateAPromotionAsProfile
      parameters:
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-promotionActivation"
        required: true
      responses:
        "200":
          description: Promotion activated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-promotionClientDataResponse"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Promotion for profile not found
        "409":
          $ref: "#/components/responses/promotions-WaitingForProfileLockReleaseError"
        "412":
          $ref: "#/components/responses/promotions-PromotionActivate412"
        "422":
          $ref: "#/components/responses/promotions-PromotionActivate422"
        "423":
          $ref: "#/components/responses/promotions-ProfilePromotionsBlockedError"
        "500":
          $ref: "#/components/responses/promotions-500"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/ActivateAPromotionAsProfile
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/promotion/activate-for-client/email/%7BidentifierValue%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"key":"code","value":"7893467834GG","pointsToUse":100}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/promotions/promotion/activate-for-client/email/%7BidentifierValue%7D", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "key": "code",
              "value": "7893467834GG",
              "pointsToUse": 100
            });

            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/v4/promotions/promotion/activate-for-client/email/%7BidentifierValue%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": "/v4/promotions/promotion/activate-for-client/email/%7BidentifierValue%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({key: 'code', value: '7893467834GG', pointsToUse: 100}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/activate-for-client/email/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"key":"code","value":"7893467834GG","pointsToUse":100}');

            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/v4/promotions/promotion/activate-for-client/email/%7BidentifierValue%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}")
              .asString();
  /v4/promotions/promotion/batch-activate-for-client/{identifierType}/{identifierValue}:
    post:
      tags:
        - Promotions
      summary: Batch activate promotions as Workspace
      description: |
        You can change the status of a number of Profile's promotions promotion from `assigned` to `active`, the promotion can now be applied to a purchase.

        ---

        **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:** `PROMOTIONS_BATCH_ACTIVATE_PROMOTIONS_UPDATE`

        **User role permission required:** `campaigns_promotions: update`
      operationId: BatchActivateAsProfile
      parameters:
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/promotions-promotionActivation"
        required: true
      responses:
        "200":
          description: Promotions activated
          content:
            application/json:
              schema:
                type: object
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Promotions for profile not found
        "409":
          $ref: "#/components/responses/promotions-WaitingForProfileLockReleaseError"
        "412":
          $ref: "#/components/responses/promotions-PromotionActivate412"
        "500":
          $ref: "#/components/responses/promotions-500"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/BatchActivateAsProfile
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/promotion/batch-activate-for-client/email/%7BidentifierValue%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '[{"key":"code","value":"7893467834GG","pointsToUse":100}]'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/promotions/promotion/batch-activate-for-client/email/%7BidentifierValue%7D", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              {
                "key": "code",
                "value": "7893467834GG",
                "pointsToUse": 100
              }
            ]);

            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/v4/promotions/promotion/batch-activate-for-client/email/%7BidentifierValue%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": "/v4/promotions/promotion/batch-activate-for-client/email/%7BidentifierValue%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([{key: 'code', value: '7893467834GG', pointsToUse: 100}]));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/batch-activate-for-client/email/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('[{"key":"code","value":"7893467834GG","pointsToUse":100}]');

            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/v4/promotions/promotion/batch-activate-for-client/email/%7BidentifierValue%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]")
              .asString();
  /v4/promotions/promotion/deactivate-for-client/{identifierType}/{identifierValue}:
    post:
      tags:
        - Promotions
      summary: Deactivate a promotion as Workspace
      description: |
        You can change the status of a Profile's activated promotion back to `assigned`.

        ---

        **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:** `PROMOTIONS_DEACTIVATE_PROMOTIONS_UPDATE`

        **User role permission required:** `campaigns_promotions: update`
      operationId: DeactivateAPromotionProfile
      parameters:
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-promotionActivation"
        required: true
      responses:
        "200":
          description: Promotion deactivated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-promotionClientDataResponse"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Promotion for profile not found
        "429":
          $ref: "#/components/responses/promotions-WaitingForProfileLockReleaseError"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/DeactivateAPromotionProfile
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/promotion/deactivate-for-client/email/%7BidentifierValue%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"key":"code","value":"7893467834GG","pointsToUse":100}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/promotions/promotion/deactivate-for-client/email/%7BidentifierValue%7D", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "key": "code",
              "value": "7893467834GG",
              "pointsToUse": 100
            });

            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/v4/promotions/promotion/deactivate-for-client/email/%7BidentifierValue%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": "/v4/promotions/promotion/deactivate-for-client/email/%7BidentifierValue%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({key: 'code', value: '7893467834GG', pointsToUse: 100}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/deactivate-for-client/email/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"key":"code","value":"7893467834GG","pointsToUse":100}');

            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/v4/promotions/promotion/deactivate-for-client/email/%7BidentifierValue%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}")
              .asString();
  /v4/promotions/promotion/batch-deactivate-for-client/{identifierType}/{identifierValue}:
    post:
      tags:
        - Promotions
      summary: Batch deactivate promotions
      description: |
        You can change the status of a number of Profile's activated promotions back to `assigned`.

        ---

        **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:** `PROMOTIONS_BATCH_DEACTIVATE_PROMOTIONS_UPDATE`

        **User role permission required:** `campaigns_promotions: update`
      operationId: BatchDeactivateAsProfile
      parameters:
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/promotions-promotionActivation"
        required: true
      responses:
        "200":
          description: Promotions deactivated
          content:
            application/json:
              schema:
                type: object
                example: "{}"
              example: "{}"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Promotions for profile not found
        "429":
          $ref: "#/components/responses/promotions-WaitingForProfileLockReleaseError"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/BatchDeactivateAsProfile
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/promotion/batch-deactivate-for-client/email/%7BidentifierValue%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '[{"key":"code","value":"7893467834GG","pointsToUse":100}]'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/promotions/promotion/batch-deactivate-for-client/email/%7BidentifierValue%7D", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              {
                "key": "code",
                "value": "7893467834GG",
                "pointsToUse": 100
              }
            ]);

            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/v4/promotions/promotion/batch-deactivate-for-client/email/%7BidentifierValue%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": "/v4/promotions/promotion/batch-deactivate-for-client/email/%7BidentifierValue%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([{key: 'code', value: '7893467834GG', pointsToUse: 100}]));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/batch-deactivate-for-client/email/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('[{"key":"code","value":"7893467834GG","pointsToUse":100}]');

            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/v4/promotions/promotion/batch-deactivate-for-client/email/%7BidentifierValue%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]")
              .asString();
  /v4/promotions/promotion:
    post:
      tags:
        - Promotions
      summary: Create a promotion
      description: |
        You can create a new promotion in the Synerise application.


        If you don't enter a code or UUID, they are generated automatically.

        ---

        **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:** `PROMOTIONS_PROMOTIONS_CREATE`

        **User role permission required:** `campaigns_promotions: create`
      operationId: CreateAPromotion
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-promotionDataCreate"
        required: true
      responses:
        "201":
          description: Promotion created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionCreateUpdateDeleteRes"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/CreateAPromotion
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/promotion \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"visibilityStatus":"DRAFT","type":"MEMBERS_ONLY","redeemLimitPerClient":0,"redeemQuantityPerActivation":8388607,"redeemLimitGlobal":0,"redeemType":"FULL","details":{"discountType":{"name":"BOGO","outerScope":true,"requiredItemsCount":2,"requiredItems":{"catalog":"221","catalogItemType":"FILTERED","catalogIndexItems":[],"catalogFilterIds":["f978b20f-7156-40ed-99c2-3af62b76af12"]},"discountedItemsCount":1},"cashbackSettings":{"exchangeRate":0.01,"limits":{"minPoints":10,"maxPoints":1000,"maxTransactionAmount":20,"maxTransactionPercentage":50}}},"discountType":"PERCENT","discountValue":0,"discountMode":"STATIC","discountModeDetails":{"discountSteps":[{"discountValue":0,"usageThreshold":0}],"discountUsageTrigger":"TRANSACTION"},"preDiscountValue":0,"requireRedeemedPoints":0,"headerName":"string","headerDescription":"string","name":"string","headline":"string","description":"string","images":[{"url":"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png","type":"image"}],"tags":[{"hash":"6f54671d-157f-4c4e-a577-11fac3111293"}],"startAt":"2019-08-24T14:15:22Z","expireAt":"2019-08-24T14:15:22Z","displayFrom":"string","displayTo":"string","lastingTime":0,"params":{},"itemScope":"LINE_ITEM","minBasketValue":null,"maxBasketValue":null,"catalog":"221","catalogItemType":"FILTERED","catalogIndexItems":[],"catalogFilterIds":["f978b20f-7156-40ed-99c2-3af62b76af12"],"excludeCatalog":["311"],"excludeCatalogItemType":"SELECTED","excludeCatalogIndexItems":["29727276"],"excludeCatalogFilterIds":[],"activationLimitGlobalType":"RELATIVE","activationLimitGlobalLimit":1,"activationLimitGlobalRelativeMinutes":null,"storeCatalog":"string","storeItemType":"ALL","storeIds":["string"],"targetType":"ALL","targetSegment":["string"],"price":0,"priority":250,"voucherPool":{"enabled":false,"uuid":"095be615-a8ad-4c33-8e9c-c7612fbf6c9f","transferable":false},"importHash":"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"visibilityStatus\":\"DRAFT\",\"type\":\"MEMBERS_ONLY\",\"redeemLimitPerClient\":0,\"redeemQuantityPerActivation\":8388607,\"redeemLimitGlobal\":0,\"redeemType\":\"FULL\",\"details\":{\"discountType\":{\"name\":\"BOGO\",\"outerScope\":true,\"requiredItemsCount\":2,\"requiredItems\":{\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"]},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.01,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}},\"discountType\":\"PERCENT\",\"discountValue\":0,\"discountMode\":\"STATIC\",\"discountModeDetails\":{\"discountSteps\":[{\"discountValue\":0,\"usageThreshold\":0}],\"discountUsageTrigger\":\"TRANSACTION\"},\"preDiscountValue\":0,\"requireRedeemedPoints\":0,\"headerName\":\"string\",\"headerDescription\":\"string\",\"name\":\"string\",\"headline\":\"string\",\"description\":\"string\",\"images\":[{\"url\":\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\",\"type\":\"image\"}],\"tags\":[{\"hash\":\"6f54671d-157f-4c4e-a577-11fac3111293\"}],\"startAt\":\"2019-08-24T14:15:22Z\",\"expireAt\":\"2019-08-24T14:15:22Z\",\"displayFrom\":\"string\",\"displayTo\":\"string\",\"lastingTime\":0,\"params\":{},\"itemScope\":\"LINE_ITEM\",\"minBasketValue\":null,\"maxBasketValue\":null,\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"],\"excludeCatalog\":[\"311\"],\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"29727276\"],\"excludeCatalogFilterIds\":[],\"activationLimitGlobalType\":\"RELATIVE\",\"activationLimitGlobalLimit\":1,\"activationLimitGlobalRelativeMinutes\":null,\"storeCatalog\":\"string\",\"storeItemType\":\"ALL\",\"storeIds\":[\"string\"],\"targetType\":\"ALL\",\"targetSegment\":[\"string\"],\"price\":0,\"priority\":250,\"voucherPool\":{\"enabled\":false,\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"transferable\":false},\"importHash\":\"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/promotions/promotion", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "visibilityStatus": "DRAFT",
              "type": "MEMBERS_ONLY",
              "redeemLimitPerClient": 0,
              "redeemQuantityPerActivation": 8388607,
              "redeemLimitGlobal": 0,
              "redeemType": "FULL",
              "details": {
                "discountType": {
                  "name": "BOGO",
                  "outerScope": true,
                  "requiredItemsCount": 2,
                  "requiredItems": {
                    "catalog": "221",
                    "catalogItemType": "FILTERED",
                    "catalogIndexItems": [],
                    "catalogFilterIds": [
                      "f978b20f-7156-40ed-99c2-3af62b76af12"
                    ]
                  },
                  "discountedItemsCount": 1
                },
                "cashbackSettings": {
                  "exchangeRate": 0.01,
                  "limits": {
                    "minPoints": 10,
                    "maxPoints": 1000,
                    "maxTransactionAmount": 20,
                    "maxTransactionPercentage": 50
                  }
                }
              },
              "discountType": "PERCENT",
              "discountValue": 0,
              "discountMode": "STATIC",
              "discountModeDetails": {
                "discountSteps": [
                  {
                    "discountValue": 0,
                    "usageThreshold": 0
                  }
                ],
                "discountUsageTrigger": "TRANSACTION"
              },
              "preDiscountValue": 0,
              "requireRedeemedPoints": 0,
              "headerName": "string",
              "headerDescription": "string",
              "name": "string",
              "headline": "string",
              "description": "string",
              "images": [
                {
                  "url": "https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png",
                  "type": "image"
                }
              ],
              "tags": [
                {
                  "hash": "6f54671d-157f-4c4e-a577-11fac3111293"
                }
              ],
              "startAt": "2019-08-24T14:15:22Z",
              "expireAt": "2019-08-24T14:15:22Z",
              "displayFrom": "string",
              "displayTo": "string",
              "lastingTime": 0,
              "params": {},
              "itemScope": "LINE_ITEM",
              "minBasketValue": null,
              "maxBasketValue": null,
              "catalog": "221",
              "catalogItemType": "FILTERED",
              "catalogIndexItems": [],
              "catalogFilterIds": [
                "f978b20f-7156-40ed-99c2-3af62b76af12"
              ],
              "excludeCatalog": [
                "311"
              ],
              "excludeCatalogItemType": "SELECTED",
              "excludeCatalogIndexItems": [
                "29727276"
              ],
              "excludeCatalogFilterIds": [],
              "activationLimitGlobalType": "RELATIVE",
              "activationLimitGlobalLimit": 1,
              "activationLimitGlobalRelativeMinutes": null,
              "storeCatalog": "string",
              "storeItemType": "ALL",
              "storeIds": [
                "string"
              ],
              "targetType": "ALL",
              "targetSegment": [
                "string"
              ],
              "price": 0,
              "priority": 250,
              "voucherPool": {
                "enabled": false,
                "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
                "transferable": false
              },
              "importHash": "ced8a4ad-6d6e-48ca-a663-3fb07e6216a9"
            });

            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/v4/promotions/promotion");
            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": "/v4/promotions/promotion",
              "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({
              visibilityStatus: 'DRAFT',
              type: 'MEMBERS_ONLY',
              redeemLimitPerClient: 0,
              redeemQuantityPerActivation: 8388607,
              redeemLimitGlobal: 0,
              redeemType: 'FULL',
              details: {
                discountType: {
                  name: 'BOGO',
                  outerScope: true,
                  requiredItemsCount: 2,
                  requiredItems: {
                    catalog: '221',
                    catalogItemType: 'FILTERED',
                    catalogIndexItems: [],
                    catalogFilterIds: ['f978b20f-7156-40ed-99c2-3af62b76af12']
                  },
                  discountedItemsCount: 1
                },
                cashbackSettings: {
                  exchangeRate: 0.01,
                  limits: {
                    minPoints: 10,
                    maxPoints: 1000,
                    maxTransactionAmount: 20,
                    maxTransactionPercentage: 50
                  }
                }
              },
              discountType: 'PERCENT',
              discountValue: 0,
              discountMode: 'STATIC',
              discountModeDetails: {
                discountSteps: [{discountValue: 0, usageThreshold: 0}],
                discountUsageTrigger: 'TRANSACTION'
              },
              preDiscountValue: 0,
              requireRedeemedPoints: 0,
              headerName: 'string',
              headerDescription: 'string',
              name: 'string',
              headline: 'string',
              description: 'string',
              images: [
                {
                  url: 'https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png',
                  type: 'image'
                }
              ],
              tags: [{hash: '6f54671d-157f-4c4e-a577-11fac3111293'}],
              startAt: '2019-08-24T14:15:22Z',
              expireAt: '2019-08-24T14:15:22Z',
              displayFrom: 'string',
              displayTo: 'string',
              lastingTime: 0,
              params: {},
              itemScope: 'LINE_ITEM',
              minBasketValue: null,
              maxBasketValue: null,
              catalog: '221',
              catalogItemType: 'FILTERED',
              catalogIndexItems: [],
              catalogFilterIds: ['f978b20f-7156-40ed-99c2-3af62b76af12'],
              excludeCatalog: ['311'],
              excludeCatalogItemType: 'SELECTED',
              excludeCatalogIndexItems: ['29727276'],
              excludeCatalogFilterIds: [],
              activationLimitGlobalType: 'RELATIVE',
              activationLimitGlobalLimit: 1,
              activationLimitGlobalRelativeMinutes: null,
              storeCatalog: 'string',
              storeItemType: 'ALL',
              storeIds: ['string'],
              targetType: 'ALL',
              targetSegment: ['string'],
              price: 0,
              priority: 250,
              voucherPool: {
                enabled: false,
                uuid: '095be615-a8ad-4c33-8e9c-c7612fbf6c9f',
                transferable: false
              },
              importHash: 'ced8a4ad-6d6e-48ca-a663-3fb07e6216a9'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"visibilityStatus":"DRAFT","type":"MEMBERS_ONLY","redeemLimitPerClient":0,"redeemQuantityPerActivation":8388607,"redeemLimitGlobal":0,"redeemType":"FULL","details":{"discountType":{"name":"BOGO","outerScope":true,"requiredItemsCount":2,"requiredItems":{"catalog":"221","catalogItemType":"FILTERED","catalogIndexItems":[],"catalogFilterIds":["f978b20f-7156-40ed-99c2-3af62b76af12"]},"discountedItemsCount":1},"cashbackSettings":{"exchangeRate":0.01,"limits":{"minPoints":10,"maxPoints":1000,"maxTransactionAmount":20,"maxTransactionPercentage":50}}},"discountType":"PERCENT","discountValue":0,"discountMode":"STATIC","discountModeDetails":{"discountSteps":[{"discountValue":0,"usageThreshold":0}],"discountUsageTrigger":"TRANSACTION"},"preDiscountValue":0,"requireRedeemedPoints":0,"headerName":"string","headerDescription":"string","name":"string","headline":"string","description":"string","images":[{"url":"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png","type":"image"}],"tags":[{"hash":"6f54671d-157f-4c4e-a577-11fac3111293"}],"startAt":"2019-08-24T14:15:22Z","expireAt":"2019-08-24T14:15:22Z","displayFrom":"string","displayTo":"string","lastingTime":0,"params":{},"itemScope":"LINE_ITEM","minBasketValue":null,"maxBasketValue":null,"catalog":"221","catalogItemType":"FILTERED","catalogIndexItems":[],"catalogFilterIds":["f978b20f-7156-40ed-99c2-3af62b76af12"],"excludeCatalog":["311"],"excludeCatalogItemType":"SELECTED","excludeCatalogIndexItems":["29727276"],"excludeCatalogFilterIds":[],"activationLimitGlobalType":"RELATIVE","activationLimitGlobalLimit":1,"activationLimitGlobalRelativeMinutes":null,"storeCatalog":"string","storeItemType":"ALL","storeIds":["string"],"targetType":"ALL","targetSegment":["string"],"price":0,"priority":250,"voucherPool":{"enabled":false,"uuid":"095be615-a8ad-4c33-8e9c-c7612fbf6c9f","transferable":false},"importHash":"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9"}');

            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/v4/promotions/promotion")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"visibilityStatus\":\"DRAFT\",\"type\":\"MEMBERS_ONLY\",\"redeemLimitPerClient\":0,\"redeemQuantityPerActivation\":8388607,\"redeemLimitGlobal\":0,\"redeemType\":\"FULL\",\"details\":{\"discountType\":{\"name\":\"BOGO\",\"outerScope\":true,\"requiredItemsCount\":2,\"requiredItems\":{\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"]},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.01,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}},\"discountType\":\"PERCENT\",\"discountValue\":0,\"discountMode\":\"STATIC\",\"discountModeDetails\":{\"discountSteps\":[{\"discountValue\":0,\"usageThreshold\":0}],\"discountUsageTrigger\":\"TRANSACTION\"},\"preDiscountValue\":0,\"requireRedeemedPoints\":0,\"headerName\":\"string\",\"headerDescription\":\"string\",\"name\":\"string\",\"headline\":\"string\",\"description\":\"string\",\"images\":[{\"url\":\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\",\"type\":\"image\"}],\"tags\":[{\"hash\":\"6f54671d-157f-4c4e-a577-11fac3111293\"}],\"startAt\":\"2019-08-24T14:15:22Z\",\"expireAt\":\"2019-08-24T14:15:22Z\",\"displayFrom\":\"string\",\"displayTo\":\"string\",\"lastingTime\":0,\"params\":{},\"itemScope\":\"LINE_ITEM\",\"minBasketValue\":null,\"maxBasketValue\":null,\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"],\"excludeCatalog\":[\"311\"],\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"29727276\"],\"excludeCatalogFilterIds\":[],\"activationLimitGlobalType\":\"RELATIVE\",\"activationLimitGlobalLimit\":1,\"activationLimitGlobalRelativeMinutes\":null,\"storeCatalog\":\"string\",\"storeItemType\":\"ALL\",\"storeIds\":[\"string\"],\"targetType\":\"ALL\",\"targetSegment\":[\"string\"],\"price\":0,\"priority\":250,\"voucherPool\":{\"enabled\":false,\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"transferable\":false},\"importHash\":\"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9\"}")
              .asString();
    delete:
      tags:
        - Promotions
      summary: Delete a promotion
      description: |
        This method is used to delete an existing promotion. It can be used by a backend business administrator.

        ---

        **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:** `PROMOTIONS_PROMOTIONS_DELETE`

        **User role permission required:** `campaigns_promotions: delete`
      operationId: DeleteAPromotion
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-promotionDataDelete"
            example:
              value: 8f3457075b2769d039
        required: true
      responses:
        "200":
          description: Promotion deleted
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionCreateUpdateDeleteRes"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          $ref: "#/components/responses/promotions-Promotion404"
        "409":
          $ref: "#/components/responses/promotions-WaitingForProfileLockReleaseError"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/DeleteAPromotion
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/v4/promotions/promotion \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"value":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"value\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("DELETE", "/v4/promotions/promotion", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "value": "string"
            });

            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/v4/promotions/promotion");
            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": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/promotion",
              "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({value: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"value":"string"}');

            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/v4/promotions/promotion")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"value\":\"string\"}")
              .asString();
  /v4/promotions/promotion/create-or-update:
    post:
      tags:
        - Promotions
      summary: Create or update a promotion
      description: |
        You can use this endpoint to create a new promotion or update an existing one that matches the UUID or promotion code that you send.


        When updating an existing promotion include only the fields that you want to change. Inserting a null value overwrites an existing value.

        ---

        **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 permissions required (at least one):** `PROMOTIONS_PROMOTIONS_CREATE`, `PROMOTIONS_PROMOTIONS_UPDATE`

        **User role permission required:** `campaigns_promotions: create`
      operationId: CreateOrUpdateAPromotion
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-promotionDataCreateOrUpdate"
        required: true
      responses:
        "200":
          $ref: "#/components/responses/promotions-PromotionUpdated"
        "201":
          $ref: "#/components/responses/promotions-PromotionCreated"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/CreateOrUpdateAPromotion
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/promotion/create-or-update \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"uuid":"string","code":"string","visibilityStatus":"DRAFT","type":"MEMBERS_ONLY","redeemLimitPerClient":0,"redeemQuantityPerActivation":8388607,"redeemLimitGlobal":0,"redeemType":"FULL","discountType":"PERCENT","details":{"discountType":{"name":"BOGO","outerScope":true,"requiredItemsCount":2,"requiredItems":{"catalog":"221","catalogItemType":"FILTERED","catalogIndexItems":[],"catalogFilterIds":["f978b20f-7156-40ed-99c2-3af62b76af12"]},"discountedItemsCount":1},"cashbackSettings":{"exchangeRate":0.01,"limits":{"minPoints":10,"maxPoints":1000,"maxTransactionAmount":20,"maxTransactionPercentage":50}}},"discountValue":0,"discountMode":"STATIC","discountModeDetails":{"discountSteps":[{"discountValue":0,"usageThreshold":0}],"discountUsageTrigger":"TRANSACTION"},"preDiscountValue":0,"requireRedeemedPoints":0,"headerName":"string","headerDescription":"string","name":"string","headline":"string","description":"string","images":[{"url":"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png","type":"image"}],"tags":[{"hash":"6f54671d-157f-4c4e-a577-11fac3111293"}],"startAt":"2019-08-24T14:15:22Z","expireAt":"2019-08-24T14:15:22Z","displayFrom":"string","displayTo":"string","lastingTime":0,"params":{},"itemScope":"LINE_ITEM","minBasketValue":null,"maxBasketValue":null,"catalog":"221","catalogItemType":"FILTERED","catalogIndexItems":[],"catalogFilterIds":["f978b20f-7156-40ed-99c2-3af62b76af12"],"excludeCatalog":["311"],"excludeCatalogItemType":"SELECTED","excludeCatalogIndexItems":["29727276"],"excludeCatalogFilterIds":[],"storeCatalog":"string","storeItemType":"ALL","storeIds":["string"],"targetType":"ALL","targetSegment":["string"],"price":0,"priority":250,"voucherPool":{"enabled":false,"uuid":"095be615-a8ad-4c33-8e9c-c7612fbf6c9f","transferable":false},"importHash":"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"uuid\":\"string\",\"code\":\"string\",\"visibilityStatus\":\"DRAFT\",\"type\":\"MEMBERS_ONLY\",\"redeemLimitPerClient\":0,\"redeemQuantityPerActivation\":8388607,\"redeemLimitGlobal\":0,\"redeemType\":\"FULL\",\"discountType\":\"PERCENT\",\"details\":{\"discountType\":{\"name\":\"BOGO\",\"outerScope\":true,\"requiredItemsCount\":2,\"requiredItems\":{\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"]},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.01,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}},\"discountValue\":0,\"discountMode\":\"STATIC\",\"discountModeDetails\":{\"discountSteps\":[{\"discountValue\":0,\"usageThreshold\":0}],\"discountUsageTrigger\":\"TRANSACTION\"},\"preDiscountValue\":0,\"requireRedeemedPoints\":0,\"headerName\":\"string\",\"headerDescription\":\"string\",\"name\":\"string\",\"headline\":\"string\",\"description\":\"string\",\"images\":[{\"url\":\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\",\"type\":\"image\"}],\"tags\":[{\"hash\":\"6f54671d-157f-4c4e-a577-11fac3111293\"}],\"startAt\":\"2019-08-24T14:15:22Z\",\"expireAt\":\"2019-08-24T14:15:22Z\",\"displayFrom\":\"string\",\"displayTo\":\"string\",\"lastingTime\":0,\"params\":{},\"itemScope\":\"LINE_ITEM\",\"minBasketValue\":null,\"maxBasketValue\":null,\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"],\"excludeCatalog\":[\"311\"],\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"29727276\"],\"excludeCatalogFilterIds\":[],\"storeCatalog\":\"string\",\"storeItemType\":\"ALL\",\"storeIds\":[\"string\"],\"targetType\":\"ALL\",\"targetSegment\":[\"string\"],\"price\":0,\"priority\":250,\"voucherPool\":{\"enabled\":false,\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"transferable\":false},\"importHash\":\"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/promotions/promotion/create-or-update", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "uuid": "string",
              "code": "string",
              "visibilityStatus": "DRAFT",
              "type": "MEMBERS_ONLY",
              "redeemLimitPerClient": 0,
              "redeemQuantityPerActivation": 8388607,
              "redeemLimitGlobal": 0,
              "redeemType": "FULL",
              "discountType": "PERCENT",
              "details": {
                "discountType": {
                  "name": "BOGO",
                  "outerScope": true,
                  "requiredItemsCount": 2,
                  "requiredItems": {
                    "catalog": "221",
                    "catalogItemType": "FILTERED",
                    "catalogIndexItems": [],
                    "catalogFilterIds": [
                      "f978b20f-7156-40ed-99c2-3af62b76af12"
                    ]
                  },
                  "discountedItemsCount": 1
                },
                "cashbackSettings": {
                  "exchangeRate": 0.01,
                  "limits": {
                    "minPoints": 10,
                    "maxPoints": 1000,
                    "maxTransactionAmount": 20,
                    "maxTransactionPercentage": 50
                  }
                }
              },
              "discountValue": 0,
              "discountMode": "STATIC",
              "discountModeDetails": {
                "discountSteps": [
                  {
                    "discountValue": 0,
                    "usageThreshold": 0
                  }
                ],
                "discountUsageTrigger": "TRANSACTION"
              },
              "preDiscountValue": 0,
              "requireRedeemedPoints": 0,
              "headerName": "string",
              "headerDescription": "string",
              "name": "string",
              "headline": "string",
              "description": "string",
              "images": [
                {
                  "url": "https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png",
                  "type": "image"
                }
              ],
              "tags": [
                {
                  "hash": "6f54671d-157f-4c4e-a577-11fac3111293"
                }
              ],
              "startAt": "2019-08-24T14:15:22Z",
              "expireAt": "2019-08-24T14:15:22Z",
              "displayFrom": "string",
              "displayTo": "string",
              "lastingTime": 0,
              "params": {},
              "itemScope": "LINE_ITEM",
              "minBasketValue": null,
              "maxBasketValue": null,
              "catalog": "221",
              "catalogItemType": "FILTERED",
              "catalogIndexItems": [],
              "catalogFilterIds": [
                "f978b20f-7156-40ed-99c2-3af62b76af12"
              ],
              "excludeCatalog": [
                "311"
              ],
              "excludeCatalogItemType": "SELECTED",
              "excludeCatalogIndexItems": [
                "29727276"
              ],
              "excludeCatalogFilterIds": [],
              "storeCatalog": "string",
              "storeItemType": "ALL",
              "storeIds": [
                "string"
              ],
              "targetType": "ALL",
              "targetSegment": [
                "string"
              ],
              "price": 0,
              "priority": 250,
              "voucherPool": {
                "enabled": false,
                "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
                "transferable": false
              },
              "importHash": "ced8a4ad-6d6e-48ca-a663-3fb07e6216a9"
            });

            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/v4/promotions/promotion/create-or-update");
            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": "/v4/promotions/promotion/create-or-update",
              "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({
              uuid: 'string',
              code: 'string',
              visibilityStatus: 'DRAFT',
              type: 'MEMBERS_ONLY',
              redeemLimitPerClient: 0,
              redeemQuantityPerActivation: 8388607,
              redeemLimitGlobal: 0,
              redeemType: 'FULL',
              discountType: 'PERCENT',
              details: {
                discountType: {
                  name: 'BOGO',
                  outerScope: true,
                  requiredItemsCount: 2,
                  requiredItems: {
                    catalog: '221',
                    catalogItemType: 'FILTERED',
                    catalogIndexItems: [],
                    catalogFilterIds: ['f978b20f-7156-40ed-99c2-3af62b76af12']
                  },
                  discountedItemsCount: 1
                },
                cashbackSettings: {
                  exchangeRate: 0.01,
                  limits: {
                    minPoints: 10,
                    maxPoints: 1000,
                    maxTransactionAmount: 20,
                    maxTransactionPercentage: 50
                  }
                }
              },
              discountValue: 0,
              discountMode: 'STATIC',
              discountModeDetails: {
                discountSteps: [{discountValue: 0, usageThreshold: 0}],
                discountUsageTrigger: 'TRANSACTION'
              },
              preDiscountValue: 0,
              requireRedeemedPoints: 0,
              headerName: 'string',
              headerDescription: 'string',
              name: 'string',
              headline: 'string',
              description: 'string',
              images: [
                {
                  url: 'https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png',
                  type: 'image'
                }
              ],
              tags: [{hash: '6f54671d-157f-4c4e-a577-11fac3111293'}],
              startAt: '2019-08-24T14:15:22Z',
              expireAt: '2019-08-24T14:15:22Z',
              displayFrom: 'string',
              displayTo: 'string',
              lastingTime: 0,
              params: {},
              itemScope: 'LINE_ITEM',
              minBasketValue: null,
              maxBasketValue: null,
              catalog: '221',
              catalogItemType: 'FILTERED',
              catalogIndexItems: [],
              catalogFilterIds: ['f978b20f-7156-40ed-99c2-3af62b76af12'],
              excludeCatalog: ['311'],
              excludeCatalogItemType: 'SELECTED',
              excludeCatalogIndexItems: ['29727276'],
              excludeCatalogFilterIds: [],
              storeCatalog: 'string',
              storeItemType: 'ALL',
              storeIds: ['string'],
              targetType: 'ALL',
              targetSegment: ['string'],
              price: 0,
              priority: 250,
              voucherPool: {
                enabled: false,
                uuid: '095be615-a8ad-4c33-8e9c-c7612fbf6c9f',
                transferable: false
              },
              importHash: 'ced8a4ad-6d6e-48ca-a663-3fb07e6216a9'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/create-or-update');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"uuid":"string","code":"string","visibilityStatus":"DRAFT","type":"MEMBERS_ONLY","redeemLimitPerClient":0,"redeemQuantityPerActivation":8388607,"redeemLimitGlobal":0,"redeemType":"FULL","discountType":"PERCENT","details":{"discountType":{"name":"BOGO","outerScope":true,"requiredItemsCount":2,"requiredItems":{"catalog":"221","catalogItemType":"FILTERED","catalogIndexItems":[],"catalogFilterIds":["f978b20f-7156-40ed-99c2-3af62b76af12"]},"discountedItemsCount":1},"cashbackSettings":{"exchangeRate":0.01,"limits":{"minPoints":10,"maxPoints":1000,"maxTransactionAmount":20,"maxTransactionPercentage":50}}},"discountValue":0,"discountMode":"STATIC","discountModeDetails":{"discountSteps":[{"discountValue":0,"usageThreshold":0}],"discountUsageTrigger":"TRANSACTION"},"preDiscountValue":0,"requireRedeemedPoints":0,"headerName":"string","headerDescription":"string","name":"string","headline":"string","description":"string","images":[{"url":"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png","type":"image"}],"tags":[{"hash":"6f54671d-157f-4c4e-a577-11fac3111293"}],"startAt":"2019-08-24T14:15:22Z","expireAt":"2019-08-24T14:15:22Z","displayFrom":"string","displayTo":"string","lastingTime":0,"params":{},"itemScope":"LINE_ITEM","minBasketValue":null,"maxBasketValue":null,"catalog":"221","catalogItemType":"FILTERED","catalogIndexItems":[],"catalogFilterIds":["f978b20f-7156-40ed-99c2-3af62b76af12"],"excludeCatalog":["311"],"excludeCatalogItemType":"SELECTED","excludeCatalogIndexItems":["29727276"],"excludeCatalogFilterIds":[],"storeCatalog":"string","storeItemType":"ALL","storeIds":["string"],"targetType":"ALL","targetSegment":["string"],"price":0,"priority":250,"voucherPool":{"enabled":false,"uuid":"095be615-a8ad-4c33-8e9c-c7612fbf6c9f","transferable":false},"importHash":"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9"}');

            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/v4/promotions/promotion/create-or-update")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"uuid\":\"string\",\"code\":\"string\",\"visibilityStatus\":\"DRAFT\",\"type\":\"MEMBERS_ONLY\",\"redeemLimitPerClient\":0,\"redeemQuantityPerActivation\":8388607,\"redeemLimitGlobal\":0,\"redeemType\":\"FULL\",\"discountType\":\"PERCENT\",\"details\":{\"discountType\":{\"name\":\"BOGO\",\"outerScope\":true,\"requiredItemsCount\":2,\"requiredItems\":{\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"]},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.01,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}},\"discountValue\":0,\"discountMode\":\"STATIC\",\"discountModeDetails\":{\"discountSteps\":[{\"discountValue\":0,\"usageThreshold\":0}],\"discountUsageTrigger\":\"TRANSACTION\"},\"preDiscountValue\":0,\"requireRedeemedPoints\":0,\"headerName\":\"string\",\"headerDescription\":\"string\",\"name\":\"string\",\"headline\":\"string\",\"description\":\"string\",\"images\":[{\"url\":\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\",\"type\":\"image\"}],\"tags\":[{\"hash\":\"6f54671d-157f-4c4e-a577-11fac3111293\"}],\"startAt\":\"2019-08-24T14:15:22Z\",\"expireAt\":\"2019-08-24T14:15:22Z\",\"displayFrom\":\"string\",\"displayTo\":\"string\",\"lastingTime\":0,\"params\":{},\"itemScope\":\"LINE_ITEM\",\"minBasketValue\":null,\"maxBasketValue\":null,\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"],\"excludeCatalog\":[\"311\"],\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"29727276\"],\"excludeCatalogFilterIds\":[],\"storeCatalog\":\"string\",\"storeItemType\":\"ALL\",\"storeIds\":[\"string\"],\"targetType\":\"ALL\",\"targetSegment\":[\"string\"],\"price\":0,\"priority\":250,\"voucherPool\":{\"enabled\":false,\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"transferable\":false},\"importHash\":\"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9\"}")
              .asString();
  /v4/promotions/promotion/locking/check-client:
    get:
      tags:
        - Promotion locks
      summary: Check account lock
      description: |
        You can check if a Profile account is locked due to processing of batch promotion/voucher activations or deactivations.


        You must be logged in as the Profile.

        ---

        **API consumers:** <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>
      operationId: CheckAccountLock
      responses:
        "200":
          description: Information about Profile lock
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-HTTP200withMessage"
              example:
                message: Profile is unlocked and ready for traffic
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotion-locks/operation/CheckAccountLock
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/promotions/promotion/locking/check-client \
              --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", "/v4/promotions/promotion/locking/check-client", 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/v4/promotions/promotion/locking/check-client");
            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": "/v4/promotions/promotion/locking/check-client",
              "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/v4/promotions/promotion/locking/check-client');
            $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/v4/promotions/promotion/locking/check-client")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/voucher/batch-redeem:
    post:
      tags:
        - Promotions
      summary: Batch redeem vouchers
      description: |
        You can redeem up to 100 vouchers.

        ---

        **API consumers:** <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>

        **User role permission required:** `campaigns_promotions: create`
      operationId: BatchRedeemVouchers
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-RedeemVouchersRequest"
        required: true
      responses:
        "200":
          $ref: "#/components/responses/promotions-VouchersRedeemedResponse"
        "207":
          $ref: "#/components/responses/promotions-VouchersRedeemedResponseWithErrors"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/BatchRedeemVouchers
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/voucher/batch-redeem \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '[{"voucherKey":"code","voucherValue":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9","options":{"quantity":1,"sourceId":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1","orderId":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1","lockIdentifier":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9"}}]'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "[{\"voucherKey\":\"code\",\"voucherValue\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\",\"options\":{\"quantity\":1,\"sourceId\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1\",\"orderId\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1\",\"lockIdentifier\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\"}}]"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/promotions/voucher/batch-redeem", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              {
                "voucherKey": "code",
                "voucherValue": "75d9090f-06ac-46a2-a0ce-4b8eb287efb9",
                "options": {
                  "quantity": 1,
                  "sourceId": "75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1",
                  "orderId": "75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1",
                  "lockIdentifier": "75d9090f-06ac-46a2-a0ce-4b8eb287efb9"
                }
              }
            ]);

            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/v4/promotions/voucher/batch-redeem");
            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": "/v4/promotions/voucher/batch-redeem",
              "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([
              {
                voucherKey: 'code',
                voucherValue: '75d9090f-06ac-46a2-a0ce-4b8eb287efb9',
                options: {
                  quantity: 1,
                  sourceId: '75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1',
                  orderId: '75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1',
                  lockIdentifier: '75d9090f-06ac-46a2-a0ce-4b8eb287efb9'
                }
              }
            ]));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/voucher/batch-redeem');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('[{"voucherKey":"code","voucherValue":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9","options":{"quantity":1,"sourceId":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1","orderId":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1","lockIdentifier":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9"}}]');

            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/v4/promotions/voucher/batch-redeem")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[{\"voucherKey\":\"code\",\"voucherValue\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\",\"options\":{\"quantity\":1,\"sourceId\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1\",\"orderId\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1\",\"lockIdentifier\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\"}}]")
              .asString();
  /v4/promotions/voucher/batch-redeem-for-profile:
    post:
      tags:
        - Promotions
      summary: Batch redeem vouchers for profiles
      description: |
        You can redeem up to 100 vouchers.

        ---

        **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:** `PROMOTIONS_BATCH_REDEEM_VOUCHERS_PROMOTIONS_CREATE`

        **User role permission required:** `campaigns_promotions: create`
      operationId: BatchRedeemVouchersForProfile
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-RedeemVouchersForProfileRequest"
        required: true
      responses:
        "200":
          $ref: "#/components/responses/promotions-VouchersRedeemedResponse"
        "207":
          $ref: "#/components/responses/promotions-VouchersRedeemedResponseWithErrors"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/BatchRedeemVouchersForProfile
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/voucher/batch-redeem-for-profile \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '[{"profileKey":"clientId","profileValue":"434428563","voucherKey":"code","voucherValue":"434428563","options":{"quantity":2,"sourceId":"3f0a1670-eb63-43f1-a6b8-895a74621964-3","orderId":"3f0a1670-eb63-43f1-a6b8-895a74621964"}}]'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "[{\"profileKey\":\"clientId\",\"profileValue\":\"434428563\",\"voucherKey\":\"code\",\"voucherValue\":\"434428563\",\"options\":{\"quantity\":2,\"sourceId\":\"3f0a1670-eb63-43f1-a6b8-895a74621964-3\",\"orderId\":\"3f0a1670-eb63-43f1-a6b8-895a74621964\"}}]"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/promotions/voucher/batch-redeem-for-profile", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              {
                "profileKey": "clientId",
                "profileValue": "434428563",
                "voucherKey": "code",
                "voucherValue": "434428563",
                "options": {
                  "quantity": 2,
                  "sourceId": "3f0a1670-eb63-43f1-a6b8-895a74621964-3",
                  "orderId": "3f0a1670-eb63-43f1-a6b8-895a74621964"
                }
              }
            ]);

            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/v4/promotions/voucher/batch-redeem-for-profile");
            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": "/v4/promotions/voucher/batch-redeem-for-profile",
              "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([
              {
                profileKey: 'clientId',
                profileValue: '434428563',
                voucherKey: 'code',
                voucherValue: '434428563',
                options: {
                  quantity: 2,
                  sourceId: '3f0a1670-eb63-43f1-a6b8-895a74621964-3',
                  orderId: '3f0a1670-eb63-43f1-a6b8-895a74621964'
                }
              }
            ]));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/voucher/batch-redeem-for-profile');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('[{"profileKey":"clientId","profileValue":"434428563","voucherKey":"code","voucherValue":"434428563","options":{"quantity":2,"sourceId":"3f0a1670-eb63-43f1-a6b8-895a74621964-3","orderId":"3f0a1670-eb63-43f1-a6b8-895a74621964"}}]');

            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/v4/promotions/voucher/batch-redeem-for-profile")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[{\"profileKey\":\"clientId\",\"profileValue\":\"434428563\",\"voucherKey\":\"code\",\"voucherValue\":\"434428563\",\"options\":{\"quantity\":2,\"sourceId\":\"3f0a1670-eb63-43f1-a6b8-895a74621964-3\",\"orderId\":\"3f0a1670-eb63-43f1-a6b8-895a74621964\"}}]")
              .asString();
  /v4/promotions/v2/promotion/batch:
    post:
      tags:
        - Promotions
      summary: Batch import promotions
      description: |
        Submit a batch of promotions for asynchronous import (upsert). Items are validated individually and queued for processing. Returns 202 if all items are valid, or 207 if some fail validation.

        ---

        **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:** `PROMOTIONS_IMPORT_PROMOTIONS_CREATE`

        **User role permission required:** `campaigns_promotions: create`
      operationId: BatchImportPromotions
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-PromotionImportBatchRequest"
        required: true
      responses:
        "202":
          description: All items accepted for processing
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionImportBatchAcceptedResponse"
        "207":
          $ref: "#/components/responses/promotions-PromotionImportBatchPartialError"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/BatchImportPromotions
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/v2/promotion/batch \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"data":[{"uuid":"string","code":"string","visibilityStatus":"DRAFT","type":"MEMBERS_ONLY","redeemLimitPerClient":0,"redeemQuantityPerActivation":8388607,"redeemLimitGlobal":0,"redeemType":"FULL","autoRedeem":true,"activationLimitGlobalType":"RELATIVE","activationLimitGlobalLimit":1,"activationLimitGlobalRelativeMinutes":null,"discountType":"PERCENT","details":{"discountType":{"name":"BOGO","outerScope":true,"requiredItemsCount":2,"requiredItems":{"catalog":"221","catalogItemType":"FILTERED","catalogIndexItems":[],"catalogFilterIds":["f978b20f-7156-40ed-99c2-3af62b76af12"]},"discountedItemsCount":1},"cashbackSettings":{"exchangeRate":0.01,"limits":{"minPoints":10,"maxPoints":1000,"maxTransactionAmount":20,"maxTransactionPercentage":50}}},"discountValue":0,"discountMode":"STATIC","discountModeDetails":{"steps":[{"discountValue":0,"usageThreshold":0}],"discountUsageTrigger":"TRANSACTION"},"preDiscountValue":0,"requireRedeemedPoints":0,"headerName":"string","headerDescription":"string","name":"string","headline":"string","description":"string","images":[{"url":"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png","type":"image"}],"tags":[{"hash":"6f54671d-157f-4c4e-a577-11fac3111293"}],"metric":"string","startAt":"2019-08-24T14:15:22Z","expireAt":"2019-08-24T14:15:22Z","displayFrom":"string","displayTo":"string","lastingTime":0,"params":{},"itemScope":"LINE_ITEM","minBasketValue":null,"maxBasketValue":null,"catalog":"string","catalogItemType":"FILTERED","catalogIndexItems":["string"],"catalogFilterIds":["string"],"excludeCatalog":"string","excludeCatalogItemType":"SELECTED","excludeCatalogIndexItems":["string"],"excludeCatalogFilterIds":["string"],"storeCatalog":"string","storeItemType":"ALL","storeIds":["string"],"targetType":"ALL","targetSegment":["string"],"price":0,"priority":250,"voucherPool":{"enabled":false,"uuid":"095be615-a8ad-4c33-8e9c-c7612fbf6c9f","transferable":false}}],"extra":{"importHash":"string"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"data\":[{\"uuid\":\"string\",\"code\":\"string\",\"visibilityStatus\":\"DRAFT\",\"type\":\"MEMBERS_ONLY\",\"redeemLimitPerClient\":0,\"redeemQuantityPerActivation\":8388607,\"redeemLimitGlobal\":0,\"redeemType\":\"FULL\",\"autoRedeem\":true,\"activationLimitGlobalType\":\"RELATIVE\",\"activationLimitGlobalLimit\":1,\"activationLimitGlobalRelativeMinutes\":null,\"discountType\":\"PERCENT\",\"details\":{\"discountType\":{\"name\":\"BOGO\",\"outerScope\":true,\"requiredItemsCount\":2,\"requiredItems\":{\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"]},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.01,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}},\"discountValue\":0,\"discountMode\":\"STATIC\",\"discountModeDetails\":{\"steps\":[{\"discountValue\":0,\"usageThreshold\":0}],\"discountUsageTrigger\":\"TRANSACTION\"},\"preDiscountValue\":0,\"requireRedeemedPoints\":0,\"headerName\":\"string\",\"headerDescription\":\"string\",\"name\":\"string\",\"headline\":\"string\",\"description\":\"string\",\"images\":[{\"url\":\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\",\"type\":\"image\"}],\"tags\":[{\"hash\":\"6f54671d-157f-4c4e-a577-11fac3111293\"}],\"metric\":\"string\",\"startAt\":\"2019-08-24T14:15:22Z\",\"expireAt\":\"2019-08-24T14:15:22Z\",\"displayFrom\":\"string\",\"displayTo\":\"string\",\"lastingTime\":0,\"params\":{},\"itemScope\":\"LINE_ITEM\",\"minBasketValue\":null,\"maxBasketValue\":null,\"catalog\":\"string\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[\"string\"],\"catalogFilterIds\":[\"string\"],\"excludeCatalog\":\"string\",\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"string\"],\"excludeCatalogFilterIds\":[\"string\"],\"storeCatalog\":\"string\",\"storeItemType\":\"ALL\",\"storeIds\":[\"string\"],\"targetType\":\"ALL\",\"targetSegment\":[\"string\"],\"price\":0,\"priority\":250,\"voucherPool\":{\"enabled\":false,\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"transferable\":false}}],\"extra\":{\"importHash\":\"string\"}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/promotions/v2/promotion/batch", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "data": [
                {
                  "uuid": "string",
                  "code": "string",
                  "visibilityStatus": "DRAFT",
                  "type": "MEMBERS_ONLY",
                  "redeemLimitPerClient": 0,
                  "redeemQuantityPerActivation": 8388607,
                  "redeemLimitGlobal": 0,
                  "redeemType": "FULL",
                  "autoRedeem": true,
                  "activationLimitGlobalType": "RELATIVE",
                  "activationLimitGlobalLimit": 1,
                  "activationLimitGlobalRelativeMinutes": null,
                  "discountType": "PERCENT",
                  "details": {
                    "discountType": {
                      "name": "BOGO",
                      "outerScope": true,
                      "requiredItemsCount": 2,
                      "requiredItems": {
                        "catalog": "221",
                        "catalogItemType": "FILTERED",
                        "catalogIndexItems": [],
                        "catalogFilterIds": [
                          "f978b20f-7156-40ed-99c2-3af62b76af12"
                        ]
                      },
                      "discountedItemsCount": 1
                    },
                    "cashbackSettings": {
                      "exchangeRate": 0.01,
                      "limits": {
                        "minPoints": 10,
                        "maxPoints": 1000,
                        "maxTransactionAmount": 20,
                        "maxTransactionPercentage": 50
                      }
                    }
                  },
                  "discountValue": 0,
                  "discountMode": "STATIC",
                  "discountModeDetails": {
                    "steps": [
                      {
                        "discountValue": 0,
                        "usageThreshold": 0
                      }
                    ],
                    "discountUsageTrigger": "TRANSACTION"
                  },
                  "preDiscountValue": 0,
                  "requireRedeemedPoints": 0,
                  "headerName": "string",
                  "headerDescription": "string",
                  "name": "string",
                  "headline": "string",
                  "description": "string",
                  "images": [
                    {
                      "url": "https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png",
                      "type": "image"
                    }
                  ],
                  "tags": [
                    {
                      "hash": "6f54671d-157f-4c4e-a577-11fac3111293"
                    }
                  ],
                  "metric": "string",
                  "startAt": "2019-08-24T14:15:22Z",
                  "expireAt": "2019-08-24T14:15:22Z",
                  "displayFrom": "string",
                  "displayTo": "string",
                  "lastingTime": 0,
                  "params": {},
                  "itemScope": "LINE_ITEM",
                  "minBasketValue": null,
                  "maxBasketValue": null,
                  "catalog": "string",
                  "catalogItemType": "FILTERED",
                  "catalogIndexItems": [
                    "string"
                  ],
                  "catalogFilterIds": [
                    "string"
                  ],
                  "excludeCatalog": "string",
                  "excludeCatalogItemType": "SELECTED",
                  "excludeCatalogIndexItems": [
                    "string"
                  ],
                  "excludeCatalogFilterIds": [
                    "string"
                  ],
                  "storeCatalog": "string",
                  "storeItemType": "ALL",
                  "storeIds": [
                    "string"
                  ],
                  "targetType": "ALL",
                  "targetSegment": [
                    "string"
                  ],
                  "price": 0,
                  "priority": 250,
                  "voucherPool": {
                    "enabled": false,
                    "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
                    "transferable": false
                  }
                }
              ],
              "extra": {
                "importHash": "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/v4/promotions/v2/promotion/batch");
            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": "/v4/promotions/v2/promotion/batch",
              "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({
              data: [
                {
                  uuid: 'string',
                  code: 'string',
                  visibilityStatus: 'DRAFT',
                  type: 'MEMBERS_ONLY',
                  redeemLimitPerClient: 0,
                  redeemQuantityPerActivation: 8388607,
                  redeemLimitGlobal: 0,
                  redeemType: 'FULL',
                  autoRedeem: true,
                  activationLimitGlobalType: 'RELATIVE',
                  activationLimitGlobalLimit: 1,
                  activationLimitGlobalRelativeMinutes: null,
                  discountType: 'PERCENT',
                  details: {
                    discountType: {
                      name: 'BOGO',
                      outerScope: true,
                      requiredItemsCount: 2,
                      requiredItems: {
                        catalog: '221',
                        catalogItemType: 'FILTERED',
                        catalogIndexItems: [],
                        catalogFilterIds: ['f978b20f-7156-40ed-99c2-3af62b76af12']
                      },
                      discountedItemsCount: 1
                    },
                    cashbackSettings: {
                      exchangeRate: 0.01,
                      limits: {
                        minPoints: 10,
                        maxPoints: 1000,
                        maxTransactionAmount: 20,
                        maxTransactionPercentage: 50
                      }
                    }
                  },
                  discountValue: 0,
                  discountMode: 'STATIC',
                  discountModeDetails: {
                    steps: [{discountValue: 0, usageThreshold: 0}],
                    discountUsageTrigger: 'TRANSACTION'
                  },
                  preDiscountValue: 0,
                  requireRedeemedPoints: 0,
                  headerName: 'string',
                  headerDescription: 'string',
                  name: 'string',
                  headline: 'string',
                  description: 'string',
                  images: [
                    {
                      url: 'https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png',
                      type: 'image'
                    }
                  ],
                  tags: [{hash: '6f54671d-157f-4c4e-a577-11fac3111293'}],
                  metric: 'string',
                  startAt: '2019-08-24T14:15:22Z',
                  expireAt: '2019-08-24T14:15:22Z',
                  displayFrom: 'string',
                  displayTo: 'string',
                  lastingTime: 0,
                  params: {},
                  itemScope: 'LINE_ITEM',
                  minBasketValue: null,
                  maxBasketValue: null,
                  catalog: 'string',
                  catalogItemType: 'FILTERED',
                  catalogIndexItems: ['string'],
                  catalogFilterIds: ['string'],
                  excludeCatalog: 'string',
                  excludeCatalogItemType: 'SELECTED',
                  excludeCatalogIndexItems: ['string'],
                  excludeCatalogFilterIds: ['string'],
                  storeCatalog: 'string',
                  storeItemType: 'ALL',
                  storeIds: ['string'],
                  targetType: 'ALL',
                  targetSegment: ['string'],
                  price: 0,
                  priority: 250,
                  voucherPool: {
                    enabled: false,
                    uuid: '095be615-a8ad-4c33-8e9c-c7612fbf6c9f',
                    transferable: false
                  }
                }
              ],
              extra: {importHash: 'string'}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/v2/promotion/batch');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"data":[{"uuid":"string","code":"string","visibilityStatus":"DRAFT","type":"MEMBERS_ONLY","redeemLimitPerClient":0,"redeemQuantityPerActivation":8388607,"redeemLimitGlobal":0,"redeemType":"FULL","autoRedeem":true,"activationLimitGlobalType":"RELATIVE","activationLimitGlobalLimit":1,"activationLimitGlobalRelativeMinutes":null,"discountType":"PERCENT","details":{"discountType":{"name":"BOGO","outerScope":true,"requiredItemsCount":2,"requiredItems":{"catalog":"221","catalogItemType":"FILTERED","catalogIndexItems":[],"catalogFilterIds":["f978b20f-7156-40ed-99c2-3af62b76af12"]},"discountedItemsCount":1},"cashbackSettings":{"exchangeRate":0.01,"limits":{"minPoints":10,"maxPoints":1000,"maxTransactionAmount":20,"maxTransactionPercentage":50}}},"discountValue":0,"discountMode":"STATIC","discountModeDetails":{"steps":[{"discountValue":0,"usageThreshold":0}],"discountUsageTrigger":"TRANSACTION"},"preDiscountValue":0,"requireRedeemedPoints":0,"headerName":"string","headerDescription":"string","name":"string","headline":"string","description":"string","images":[{"url":"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png","type":"image"}],"tags":[{"hash":"6f54671d-157f-4c4e-a577-11fac3111293"}],"metric":"string","startAt":"2019-08-24T14:15:22Z","expireAt":"2019-08-24T14:15:22Z","displayFrom":"string","displayTo":"string","lastingTime":0,"params":{},"itemScope":"LINE_ITEM","minBasketValue":null,"maxBasketValue":null,"catalog":"string","catalogItemType":"FILTERED","catalogIndexItems":["string"],"catalogFilterIds":["string"],"excludeCatalog":"string","excludeCatalogItemType":"SELECTED","excludeCatalogIndexItems":["string"],"excludeCatalogFilterIds":["string"],"storeCatalog":"string","storeItemType":"ALL","storeIds":["string"],"targetType":"ALL","targetSegment":["string"],"price":0,"priority":250,"voucherPool":{"enabled":false,"uuid":"095be615-a8ad-4c33-8e9c-c7612fbf6c9f","transferable":false}}],"extra":{"importHash":"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/v4/promotions/v2/promotion/batch")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"data\":[{\"uuid\":\"string\",\"code\":\"string\",\"visibilityStatus\":\"DRAFT\",\"type\":\"MEMBERS_ONLY\",\"redeemLimitPerClient\":0,\"redeemQuantityPerActivation\":8388607,\"redeemLimitGlobal\":0,\"redeemType\":\"FULL\",\"autoRedeem\":true,\"activationLimitGlobalType\":\"RELATIVE\",\"activationLimitGlobalLimit\":1,\"activationLimitGlobalRelativeMinutes\":null,\"discountType\":\"PERCENT\",\"details\":{\"discountType\":{\"name\":\"BOGO\",\"outerScope\":true,\"requiredItemsCount\":2,\"requiredItems\":{\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"]},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.01,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}},\"discountValue\":0,\"discountMode\":\"STATIC\",\"discountModeDetails\":{\"steps\":[{\"discountValue\":0,\"usageThreshold\":0}],\"discountUsageTrigger\":\"TRANSACTION\"},\"preDiscountValue\":0,\"requireRedeemedPoints\":0,\"headerName\":\"string\",\"headerDescription\":\"string\",\"name\":\"string\",\"headline\":\"string\",\"description\":\"string\",\"images\":[{\"url\":\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\",\"type\":\"image\"}],\"tags\":[{\"hash\":\"6f54671d-157f-4c4e-a577-11fac3111293\"}],\"metric\":\"string\",\"startAt\":\"2019-08-24T14:15:22Z\",\"expireAt\":\"2019-08-24T14:15:22Z\",\"displayFrom\":\"string\",\"displayTo\":\"string\",\"lastingTime\":0,\"params\":{},\"itemScope\":\"LINE_ITEM\",\"minBasketValue\":null,\"maxBasketValue\":null,\"catalog\":\"string\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[\"string\"],\"catalogFilterIds\":[\"string\"],\"excludeCatalog\":\"string\",\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"string\"],\"excludeCatalogFilterIds\":[\"string\"],\"storeCatalog\":\"string\",\"storeItemType\":\"ALL\",\"storeIds\":[\"string\"],\"targetType\":\"ALL\",\"targetSegment\":[\"string\"],\"price\":0,\"priority\":250,\"voucherPool\":{\"enabled\":false,\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"transferable\":false}}],\"extra\":{\"importHash\":\"string\"}}")
              .asString();
    delete:
      tags:
        - Promotions
      summary: Batch delete promotions
      description: |
        Submit a batch of promotion codes for asynchronous deletion. Items are validated individually and queued for processing . Returns 202 if all items are valid, or 207 if some fail validation.  
        This method doesn't check if a promotion with the provide code exists.

        ---

        **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:** `PROMOTIONS_IMPORT_PROMOTIONS_DELETE`

        **User role permission required:** `campaigns_promotions: delete`
      operationId: BatchDeletePromotions
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-PromotionDeleteBatchRequest"
        required: true
      responses:
        "202":
          description: All items accepted for processing
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionImportBatchDeleteAcceptedResponse"
        "207":
          $ref: "#/components/responses/promotions-PromotionImportBatchPartialError"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/BatchDeletePromotions
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/v4/promotions/v2/promotion/batch \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"data":[{"code":"string"}],"extra":{"importHash":"string"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"data\":[{\"code\":\"string\"}],\"extra\":{\"importHash\":\"string\"}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("DELETE", "/v4/promotions/v2/promotion/batch", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "data": [
                {
                  "code": "string"
                }
              ],
              "extra": {
                "importHash": "string"
              }
            });

            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/v4/promotions/v2/promotion/batch");
            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": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/v2/promotion/batch",
              "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({data: [{code: 'string'}], extra: {importHash: 'string'}}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/v2/promotion/batch');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"data":[{"code":"string"}],"extra":{"importHash":"string"}}');

            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/v4/promotions/v2/promotion/batch")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"data\":[{\"code\":\"string\"}],\"extra\":{\"importHash\":\"string\"}}")
              .asString();
  /v4/promotions/v2/sale/process-sale/{identifierType}/{identifierValue}:
    post:
      tags:
        - Promotions
      summary: Process basket
      description: |
        Assign promotions to a basket and recalculate item values after discount.

        This method DOES NOT redeem any promotions or create a transaction.


        ---

        **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:** `PROMOTIONS_SALE_PROMOTIONS_READ`

        **User role permission required:** `campaigns_promotions: read`
      operationId: processSale_POST
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-processSaleReq"
      responses:
        "200":
          description: Basket processed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-processSaleRes"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/processSale_POST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/v2/sale/process-sale/email/%7BidentifierValue%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"operationId":0,"clientDateTime":"2019-08-24T14:15:22Z","terminal":{"storeId":"string","posId":0},"transactionMetric":{"posTransactionId":0,"beginDateTime":null,"globalTransactionId":"string"},"finalValue":"string","transactionItems":[{"seqNo":0,"articleRef":"string","quantity":"3.231","evidPrice":"34.23","finalPrice":"30.23","finalValue":"123.23"}],"transactionAdditionalItems":[{"seqNo":0,"type":"COUPON","code":"string"}],"paymentsReport":{"paymentItems":[{"seqNo":0,"type":0,"name":"string","amount":"string","hashCode":"string"}]},"promotionsToActivate":[{"key":"code","value":"7893467834GG","pointsToUse":100}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"operationId\":0,\"clientDateTime\":\"2019-08-24T14:15:22Z\",\"terminal\":{\"storeId\":\"string\",\"posId\":0},\"transactionMetric\":{\"posTransactionId\":0,\"beginDateTime\":null,\"globalTransactionId\":\"string\"},\"finalValue\":\"string\",\"transactionItems\":[{\"seqNo\":0,\"articleRef\":\"string\",\"quantity\":\"3.231\",\"evidPrice\":\"34.23\",\"finalPrice\":\"30.23\",\"finalValue\":\"123.23\"}],\"transactionAdditionalItems\":[{\"seqNo\":0,\"type\":\"COUPON\",\"code\":\"string\"}],\"paymentsReport\":{\"paymentItems\":[{\"seqNo\":0,\"type\":0,\"name\":\"string\",\"amount\":\"string\",\"hashCode\":\"string\"}]},\"promotionsToActivate\":[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/promotions/v2/sale/process-sale/email/%7BidentifierValue%7D", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "operationId": 0,
              "clientDateTime": "2019-08-24T14:15:22Z",
              "terminal": {
                "storeId": "string",
                "posId": 0
              },
              "transactionMetric": {
                "posTransactionId": 0,
                "beginDateTime": null,
                "globalTransactionId": "string"
              },
              "finalValue": "string",
              "transactionItems": [
                {
                  "seqNo": 0,
                  "articleRef": "string",
                  "quantity": "3.231",
                  "evidPrice": "34.23",
                  "finalPrice": "30.23",
                  "finalValue": "123.23"
                }
              ],
              "transactionAdditionalItems": [
                {
                  "seqNo": 0,
                  "type": "COUPON",
                  "code": "string"
                }
              ],
              "paymentsReport": {
                "paymentItems": [
                  {
                    "seqNo": 0,
                    "type": 0,
                    "name": "string",
                    "amount": "string",
                    "hashCode": "string"
                  }
                ]
              },
              "promotionsToActivate": [
                {
                  "key": "code",
                  "value": "7893467834GG",
                  "pointsToUse": 100
                }
              ]
            });

            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/v4/promotions/v2/sale/process-sale/email/%7BidentifierValue%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": "/v4/promotions/v2/sale/process-sale/email/%7BidentifierValue%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({
              operationId: 0,
              clientDateTime: '2019-08-24T14:15:22Z',
              terminal: {storeId: 'string', posId: 0},
              transactionMetric: {posTransactionId: 0, beginDateTime: null, globalTransactionId: 'string'},
              finalValue: 'string',
              transactionItems: [
                {
                  seqNo: 0,
                  articleRef: 'string',
                  quantity: '3.231',
                  evidPrice: '34.23',
                  finalPrice: '30.23',
                  finalValue: '123.23'
                }
              ],
              transactionAdditionalItems: [{seqNo: 0, type: 'COUPON', code: 'string'}],
              paymentsReport: {
                paymentItems: [{seqNo: 0, type: 0, name: 'string', amount: 'string', hashCode: 'string'}]
              },
              promotionsToActivate: [{key: 'code', value: '7893467834GG', pointsToUse: 100}]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/v2/sale/process-sale/email/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"operationId":0,"clientDateTime":"2019-08-24T14:15:22Z","terminal":{"storeId":"string","posId":0},"transactionMetric":{"posTransactionId":0,"beginDateTime":null,"globalTransactionId":"string"},"finalValue":"string","transactionItems":[{"seqNo":0,"articleRef":"string","quantity":"3.231","evidPrice":"34.23","finalPrice":"30.23","finalValue":"123.23"}],"transactionAdditionalItems":[{"seqNo":0,"type":"COUPON","code":"string"}],"paymentsReport":{"paymentItems":[{"seqNo":0,"type":0,"name":"string","amount":"string","hashCode":"string"}]},"promotionsToActivate":[{"key":"code","value":"7893467834GG","pointsToUse":100}]}');

            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/v4/promotions/v2/sale/process-sale/email/%7BidentifierValue%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"operationId\":0,\"clientDateTime\":\"2019-08-24T14:15:22Z\",\"terminal\":{\"storeId\":\"string\",\"posId\":0},\"transactionMetric\":{\"posTransactionId\":0,\"beginDateTime\":null,\"globalTransactionId\":\"string\"},\"finalValue\":\"string\",\"transactionItems\":[{\"seqNo\":0,\"articleRef\":\"string\",\"quantity\":\"3.231\",\"evidPrice\":\"34.23\",\"finalPrice\":\"30.23\",\"finalValue\":\"123.23\"}],\"transactionAdditionalItems\":[{\"seqNo\":0,\"type\":\"COUPON\",\"code\":\"string\"}],\"paymentsReport\":{\"paymentItems\":[{\"seqNo\":0,\"type\":0,\"name\":\"string\",\"amount\":\"string\",\"hashCode\":\"string\"}]},\"promotionsToActivate\":[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]}")
              .asString();
  /v4/promotions/sale/process-checkout/{identifierType}/{identifierValue}:
    post:
      tags:
        - Promotions
      summary: Process checkout on POS
      description: |
        Assign checkout handbill coupons for a profile, based on items in the basket and historical transactions.

        This method DOES NOT redeem any promotions or create a transaction.


        ---

        **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:** `PROMOTIONS_SALE_PROMOTIONS_READ`

        **User role permission required:** `campaigns_promotions: read`
      operationId: processCheckout_POST
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-processCheckoutReq"
      responses:
        "200":
          description: POS checkout processed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-processCheckoutRes"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/processCheckout_POST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/sale/process-checkout/email/%7BidentifierValue%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"operationId":0,"clientDateTime":"2019-08-24T14:15:22Z","terminal":{"storeId":"string","posId":0},"transactionMetric":{"posTransactionId":0,"beginDateTime":null,"globalTransactionId":"string"},"finalValue":"string","transactionItems":[{"seqNo":0,"articleRef":"string","quantity":"3.231","evidPrice":"34.23","finalPrice":"30.23","finalValue":"123.23"}],"transactionAdditionalItems":[{"seqNo":0,"type":"COUPON","code":"string"}],"paymentsReport":{"paymentItems":[{"seqNo":0,"type":0,"name":"string","amount":"string","hashCode":"string"}]}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"operationId\":0,\"clientDateTime\":\"2019-08-24T14:15:22Z\",\"terminal\":{\"storeId\":\"string\",\"posId\":0},\"transactionMetric\":{\"posTransactionId\":0,\"beginDateTime\":null,\"globalTransactionId\":\"string\"},\"finalValue\":\"string\",\"transactionItems\":[{\"seqNo\":0,\"articleRef\":\"string\",\"quantity\":\"3.231\",\"evidPrice\":\"34.23\",\"finalPrice\":\"30.23\",\"finalValue\":\"123.23\"}],\"transactionAdditionalItems\":[{\"seqNo\":0,\"type\":\"COUPON\",\"code\":\"string\"}],\"paymentsReport\":{\"paymentItems\":[{\"seqNo\":0,\"type\":0,\"name\":\"string\",\"amount\":\"string\",\"hashCode\":\"string\"}]}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/promotions/sale/process-checkout/email/%7BidentifierValue%7D", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "operationId": 0,
              "clientDateTime": "2019-08-24T14:15:22Z",
              "terminal": {
                "storeId": "string",
                "posId": 0
              },
              "transactionMetric": {
                "posTransactionId": 0,
                "beginDateTime": null,
                "globalTransactionId": "string"
              },
              "finalValue": "string",
              "transactionItems": [
                {
                  "seqNo": 0,
                  "articleRef": "string",
                  "quantity": "3.231",
                  "evidPrice": "34.23",
                  "finalPrice": "30.23",
                  "finalValue": "123.23"
                }
              ],
              "transactionAdditionalItems": [
                {
                  "seqNo": 0,
                  "type": "COUPON",
                  "code": "string"
                }
              ],
              "paymentsReport": {
                "paymentItems": [
                  {
                    "seqNo": 0,
                    "type": 0,
                    "name": "string",
                    "amount": "string",
                    "hashCode": "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/v4/promotions/sale/process-checkout/email/%7BidentifierValue%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": "/v4/promotions/sale/process-checkout/email/%7BidentifierValue%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({
              operationId: 0,
              clientDateTime: '2019-08-24T14:15:22Z',
              terminal: {storeId: 'string', posId: 0},
              transactionMetric: {posTransactionId: 0, beginDateTime: null, globalTransactionId: 'string'},
              finalValue: 'string',
              transactionItems: [
                {
                  seqNo: 0,
                  articleRef: 'string',
                  quantity: '3.231',
                  evidPrice: '34.23',
                  finalPrice: '30.23',
                  finalValue: '123.23'
                }
              ],
              transactionAdditionalItems: [{seqNo: 0, type: 'COUPON', code: 'string'}],
              paymentsReport: {
                paymentItems: [{seqNo: 0, type: 0, name: 'string', amount: 'string', hashCode: 'string'}]
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/sale/process-checkout/email/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"operationId":0,"clientDateTime":"2019-08-24T14:15:22Z","terminal":{"storeId":"string","posId":0},"transactionMetric":{"posTransactionId":0,"beginDateTime":null,"globalTransactionId":"string"},"finalValue":"string","transactionItems":[{"seqNo":0,"articleRef":"string","quantity":"3.231","evidPrice":"34.23","finalPrice":"30.23","finalValue":"123.23"}],"transactionAdditionalItems":[{"seqNo":0,"type":"COUPON","code":"string"}],"paymentsReport":{"paymentItems":[{"seqNo":0,"type":0,"name":"string","amount":"string","hashCode":"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/v4/promotions/sale/process-checkout/email/%7BidentifierValue%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"operationId\":0,\"clientDateTime\":\"2019-08-24T14:15:22Z\",\"terminal\":{\"storeId\":\"string\",\"posId\":0},\"transactionMetric\":{\"posTransactionId\":0,\"beginDateTime\":null,\"globalTransactionId\":\"string\"},\"finalValue\":\"string\",\"transactionItems\":[{\"seqNo\":0,\"articleRef\":\"string\",\"quantity\":\"3.231\",\"evidPrice\":\"34.23\",\"finalPrice\":\"30.23\",\"finalValue\":\"123.23\"}],\"transactionAdditionalItems\":[{\"seqNo\":0,\"type\":\"COUPON\",\"code\":\"string\"}],\"paymentsReport\":{\"paymentItems\":[{\"seqNo\":0,\"type\":0,\"name\":\"string\",\"amount\":\"string\",\"hashCode\":\"string\"}]}}")
              .asString();
  /v4/promotions/v2/sale/process-anonymous-sale:
    post:
      tags:
        - Promotions
      summary: Process anonymous Profile's basket
      description: |
        Assign promotions to a basket and recalculate item values after discount.

        ---

        **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:** `PROMOTIONS_SALE_PROMOTIONS_READ`

        **User role permission required:** `campaigns_promotions: read`
      operationId: processAnonymousSale_POST
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-processSaleReq"
      responses:
        "200":
          description: Basket processed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-processSaleRes"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "428":
          $ref: "#/components/responses/promotions-ProcessSale428"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/processAnonymousSale_POST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/v2/sale/process-anonymous-sale \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"operationId":0,"clientDateTime":"2019-08-24T14:15:22Z","terminal":{"storeId":"string","posId":0},"transactionMetric":{"posTransactionId":0,"beginDateTime":null,"globalTransactionId":"string"},"finalValue":"string","transactionItems":[{"seqNo":0,"articleRef":"string","quantity":"3.231","evidPrice":"34.23","finalPrice":"30.23","finalValue":"123.23"}],"transactionAdditionalItems":[{"seqNo":0,"type":"COUPON","code":"string"}],"paymentsReport":{"paymentItems":[{"seqNo":0,"type":0,"name":"string","amount":"string","hashCode":"string"}]},"promotionsToActivate":[{"key":"code","value":"7893467834GG","pointsToUse":100}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"operationId\":0,\"clientDateTime\":\"2019-08-24T14:15:22Z\",\"terminal\":{\"storeId\":\"string\",\"posId\":0},\"transactionMetric\":{\"posTransactionId\":0,\"beginDateTime\":null,\"globalTransactionId\":\"string\"},\"finalValue\":\"string\",\"transactionItems\":[{\"seqNo\":0,\"articleRef\":\"string\",\"quantity\":\"3.231\",\"evidPrice\":\"34.23\",\"finalPrice\":\"30.23\",\"finalValue\":\"123.23\"}],\"transactionAdditionalItems\":[{\"seqNo\":0,\"type\":\"COUPON\",\"code\":\"string\"}],\"paymentsReport\":{\"paymentItems\":[{\"seqNo\":0,\"type\":0,\"name\":\"string\",\"amount\":\"string\",\"hashCode\":\"string\"}]},\"promotionsToActivate\":[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/promotions/v2/sale/process-anonymous-sale", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "operationId": 0,
              "clientDateTime": "2019-08-24T14:15:22Z",
              "terminal": {
                "storeId": "string",
                "posId": 0
              },
              "transactionMetric": {
                "posTransactionId": 0,
                "beginDateTime": null,
                "globalTransactionId": "string"
              },
              "finalValue": "string",
              "transactionItems": [
                {
                  "seqNo": 0,
                  "articleRef": "string",
                  "quantity": "3.231",
                  "evidPrice": "34.23",
                  "finalPrice": "30.23",
                  "finalValue": "123.23"
                }
              ],
              "transactionAdditionalItems": [
                {
                  "seqNo": 0,
                  "type": "COUPON",
                  "code": "string"
                }
              ],
              "paymentsReport": {
                "paymentItems": [
                  {
                    "seqNo": 0,
                    "type": 0,
                    "name": "string",
                    "amount": "string",
                    "hashCode": "string"
                  }
                ]
              },
              "promotionsToActivate": [
                {
                  "key": "code",
                  "value": "7893467834GG",
                  "pointsToUse": 100
                }
              ]
            });

            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/v4/promotions/v2/sale/process-anonymous-sale");
            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": "/v4/promotions/v2/sale/process-anonymous-sale",
              "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({
              operationId: 0,
              clientDateTime: '2019-08-24T14:15:22Z',
              terminal: {storeId: 'string', posId: 0},
              transactionMetric: {posTransactionId: 0, beginDateTime: null, globalTransactionId: 'string'},
              finalValue: 'string',
              transactionItems: [
                {
                  seqNo: 0,
                  articleRef: 'string',
                  quantity: '3.231',
                  evidPrice: '34.23',
                  finalPrice: '30.23',
                  finalValue: '123.23'
                }
              ],
              transactionAdditionalItems: [{seqNo: 0, type: 'COUPON', code: 'string'}],
              paymentsReport: {
                paymentItems: [{seqNo: 0, type: 0, name: 'string', amount: 'string', hashCode: 'string'}]
              },
              promotionsToActivate: [{key: 'code', value: '7893467834GG', pointsToUse: 100}]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/v2/sale/process-anonymous-sale');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"operationId":0,"clientDateTime":"2019-08-24T14:15:22Z","terminal":{"storeId":"string","posId":0},"transactionMetric":{"posTransactionId":0,"beginDateTime":null,"globalTransactionId":"string"},"finalValue":"string","transactionItems":[{"seqNo":0,"articleRef":"string","quantity":"3.231","evidPrice":"34.23","finalPrice":"30.23","finalValue":"123.23"}],"transactionAdditionalItems":[{"seqNo":0,"type":"COUPON","code":"string"}],"paymentsReport":{"paymentItems":[{"seqNo":0,"type":0,"name":"string","amount":"string","hashCode":"string"}]},"promotionsToActivate":[{"key":"code","value":"7893467834GG","pointsToUse":100}]}');

            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/v4/promotions/v2/sale/process-anonymous-sale")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"operationId\":0,\"clientDateTime\":\"2019-08-24T14:15:22Z\",\"terminal\":{\"storeId\":\"string\",\"posId\":0},\"transactionMetric\":{\"posTransactionId\":0,\"beginDateTime\":null,\"globalTransactionId\":\"string\"},\"finalValue\":\"string\",\"transactionItems\":[{\"seqNo\":0,\"articleRef\":\"string\",\"quantity\":\"3.231\",\"evidPrice\":\"34.23\",\"finalPrice\":\"30.23\",\"finalValue\":\"123.23\"}],\"transactionAdditionalItems\":[{\"seqNo\":0,\"type\":\"COUPON\",\"code\":\"string\"}],\"paymentsReport\":{\"paymentItems\":[{\"seqNo\":0,\"type\":0,\"name\":\"string\",\"amount\":\"string\",\"hashCode\":\"string\"}]},\"promotionsToActivate\":[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]}")
              .asString();
  /v4/promotions/sale/process-anonymous-checkout:
    post:
      tags:
        - Promotions
      summary: Process anonymous Profile's checkout on POS
      description: |
        Assign checkout handbill coupons for anonymous profile, based on items in basket and historical transactions.

        ---

        **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:** `PROMOTIONS_SALE_PROMOTIONS_READ`

        **User role permission required:** `campaigns_promotions: read`
      operationId: processAnonymousCheckout_POST
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-processCheckoutReq"
      responses:
        "200":
          description: POS checkout processed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-processCheckoutRes"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/processAnonymousCheckout_POST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/sale/process-anonymous-checkout \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"operationId":0,"clientDateTime":"2019-08-24T14:15:22Z","terminal":{"storeId":"string","posId":0},"transactionMetric":{"posTransactionId":0,"beginDateTime":null,"globalTransactionId":"string"},"finalValue":"string","transactionItems":[{"seqNo":0,"articleRef":"string","quantity":"3.231","evidPrice":"34.23","finalPrice":"30.23","finalValue":"123.23"}],"transactionAdditionalItems":[{"seqNo":0,"type":"COUPON","code":"string"}],"paymentsReport":{"paymentItems":[{"seqNo":0,"type":0,"name":"string","amount":"string","hashCode":"string"}]}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"operationId\":0,\"clientDateTime\":\"2019-08-24T14:15:22Z\",\"terminal\":{\"storeId\":\"string\",\"posId\":0},\"transactionMetric\":{\"posTransactionId\":0,\"beginDateTime\":null,\"globalTransactionId\":\"string\"},\"finalValue\":\"string\",\"transactionItems\":[{\"seqNo\":0,\"articleRef\":\"string\",\"quantity\":\"3.231\",\"evidPrice\":\"34.23\",\"finalPrice\":\"30.23\",\"finalValue\":\"123.23\"}],\"transactionAdditionalItems\":[{\"seqNo\":0,\"type\":\"COUPON\",\"code\":\"string\"}],\"paymentsReport\":{\"paymentItems\":[{\"seqNo\":0,\"type\":0,\"name\":\"string\",\"amount\":\"string\",\"hashCode\":\"string\"}]}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/promotions/sale/process-anonymous-checkout", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "operationId": 0,
              "clientDateTime": "2019-08-24T14:15:22Z",
              "terminal": {
                "storeId": "string",
                "posId": 0
              },
              "transactionMetric": {
                "posTransactionId": 0,
                "beginDateTime": null,
                "globalTransactionId": "string"
              },
              "finalValue": "string",
              "transactionItems": [
                {
                  "seqNo": 0,
                  "articleRef": "string",
                  "quantity": "3.231",
                  "evidPrice": "34.23",
                  "finalPrice": "30.23",
                  "finalValue": "123.23"
                }
              ],
              "transactionAdditionalItems": [
                {
                  "seqNo": 0,
                  "type": "COUPON",
                  "code": "string"
                }
              ],
              "paymentsReport": {
                "paymentItems": [
                  {
                    "seqNo": 0,
                    "type": 0,
                    "name": "string",
                    "amount": "string",
                    "hashCode": "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/v4/promotions/sale/process-anonymous-checkout");
            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": "/v4/promotions/sale/process-anonymous-checkout",
              "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({
              operationId: 0,
              clientDateTime: '2019-08-24T14:15:22Z',
              terminal: {storeId: 'string', posId: 0},
              transactionMetric: {posTransactionId: 0, beginDateTime: null, globalTransactionId: 'string'},
              finalValue: 'string',
              transactionItems: [
                {
                  seqNo: 0,
                  articleRef: 'string',
                  quantity: '3.231',
                  evidPrice: '34.23',
                  finalPrice: '30.23',
                  finalValue: '123.23'
                }
              ],
              transactionAdditionalItems: [{seqNo: 0, type: 'COUPON', code: 'string'}],
              paymentsReport: {
                paymentItems: [{seqNo: 0, type: 0, name: 'string', amount: 'string', hashCode: 'string'}]
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/sale/process-anonymous-checkout');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"operationId":0,"clientDateTime":"2019-08-24T14:15:22Z","terminal":{"storeId":"string","posId":0},"transactionMetric":{"posTransactionId":0,"beginDateTime":null,"globalTransactionId":"string"},"finalValue":"string","transactionItems":[{"seqNo":0,"articleRef":"string","quantity":"3.231","evidPrice":"34.23","finalPrice":"30.23","finalValue":"123.23"}],"transactionAdditionalItems":[{"seqNo":0,"type":"COUPON","code":"string"}],"paymentsReport":{"paymentItems":[{"seqNo":0,"type":0,"name":"string","amount":"string","hashCode":"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/v4/promotions/sale/process-anonymous-checkout")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"operationId\":0,\"clientDateTime\":\"2019-08-24T14:15:22Z\",\"terminal\":{\"storeId\":\"string\",\"posId\":0},\"transactionMetric\":{\"posTransactionId\":0,\"beginDateTime\":null,\"globalTransactionId\":\"string\"},\"finalValue\":\"string\",\"transactionItems\":[{\"seqNo\":0,\"articleRef\":\"string\",\"quantity\":\"3.231\",\"evidPrice\":\"34.23\",\"finalPrice\":\"30.23\",\"finalValue\":\"123.23\"}],\"transactionAdditionalItems\":[{\"seqNo\":0,\"type\":\"COUPON\",\"code\":\"string\"}],\"paymentsReport\":{\"paymentItems\":[{\"seqNo\":0,\"type\":0,\"name\":\"string\",\"amount\":\"string\",\"hashCode\":\"string\"}]}}")
              .asString();
  /v4/promotions/handbill:
    get:
      tags:
        - Handbills
      summary: Get all handbill configurations
      description: |
        Retrieve a list of all handbill configurations available in the current Workspace.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `PROMOTIONS_HANDBILL_READ`

        **User role permission required:** `campaigns_personalised_promotions: read`
      operationId: getAllHandbillConfigs_GET
      parameters:
        - $ref: "#/components/parameters/promotions-queryLimit"
        - $ref: "#/components/parameters/promotions-queryPage"
        - $ref: "#/components/parameters/promotions-queryHandbillSort"
        - $ref: "#/components/parameters/promotions-queryIncludeMeta"
      responses:
        "200":
          description: List of handbill configurations
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: List of handbill configurations with simplified information about variants
                    items:
                      $ref: "#/components/schemas/promotions-handbillConfigWithSimplifiedVariants"
                  meta:
                    $ref: "#/components/schemas/promotions-responseMeta"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Handbills/operation/getAllHandbillConfigs_GET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/promotions/handbill?limit=100&page=4&sort=createdAt%2Cdesc&includeMeta=false' \
              --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", "/v4/promotions/handbill?limit=100&page=4&sort=createdAt%2Cdesc&includeMeta=false", 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/v4/promotions/handbill?limit=100&page=4&sort=createdAt%2Cdesc&includeMeta=false");
            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": "/v4/promotions/handbill?limit=100&page=4&sort=createdAt%2Cdesc&includeMeta=false",
              "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/v4/promotions/handbill');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'limit' => '100',
              'page' => '4',
              'sort' => 'createdAt,desc',
              'includeMeta' => 'false'
            ]);

            $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/v4/promotions/handbill?limit=100&page=4&sort=createdAt%2Cdesc&includeMeta=false")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - Handbills
      summary: Create handbill configuration
      description: |
        Create a new handbill configuration for use in handbill-type promotions.

        ---

        **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:** `PROMOTIONS_HANDBILL_CREATE`

        **User role permission required:** `campaigns_personalised_promotions: create`
      operationId: createHandbillConfiguration_POST
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-handbillConfigCreateRequest"
      responses:
        "200":
          description: Configuration created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/promotions-handbillConfig"
                  message:
                    type: string
                    description: Status of the operation
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Handbills/operation/createHandbillConfiguration_POST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/handbill \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"channel":"MOBILE","status":"DRAFT","name":"string","description":"string","controlGroup":{"name":"string","percentage":0},"variants":[{"name":"string","uuid":"095be615-a8ad-4c33-8e9c-c7612fbf6c9f","percentage":0,"ai":{"controlVariant":true,"varietyFactor":0.5,"varietyGroupSize":1,"redistributionFrequencyFactor":0.5,"popularityBoosting":1},"limits":{"limitPerDay":6,"limitExceptions":[{"dayOfWeek":5,"limitPerDay":8}],"limitsPerBasket":[{"basketSize":12,"basketValue":30.5,"condition":"AND"}],"limitExclusion":[{"catalogId":22424,"products":["UGG-BB-PUR-06"],"filters":["7c1fbdf6-dd27-11ea-87d0-0242ac130003"]}]},"activity":{"lastingType":"RELATIVE","lasting":{"unit":"HOURS","value":24},"cronWeekdays":[0,1,6],"cronTime":"12:34","lastingAt":"2019-08-24T14:15:22Z","timeExclusions":{"uuid":"6a177f3e-748f-44d4-ac30-a457a5199685"}},"printout":{"template":"|#{promotion.name};#{promotion.discountType == '\''EXACT_PRICE'\'' ? '\''Price'\'':'\''Discount'\''} #{promotion.discountValue} #{promotion.discountType == '\''PERCENT'\''? '\''%'\'' : '\''USD'\''};Valid for;#{moment.utc(coupon.createdAt).tz('\''Europe/Warsaw'\'').format('\''DD.MM.YYYY HH:mm'\'')} - #{moment.utc(coupon.lastingAt).tz('\''Europe/Warsaw'\'').format('\''DD.MM.YYYY HH:mm'\'')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!","maxLineLength":18,"newLineDelimiter":";"},"filterIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"types":["MEMBERS_ONLY","HANDBILL"],"excludeByAvailableProducts":true,"slotFilters":{"order":"GIVEN","slots":[{"filterId":"aff0ee0f-f371-4b82-82c6-dc3b96f05c91","limit":5}]}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"channel\":\"MOBILE\",\"status\":\"DRAFT\",\"name\":\"string\",\"description\":\"string\",\"controlGroup\":{\"name\":\"string\",\"percentage\":0},\"variants\":[{\"name\":\"string\",\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"percentage\":0,\"ai\":{\"controlVariant\":true,\"varietyFactor\":0.5,\"varietyGroupSize\":1,\"redistributionFrequencyFactor\":0.5,\"popularityBoosting\":1},\"limits\":{\"limitPerDay\":6,\"limitExceptions\":[{\"dayOfWeek\":5,\"limitPerDay\":8}],\"limitsPerBasket\":[{\"basketSize\":12,\"basketValue\":30.5,\"condition\":\"AND\"}],\"limitExclusion\":[{\"catalogId\":22424,\"products\":[\"UGG-BB-PUR-06\"],\"filters\":[\"7c1fbdf6-dd27-11ea-87d0-0242ac130003\"]}]},\"activity\":{\"lastingType\":\"RELATIVE\",\"lasting\":{\"unit\":\"HOURS\",\"value\":24},\"cronWeekdays\":[0,1,6],\"cronTime\":\"12:34\",\"lastingAt\":\"2019-08-24T14:15:22Z\",\"timeExclusions\":{\"uuid\":\"6a177f3e-748f-44d4-ac30-a457a5199685\"}},\"printout\":{\"template\":\"|#{promotion.name};#{promotion.discountType == 'EXACT_PRICE' ? 'Price':'Discount'} #{promotion.discountValue} #{promotion.discountType == 'PERCENT'? '%' : 'USD'};Valid for;#{moment.utc(coupon.createdAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')} - #{moment.utc(coupon.lastingAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!\",\"maxLineLength\":18,\"newLineDelimiter\":\";\"},\"filterIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"types\":[\"MEMBERS_ONLY\",\"HANDBILL\"],\"excludeByAvailableProducts\":true,\"slotFilters\":{\"order\":\"GIVEN\",\"slots\":[{\"filterId\":\"aff0ee0f-f371-4b82-82c6-dc3b96f05c91\",\"limit\":5}]}}]}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/promotions/handbill", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "channel": "MOBILE",
              "status": "DRAFT",
              "name": "string",
              "description": "string",
              "controlGroup": {
                "name": "string",
                "percentage": 0
              },
              "variants": [
                {
                  "name": "string",
                  "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
                  "percentage": 0,
                  "ai": {
                    "controlVariant": true,
                    "varietyFactor": 0.5,
                    "varietyGroupSize": 1,
                    "redistributionFrequencyFactor": 0.5,
                    "popularityBoosting": 1
                  },
                  "limits": {
                    "limitPerDay": 6,
                    "limitExceptions": [
                      {
                        "dayOfWeek": 5,
                        "limitPerDay": 8
                      }
                    ],
                    "limitsPerBasket": [
                      {
                        "basketSize": 12,
                        "basketValue": 30.5,
                        "condition": "AND"
                      }
                    ],
                    "limitExclusion": [
                      {
                        "catalogId": 22424,
                        "products": [
                          "UGG-BB-PUR-06"
                        ],
                        "filters": [
                          "7c1fbdf6-dd27-11ea-87d0-0242ac130003"
                        ]
                      }
                    ]
                  },
                  "activity": {
                    "lastingType": "RELATIVE",
                    "lasting": {
                      "unit": "HOURS",
                      "value": 24
                    },
                    "cronWeekdays": [
                      0,
                      1,
                      6
                    ],
                    "cronTime": "12:34",
                    "lastingAt": "2019-08-24T14:15:22Z",
                    "timeExclusions": {
                      "uuid": "6a177f3e-748f-44d4-ac30-a457a5199685"
                    }
                  },
                  "printout": {
                    "template": "|#{promotion.name};#{promotion.discountType == 'EXACT_PRICE' ? 'Price':'Discount'} #{promotion.discountValue} #{promotion.discountType == 'PERCENT'? '%' : 'USD'};Valid for;#{moment.utc(coupon.createdAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')} - #{moment.utc(coupon.lastingAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!",
                    "maxLineLength": 18,
                    "newLineDelimiter": ";"
                  },
                  "filterIds": [
                    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
                  ],
                  "types": [
                    "MEMBERS_ONLY",
                    "HANDBILL"
                  ],
                  "excludeByAvailableProducts": true,
                  "slotFilters": {
                    "order": "GIVEN",
                    "slots": [
                      {
                        "filterId": "aff0ee0f-f371-4b82-82c6-dc3b96f05c91",
                        "limit": 5
                      }
                    ]
                  }
                }
              ]
            });

            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/v4/promotions/handbill");
            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": "/v4/promotions/handbill",
              "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({
              channel: 'MOBILE',
              status: 'DRAFT',
              name: 'string',
              description: 'string',
              controlGroup: {name: 'string', percentage: 0},
              variants: [
                {
                  name: 'string',
                  uuid: '095be615-a8ad-4c33-8e9c-c7612fbf6c9f',
                  percentage: 0,
                  ai: {
                    controlVariant: true,
                    varietyFactor: 0.5,
                    varietyGroupSize: 1,
                    redistributionFrequencyFactor: 0.5,
                    popularityBoosting: 1
                  },
                  limits: {
                    limitPerDay: 6,
                    limitExceptions: [{dayOfWeek: 5, limitPerDay: 8}],
                    limitsPerBasket: [{basketSize: 12, basketValue: 30.5, condition: 'AND'}],
                    limitExclusion: [
                      {
                        catalogId: 22424,
                        products: ['UGG-BB-PUR-06'],
                        filters: ['7c1fbdf6-dd27-11ea-87d0-0242ac130003']
                      }
                    ]
                  },
                  activity: {
                    lastingType: 'RELATIVE',
                    lasting: {unit: 'HOURS', value: 24},
                    cronWeekdays: [0, 1, 6],
                    cronTime: '12:34',
                    lastingAt: '2019-08-24T14:15:22Z',
                    timeExclusions: {uuid: '6a177f3e-748f-44d4-ac30-a457a5199685'}
                  },
                  printout: {
                    template: '|#{promotion.name};#{promotion.discountType == \'EXACT_PRICE\' ? \'Price\':\'Discount\'} #{promotion.discountValue} #{promotion.discountType == \'PERCENT\'? \'%\' : \'USD\'};Valid for;#{moment.utc(coupon.createdAt).tz(\'Europe/Warsaw\').format(\'DD.MM.YYYY HH:mm\')} - #{moment.utc(coupon.lastingAt).tz(\'Europe/Warsaw\').format(\'DD.MM.YYYY HH:mm\')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!',
                    maxLineLength: 18,
                    newLineDelimiter: ';'
                  },
                  filterIds: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],
                  types: ['MEMBERS_ONLY', 'HANDBILL'],
                  excludeByAvailableProducts: true,
                  slotFilters: {
                    order: 'GIVEN',
                    slots: [{filterId: 'aff0ee0f-f371-4b82-82c6-dc3b96f05c91', limit: 5}]
                  }
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/handbill');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"channel":"MOBILE","status":"DRAFT","name":"string","description":"string","controlGroup":{"name":"string","percentage":0},"variants":[{"name":"string","uuid":"095be615-a8ad-4c33-8e9c-c7612fbf6c9f","percentage":0,"ai":{"controlVariant":true,"varietyFactor":0.5,"varietyGroupSize":1,"redistributionFrequencyFactor":0.5,"popularityBoosting":1},"limits":{"limitPerDay":6,"limitExceptions":[{"dayOfWeek":5,"limitPerDay":8}],"limitsPerBasket":[{"basketSize":12,"basketValue":30.5,"condition":"AND"}],"limitExclusion":[{"catalogId":22424,"products":["UGG-BB-PUR-06"],"filters":["7c1fbdf6-dd27-11ea-87d0-0242ac130003"]}]},"activity":{"lastingType":"RELATIVE","lasting":{"unit":"HOURS","value":24},"cronWeekdays":[0,1,6],"cronTime":"12:34","lastingAt":"2019-08-24T14:15:22Z","timeExclusions":{"uuid":"6a177f3e-748f-44d4-ac30-a457a5199685"}},"printout":{"template":"|#{promotion.name};#{promotion.discountType == 'EXACT_PRICE' ? 'Price':'Discount'} #{promotion.discountValue} #{promotion.discountType == 'PERCENT'? '%' : 'USD'};Valid for;#{moment.utc(coupon.createdAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')} - #{moment.utc(coupon.lastingAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!","maxLineLength":18,"newLineDelimiter":";"},"filterIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"types":["MEMBERS_ONLY","HANDBILL"],"excludeByAvailableProducts":true,"slotFilters":{"order":"GIVEN","slots":[{"filterId":"aff0ee0f-f371-4b82-82c6-dc3b96f05c91","limit":5}]}}]}');

            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/v4/promotions/handbill")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"channel\":\"MOBILE\",\"status\":\"DRAFT\",\"name\":\"string\",\"description\":\"string\",\"controlGroup\":{\"name\":\"string\",\"percentage\":0},\"variants\":[{\"name\":\"string\",\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"percentage\":0,\"ai\":{\"controlVariant\":true,\"varietyFactor\":0.5,\"varietyGroupSize\":1,\"redistributionFrequencyFactor\":0.5,\"popularityBoosting\":1},\"limits\":{\"limitPerDay\":6,\"limitExceptions\":[{\"dayOfWeek\":5,\"limitPerDay\":8}],\"limitsPerBasket\":[{\"basketSize\":12,\"basketValue\":30.5,\"condition\":\"AND\"}],\"limitExclusion\":[{\"catalogId\":22424,\"products\":[\"UGG-BB-PUR-06\"],\"filters\":[\"7c1fbdf6-dd27-11ea-87d0-0242ac130003\"]}]},\"activity\":{\"lastingType\":\"RELATIVE\",\"lasting\":{\"unit\":\"HOURS\",\"value\":24},\"cronWeekdays\":[0,1,6],\"cronTime\":\"12:34\",\"lastingAt\":\"2019-08-24T14:15:22Z\",\"timeExclusions\":{\"uuid\":\"6a177f3e-748f-44d4-ac30-a457a5199685\"}},\"printout\":{\"template\":\"|#{promotion.name};#{promotion.discountType == 'EXACT_PRICE' ? 'Price':'Discount'} #{promotion.discountValue} #{promotion.discountType == 'PERCENT'? '%' : 'USD'};Valid for;#{moment.utc(coupon.createdAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')} - #{moment.utc(coupon.lastingAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!\",\"maxLineLength\":18,\"newLineDelimiter\":\";\"},\"filterIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"types\":[\"MEMBERS_ONLY\",\"HANDBILL\"],\"excludeByAvailableProducts\":true,\"slotFilters\":{\"order\":\"GIVEN\",\"slots\":[{\"filterId\":\"aff0ee0f-f371-4b82-82c6-dc3b96f05c91\",\"limit\":5}]}}]}")
              .asString();
  /v4/promotions/handbill/{handbillUuid}:
    get:
      tags:
        - Handbills
      summary: Get handbill configuration
      description: |
        Retrieve the details of a single handbill configuration.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `PROMOTIONS_HANDBILL_READ`

        **User role permission required:** `campaigns_personalised_promotions: read`
      operationId: getHandbillConfig_GET
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/promotions-pathHandbillUuid"
      responses:
        "200":
          description: Handbill configuration
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/promotions-handbillConfig"
                  message:
                    type: string
                    description: Status of the operation
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Handbills/operation/getHandbillConfig_GET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/promotions/handbill/%7BhandbillUuid%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", "/v4/promotions/handbill/%7BhandbillUuid%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/v4/promotions/handbill/%7BhandbillUuid%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": "/v4/promotions/handbill/%7BhandbillUuid%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/v4/promotions/handbill/%7BhandbillUuid%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/v4/promotions/handbill/%7BhandbillUuid%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    patch:
      tags:
        - Handbills
      summary: Update handbill configuration
      description: |
        Update an existing handbill configuration.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `PROMOTIONS_HANDBILL_UPDATE`

        **User role permission required:** `campaigns_personalised_promotions: update`
      operationId: updateHandbill_PATCH
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/promotions-pathHandbillUuid"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-handbillConfigUpdateRequest"
      responses:
        "200":
          description: Configuration updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/promotions-handbillConfig"
                  message:
                    type: string
                    description: Status of the operation
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Handbills/operation/updateHandbill_PATCH
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PATCH \
              --url https://api.synerise.com/v4/promotions/handbill/%7BhandbillUuid%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"channel":"MOBILE","status":"DRAFT","name":"string","description":"string","controlGroup":{"name":"string","percentage":0},"variants":[{"name":"string","uuid":"095be615-a8ad-4c33-8e9c-c7612fbf6c9f","percentage":0,"ai":{"controlVariant":true,"varietyFactor":0.5,"varietyGroupSize":1,"redistributionFrequencyFactor":0.5,"popularityBoosting":1},"limits":{"limitPerDay":6,"limitExceptions":[{"dayOfWeek":5,"limitPerDay":8}],"limitsPerBasket":[{"basketSize":12,"basketValue":30.5,"condition":"AND"}],"limitExclusion":[{"catalogId":22424,"products":["UGG-BB-PUR-06"],"filters":["7c1fbdf6-dd27-11ea-87d0-0242ac130003"]}]},"activity":{"lastingType":"RELATIVE","lasting":{"unit":"HOURS","value":24},"cronWeekdays":[0,1,6],"cronTime":"12:34","lastingAt":"2019-08-24T14:15:22Z","timeExclusions":{"uuid":"6a177f3e-748f-44d4-ac30-a457a5199685"}},"printout":{"template":"|#{promotion.name};#{promotion.discountType == '\''EXACT_PRICE'\'' ? '\''Price'\'':'\''Discount'\''} #{promotion.discountValue} #{promotion.discountType == '\''PERCENT'\''? '\''%'\'' : '\''USD'\''};Valid for;#{moment.utc(coupon.createdAt).tz('\''Europe/Warsaw'\'').format('\''DD.MM.YYYY HH:mm'\'')} - #{moment.utc(coupon.lastingAt).tz('\''Europe/Warsaw'\'').format('\''DD.MM.YYYY HH:mm'\'')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!","maxLineLength":18,"newLineDelimiter":";"},"filterIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"types":["MEMBERS_ONLY","HANDBILL"],"excludeByAvailableProducts":true,"slotFilters":{"order":"GIVEN","slots":[{"filterId":"aff0ee0f-f371-4b82-82c6-dc3b96f05c91","limit":5}]}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"channel\":\"MOBILE\",\"status\":\"DRAFT\",\"name\":\"string\",\"description\":\"string\",\"controlGroup\":{\"name\":\"string\",\"percentage\":0},\"variants\":[{\"name\":\"string\",\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"percentage\":0,\"ai\":{\"controlVariant\":true,\"varietyFactor\":0.5,\"varietyGroupSize\":1,\"redistributionFrequencyFactor\":0.5,\"popularityBoosting\":1},\"limits\":{\"limitPerDay\":6,\"limitExceptions\":[{\"dayOfWeek\":5,\"limitPerDay\":8}],\"limitsPerBasket\":[{\"basketSize\":12,\"basketValue\":30.5,\"condition\":\"AND\"}],\"limitExclusion\":[{\"catalogId\":22424,\"products\":[\"UGG-BB-PUR-06\"],\"filters\":[\"7c1fbdf6-dd27-11ea-87d0-0242ac130003\"]}]},\"activity\":{\"lastingType\":\"RELATIVE\",\"lasting\":{\"unit\":\"HOURS\",\"value\":24},\"cronWeekdays\":[0,1,6],\"cronTime\":\"12:34\",\"lastingAt\":\"2019-08-24T14:15:22Z\",\"timeExclusions\":{\"uuid\":\"6a177f3e-748f-44d4-ac30-a457a5199685\"}},\"printout\":{\"template\":\"|#{promotion.name};#{promotion.discountType == 'EXACT_PRICE' ? 'Price':'Discount'} #{promotion.discountValue} #{promotion.discountType == 'PERCENT'? '%' : 'USD'};Valid for;#{moment.utc(coupon.createdAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')} - #{moment.utc(coupon.lastingAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!\",\"maxLineLength\":18,\"newLineDelimiter\":\";\"},\"filterIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"types\":[\"MEMBERS_ONLY\",\"HANDBILL\"],\"excludeByAvailableProducts\":true,\"slotFilters\":{\"order\":\"GIVEN\",\"slots\":[{\"filterId\":\"aff0ee0f-f371-4b82-82c6-dc3b96f05c91\",\"limit\":5}]}}]}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("PATCH", "/v4/promotions/handbill/%7BhandbillUuid%7D", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "channel": "MOBILE",
              "status": "DRAFT",
              "name": "string",
              "description": "string",
              "controlGroup": {
                "name": "string",
                "percentage": 0
              },
              "variants": [
                {
                  "name": "string",
                  "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
                  "percentage": 0,
                  "ai": {
                    "controlVariant": true,
                    "varietyFactor": 0.5,
                    "varietyGroupSize": 1,
                    "redistributionFrequencyFactor": 0.5,
                    "popularityBoosting": 1
                  },
                  "limits": {
                    "limitPerDay": 6,
                    "limitExceptions": [
                      {
                        "dayOfWeek": 5,
                        "limitPerDay": 8
                      }
                    ],
                    "limitsPerBasket": [
                      {
                        "basketSize": 12,
                        "basketValue": 30.5,
                        "condition": "AND"
                      }
                    ],
                    "limitExclusion": [
                      {
                        "catalogId": 22424,
                        "products": [
                          "UGG-BB-PUR-06"
                        ],
                        "filters": [
                          "7c1fbdf6-dd27-11ea-87d0-0242ac130003"
                        ]
                      }
                    ]
                  },
                  "activity": {
                    "lastingType": "RELATIVE",
                    "lasting": {
                      "unit": "HOURS",
                      "value": 24
                    },
                    "cronWeekdays": [
                      0,
                      1,
                      6
                    ],
                    "cronTime": "12:34",
                    "lastingAt": "2019-08-24T14:15:22Z",
                    "timeExclusions": {
                      "uuid": "6a177f3e-748f-44d4-ac30-a457a5199685"
                    }
                  },
                  "printout": {
                    "template": "|#{promotion.name};#{promotion.discountType == 'EXACT_PRICE' ? 'Price':'Discount'} #{promotion.discountValue} #{promotion.discountType == 'PERCENT'? '%' : 'USD'};Valid for;#{moment.utc(coupon.createdAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')} - #{moment.utc(coupon.lastingAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!",
                    "maxLineLength": 18,
                    "newLineDelimiter": ";"
                  },
                  "filterIds": [
                    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
                  ],
                  "types": [
                    "MEMBERS_ONLY",
                    "HANDBILL"
                  ],
                  "excludeByAvailableProducts": true,
                  "slotFilters": {
                    "order": "GIVEN",
                    "slots": [
                      {
                        "filterId": "aff0ee0f-f371-4b82-82c6-dc3b96f05c91",
                        "limit": 5
                      }
                    ]
                  }
                }
              ]
            });

            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/v4/promotions/handbill/%7BhandbillUuid%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": "PATCH",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/handbill/%7BhandbillUuid%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({
              channel: 'MOBILE',
              status: 'DRAFT',
              name: 'string',
              description: 'string',
              controlGroup: {name: 'string', percentage: 0},
              variants: [
                {
                  name: 'string',
                  uuid: '095be615-a8ad-4c33-8e9c-c7612fbf6c9f',
                  percentage: 0,
                  ai: {
                    controlVariant: true,
                    varietyFactor: 0.5,
                    varietyGroupSize: 1,
                    redistributionFrequencyFactor: 0.5,
                    popularityBoosting: 1
                  },
                  limits: {
                    limitPerDay: 6,
                    limitExceptions: [{dayOfWeek: 5, limitPerDay: 8}],
                    limitsPerBasket: [{basketSize: 12, basketValue: 30.5, condition: 'AND'}],
                    limitExclusion: [
                      {
                        catalogId: 22424,
                        products: ['UGG-BB-PUR-06'],
                        filters: ['7c1fbdf6-dd27-11ea-87d0-0242ac130003']
                      }
                    ]
                  },
                  activity: {
                    lastingType: 'RELATIVE',
                    lasting: {unit: 'HOURS', value: 24},
                    cronWeekdays: [0, 1, 6],
                    cronTime: '12:34',
                    lastingAt: '2019-08-24T14:15:22Z',
                    timeExclusions: {uuid: '6a177f3e-748f-44d4-ac30-a457a5199685'}
                  },
                  printout: {
                    template: '|#{promotion.name};#{promotion.discountType == \'EXACT_PRICE\' ? \'Price\':\'Discount\'} #{promotion.discountValue} #{promotion.discountType == \'PERCENT\'? \'%\' : \'USD\'};Valid for;#{moment.utc(coupon.createdAt).tz(\'Europe/Warsaw\').format(\'DD.MM.YYYY HH:mm\')} - #{moment.utc(coupon.lastingAt).tz(\'Europe/Warsaw\').format(\'DD.MM.YYYY HH:mm\')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!',
                    maxLineLength: 18,
                    newLineDelimiter: ';'
                  },
                  filterIds: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],
                  types: ['MEMBERS_ONLY', 'HANDBILL'],
                  excludeByAvailableProducts: true,
                  slotFilters: {
                    order: 'GIVEN',
                    slots: [{filterId: 'aff0ee0f-f371-4b82-82c6-dc3b96f05c91', limit: 5}]
                  }
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            HttpRequest::methodRegister('PATCH');
            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/handbill/%7BhandbillUuid%7D');
            $request->setMethod(HttpRequest::HTTP_METH_PATCH);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"channel":"MOBILE","status":"DRAFT","name":"string","description":"string","controlGroup":{"name":"string","percentage":0},"variants":[{"name":"string","uuid":"095be615-a8ad-4c33-8e9c-c7612fbf6c9f","percentage":0,"ai":{"controlVariant":true,"varietyFactor":0.5,"varietyGroupSize":1,"redistributionFrequencyFactor":0.5,"popularityBoosting":1},"limits":{"limitPerDay":6,"limitExceptions":[{"dayOfWeek":5,"limitPerDay":8}],"limitsPerBasket":[{"basketSize":12,"basketValue":30.5,"condition":"AND"}],"limitExclusion":[{"catalogId":22424,"products":["UGG-BB-PUR-06"],"filters":["7c1fbdf6-dd27-11ea-87d0-0242ac130003"]}]},"activity":{"lastingType":"RELATIVE","lasting":{"unit":"HOURS","value":24},"cronWeekdays":[0,1,6],"cronTime":"12:34","lastingAt":"2019-08-24T14:15:22Z","timeExclusions":{"uuid":"6a177f3e-748f-44d4-ac30-a457a5199685"}},"printout":{"template":"|#{promotion.name};#{promotion.discountType == 'EXACT_PRICE' ? 'Price':'Discount'} #{promotion.discountValue} #{promotion.discountType == 'PERCENT'? '%' : 'USD'};Valid for;#{moment.utc(coupon.createdAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')} - #{moment.utc(coupon.lastingAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!","maxLineLength":18,"newLineDelimiter":";"},"filterIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"types":["MEMBERS_ONLY","HANDBILL"],"excludeByAvailableProducts":true,"slotFilters":{"order":"GIVEN","slots":[{"filterId":"aff0ee0f-f371-4b82-82c6-dc3b96f05c91","limit":5}]}}]}');

            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/v4/promotions/handbill/%7BhandbillUuid%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"channel\":\"MOBILE\",\"status\":\"DRAFT\",\"name\":\"string\",\"description\":\"string\",\"controlGroup\":{\"name\":\"string\",\"percentage\":0},\"variants\":[{\"name\":\"string\",\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"percentage\":0,\"ai\":{\"controlVariant\":true,\"varietyFactor\":0.5,\"varietyGroupSize\":1,\"redistributionFrequencyFactor\":0.5,\"popularityBoosting\":1},\"limits\":{\"limitPerDay\":6,\"limitExceptions\":[{\"dayOfWeek\":5,\"limitPerDay\":8}],\"limitsPerBasket\":[{\"basketSize\":12,\"basketValue\":30.5,\"condition\":\"AND\"}],\"limitExclusion\":[{\"catalogId\":22424,\"products\":[\"UGG-BB-PUR-06\"],\"filters\":[\"7c1fbdf6-dd27-11ea-87d0-0242ac130003\"]}]},\"activity\":{\"lastingType\":\"RELATIVE\",\"lasting\":{\"unit\":\"HOURS\",\"value\":24},\"cronWeekdays\":[0,1,6],\"cronTime\":\"12:34\",\"lastingAt\":\"2019-08-24T14:15:22Z\",\"timeExclusions\":{\"uuid\":\"6a177f3e-748f-44d4-ac30-a457a5199685\"}},\"printout\":{\"template\":\"|#{promotion.name};#{promotion.discountType == 'EXACT_PRICE' ? 'Price':'Discount'} #{promotion.discountValue} #{promotion.discountType == 'PERCENT'? '%' : 'USD'};Valid for;#{moment.utc(coupon.createdAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')} - #{moment.utc(coupon.lastingAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!\",\"maxLineLength\":18,\"newLineDelimiter\":\";\"},\"filterIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"types\":[\"MEMBERS_ONLY\",\"HANDBILL\"],\"excludeByAvailableProducts\":true,\"slotFilters\":{\"order\":\"GIVEN\",\"slots\":[{\"filterId\":\"aff0ee0f-f371-4b82-82c6-dc3b96f05c91\",\"limit\":5}]}}]}")
              .asString();
  /v4/promotions/promotion/get-for-client/handbill/{handbillUuid}:
    get:
      tags:
        - Handbills
      summary: Generate handbill for Profile
      description: |
        Assign handbill promotions to a Profile. They can be randomized or suggested by the AI engine.

        **IMPORTANT**: 
        - The endpoint is limited to 1000 requests per minute (per workspace).
        - The algorithm that selects promotions for assignment candidates applies all the following filters:
            - Promotions must be of the specified type, assigned to a handbill campaign, and with the `PUBLISH` or `HIDDEN` status.
            - Promotions must be available for the entire duration of the handbill assignment, considering `startAt` and `expireAt` dates. For example, when generating assignments on May 1, 2024 at 9:00 a.m. that are expected to last 3 hours, the algorithm will consider promotions whose `startAt` date is equal to or earlier than May 1, 2024 9:00 a.m. and `expireAt` date is equal to or later than May 1, 2024 12:00 p.m. 
            - Promotions can't currently be assigned within another handbill campaign.
            - Promotions must match the filter for the slot (if applicable). Promotions are handled by the `binoculars` service and identified by UUID.
            - Promotions are deduplicated. First they are sorted by priority, then the algorithm rejects promotions with at least one product that occurred earlier. In a special case, if a promotion with a high priority has an extensive catalog of products covering other promotions, it could exclude all promotions with a lower priority.
            - If `excludeByAvailableProducts` is set to `true`, the algorithm rejects promotions for items that are available as part of other promotions (regardless of their type)
            - After sorting promotions by priority, the algorithm rejects promotions for segments that occur after the 100th unique segment is encountered. (only 100 segments can be checked per handbill assignment, consider limiting the number of segments and reusing them).
            - After checking the first 100 unique segments, the algorithm rejects promotions for segments that don't match the user.
            - To ensure the correctness of promotion usage and redemption, the algorithm rejects promotions that are currently in the `ACTIVE` or `REDEEMED` status.
            - When using AI engine, the promotion candidate list is sorted by priority and truncated to 2500 items before applying the recommendation engine.


        ---

        **API consumers:** <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>
      operationId: getHandbillForClient_GET
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/promotions-pathHandbillUuid"
        - $ref: "#/components/parameters/promotions-queryLimit"
        - $ref: "#/components/parameters/promotions-queryPage"
        - $ref: "#/components/parameters/promotions-queryPromotionFields"
      responses:
        "200":
          description: A list of handbill-type promotions assigned to this profile
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: An array of promotions
                    items:
                      $ref: "#/components/schemas/promotions-promotionClientDataResponse"
                  meta:
                    $ref: "#/components/schemas/promotions-responseMeta"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Handbills/operation/getHandbillForClient_GET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/promotions/promotion/get-for-client/handbill/%7BhandbillUuid%7D?limit=100&page=4&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt' \
              --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", "/v4/promotions/promotion/get-for-client/handbill/%7BhandbillUuid%7D?limit=100&page=4&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt", 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/v4/promotions/promotion/get-for-client/handbill/%7BhandbillUuid%7D?limit=100&page=4&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt");
            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": "/v4/promotions/promotion/get-for-client/handbill/%7BhandbillUuid%7D?limit=100&page=4&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt",
              "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/v4/promotions/promotion/get-for-client/handbill/%7BhandbillUuid%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'limit' => '100',
              'page' => '4',
              'fields' => 'uuid,requireRedeemedPoints,requireRedeemedPoints,possibleRedeems,status,currentRedeemedQuantity,lastingAt'
            ]);

            $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/v4/promotions/promotion/get-for-client/handbill/%7BhandbillUuid%7D?limit=100&page=4&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/promotion/get-for-client/handbills:
    get:
      tags:
        - Handbills
      summary: Generate batch of handbills for Profile
      description: |
        Assign a batch of handbill promotions to a Profile. They can be randomized or suggested by the AI engine.

        **IMPORTANT**: 
        - The endpoint is limited to 1000 requests per minute (per workspace).
        - The algorithm that selects promotions for assignment candidates applies all the following filters:
            - Promotions must be of the specified type, assigned to a handbill campaign, and with the `PUBLISH` or `HIDDEN` status.
            - Promotions must be available for the entire duration of the handbill assignment, considering `startAt` and `expireAt` dates. For example, when generating assignments on May 1, 2024 at 9:00 a.m. that are expected to last 3 hours, the algorithm will consider promotions whose `startAt` date is equal to or earlier than May 1, 2024 9:00 a.m. and `expireAt` date is equal to or later than May 1, 2024 12:00 p.m. 
            - Promotions can't currently be assigned within another handbill campaign.
            - Promotions must match the filter for the slot (if applicable). Promotions are handled by the `binoculars` service and identified by UUID.
            - Promotions are deduplicated. First they are sorted by priority, then the algorithm rejects promotions with at least one product that occurred earlier. In a special case, if a promotion with a high priority has an extensive catalog of products covering other promotions, it could exclude all promotions with a lower priority.
            - If `excludeByAvailableProducts` is set to `true`, the algorithm rejects promotions for items that are available as part of other promotions (regardless of their type)
            - After sorting promotions by priority, the algorithm rejects promotions for segments that occur after the 100th unique segment is encountered. (only 100 segments can be checked per handbill assignment, consider limiting the number of segments and reusing them).
            - After checking the first 100 unique segments, the algorithm rejects promotions for segments that don't match the user.
            - To ensure the correctness of promotion usage and redemption, the algorithm rejects promotions that are currently in the `ACTIVE` or `REDEEMED` status.
            - When using AI engine, the promotion candidate list is sorted by priority and truncated to 2500 items before applying the recommendation engine.


        ---

        **API consumers:** <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>
      operationId: getBatchHandbillForClient_GET
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/promotions-queryHandbillUuid"
        - $ref: "#/components/parameters/promotions-queryPage"
        - $ref: "#/components/parameters/promotions-queryLimit"
        - $ref: "#/components/parameters/promotions-queryIncludeMeta"
        - $ref: "#/components/parameters/promotions-queryPromotionFields"
      responses:
        "200":
          description: A list of handbill-type promotions assigned to this profile
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: An array of promotions
                    items:
                      $ref: "#/components/schemas/promotions-promotionClientDataResponse"
                  meta:
                    $ref: "#/components/schemas/promotions-responseMeta"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Handbills/operation/getBatchHandbillForClient_GET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/promotions/promotion/get-for-client/handbills?handbillUuid=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt' \
              --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", "/v4/promotions/promotion/get-for-client/handbills?handbillUuid=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt", 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/v4/promotions/promotion/get-for-client/handbills?handbillUuid=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt");
            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": "/v4/promotions/promotion/get-for-client/handbills?handbillUuid=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt",
              "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/v4/promotions/promotion/get-for-client/handbills');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'handbillUuid' => 'SOME_ARRAY_VALUE',
              'page' => '4',
              'limit' => '100',
              'includeMeta' => 'false',
              'fields' => 'uuid,requireRedeemedPoints,requireRedeemedPoints,possibleRedeems,status,currentRedeemedQuantity,lastingAt'
            ]);

            $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/v4/promotions/promotion/get-for-client/handbills?handbillUuid=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/promotion/get-for-client/{identifierType}/{identifierValue}/handbill/{handbillUuid}:
    get:
      tags:
        - Handbills
      summary: Generate handbill for Profile and get Profile promotions
      description: |
        
        Assign a handbill to a Profile and retrieve a list of promotions assigned to the Profile.

        **IMPORTANT**:  
        - The endpoint is limited to 1000 requests per minute (per workspace).
        - The algorithm that selects promotions for assignment candidates applies all the following filters:
            - Promotions must be of the specified type, assigned to a handbill campaign, and with the `PUBLISH` or `HIDDEN` status.
            - Promotions must be available for the entire duration of the handbill assignment, considering `startAt` and `expireAt` dates. For example, when generating assignments on May 1, 2024 at 9:00 a.m. that are expected to last 3 hours, the algorithm will consider promotions whose `startAt` date is equal to or earlier than May 1, 2024 9:00 a.m. and `expireAt` date is equal to or later than May 1, 2024 12:00 p.m. 
            - Promotions can't currently be assigned within another handbill campaign.
            - Promotions must match the filter for the slot (if applicable). Promotions are handled by the `binoculars` service and identified by UUID.
            - Promotions are deduplicated. First they are sorted by priority, then the algorithm rejects promotions with at least one product that occurred earlier. In a special case, if a promotion with a high priority has an extensive catalog of products covering other promotions, it could exclude all promotions with a lower priority.
            - If `excludeByAvailableProducts` is set to `true`, the algorithm rejects promotions for items that are available as part of other promotions (regardless of their type)
            - After sorting promotions by priority, the algorithm rejects promotions for segments that occur after the 100th unique segment is encountered. (only 100 segments can be checked per handbill assignment, consider limiting the number of segments and reusing them).
            - After checking the first 100 unique segments, the algorithm rejects promotions for segments that don't match the user.
            - To ensure the correctness of promotion usage and redemption, the algorithm rejects promotions that are currently in the `ACTIVE` or `REDEEMED` status.
            - When using AI engine, the promotion candidate list is sorted by priority and truncated to 2500 items before applying the recommendation engine.


        ---

        **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:** `PROMOTIONS_FOR_CLIENT_HANDBILL_READ`

        **User role permission required:** `campaigns_personalised_promotions: read`
      operationId: getAssignHandbillForClient_GET
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
        - $ref: "#/components/parameters/promotions-pathHandbillUuid"
        - $ref: "#/components/parameters/promotions-queryPromotionType"
        - $ref: "#/components/parameters/promotions-queryPromotionStatus"
        - $ref: "#/components/parameters/promotions-queryVisibilityStatus"
        - $ref: "#/components/parameters/promotions-queryTagNames"
        - $ref: "#/components/parameters/promotions-queryTarget"
        - $ref: "#/components/parameters/promotions-queryPromotionPresentOnly"
        - $ref: "#/components/parameters/promotions-queryLastingOnly"
        - $ref: "#/components/parameters/promotions-queryPage"
        - $ref: "#/components/parameters/promotions-queryLimit"
        - $ref: "#/components/parameters/promotions-queryHandbillSort"
        - $ref: "#/components/parameters/promotions-queryIncludeMeta"
        - $ref: "#/components/parameters/promotions-queryPromotionFields"
      responses:
        "200":
          description: A list of promotions assigned to this profile
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: An array of promotions
                    items:
                      $ref: "#/components/schemas/promotions-promotionClientDataResponse"
                  meta:
                    $ref: "#/components/schemas/promotions-responseMeta"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Handbills/operation/getAssignHandbillForClient_GET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?type=SOME_ARRAY_VALUE&status=SOME_ARRAY_VALUE&visibilityStatus=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&page=4&limit=100&sort=createdAt%2Cdesc&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt' \
              --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", "/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?type=SOME_ARRAY_VALUE&status=SOME_ARRAY_VALUE&visibilityStatus=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&page=4&limit=100&sort=createdAt%2Cdesc&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt", 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/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?type=SOME_ARRAY_VALUE&status=SOME_ARRAY_VALUE&visibilityStatus=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&page=4&limit=100&sort=createdAt%2Cdesc&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt");
            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": "/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?type=SOME_ARRAY_VALUE&status=SOME_ARRAY_VALUE&visibilityStatus=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&page=4&limit=100&sort=createdAt%2Cdesc&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt",
              "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/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'type' => 'SOME_ARRAY_VALUE',
              'status' => 'SOME_ARRAY_VALUE',
              'visibilityStatus' => 'SOME_ARRAY_VALUE',
              'tagNames' => 'SOME_ARRAY_VALUE',
              'target' => 'SOME_ARRAY_VALUE',
              'presentOnly' => 'true',
              'lastingOnly' => 'true',
              'page' => '4',
              'limit' => '100',
              'sort' => 'createdAt,desc',
              'includeMeta' => 'false',
              'fields' => 'uuid,requireRedeemedPoints,requireRedeemedPoints,possibleRedeems,status,currentRedeemedQuantity,lastingAt'
            ]);

            $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/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?type=SOME_ARRAY_VALUE&status=SOME_ARRAY_VALUE&visibilityStatus=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&page=4&limit=100&sort=createdAt%2Cdesc&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/v2/promotion/get-for-client/{identifierType}/{identifierValue}/handbill/{handbillUuid}:
    get:
      tags:
        - Handbills
      summary: Generate handbill for Profile (v2)
      description: |
        Assign handbill promotions to a Profile. They can be randomized or suggested by the AI engine.

        **IMPORTANT**: 
        - The endpoint is limited to 1000 requests per minute (per workspace).
        - The algorithm that selects promotions for assignment candidates applies all the following filters:
            - Promotions must be of the specified type, assigned to a handbill campaign, and with the `PUBLISH` or `HIDDEN` status.
            - Promotions must be available for the entire duration of the handbill assignment, considering `startAt` and `expireAt` dates. For example, when generating assignments on May 1, 2024 at 9:00 a.m. that are expected to last 3 hours, the algorithm will consider promotions whose `startAt` date is equal to or earlier than May 1, 2024 9:00 a.m. and `expireAt` date is equal to or later than May 1, 2024 12:00 p.m. 
            - Promotions can't currently be assigned within another handbill campaign.
            - Promotions must match the filter for the slot (if applicable). Promotions are handled by the `binoculars` service and identified by UUID.
            - Promotions are deduplicated. First they are sorted by priority, then the algorithm rejects promotions with at least one product that occurred earlier. In a special case, if a promotion with a high priority has an extensive catalog of products covering other promotions, it could exclude all promotions with a lower priority.
            - If `excludeByAvailableProducts` is set to `true`, the algorithm rejects promotions for items that are available as part of other promotions (regardless of their type)
            - After sorting promotions by priority, the algorithm rejects promotions for segments that occur after the 100th unique segment is encountered. (only 100 segments can be checked per handbill assignment, consider limiting the number of segments and reusing them).
            - After checking the first 100 unique segments, the algorithm rejects promotions for segments that don't match the user.
            - To ensure the correctness of promotion usage and redemption, the algorithm rejects promotions that are currently in the `ACTIVE` or `REDEEMED` status.
            - When using AI engine, the promotion candidate list is sorted by priority and truncated to 2500 items before applying the recommendation engine.


        ---

        **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:** `PROMOTIONS_FOR_CLIENT_HANDBILL_READ`

        **User role permission required:** `campaigns_personalised_promotions: read`
      operationId: getHandbillForClientV2_GET
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
        - $ref: "#/components/parameters/promotions-pathHandbillUuid"
        - $ref: "#/components/parameters/promotions-queryLimit"
        - $ref: "#/components/parameters/promotions-queryPage"
      responses:
        "200":
          description: A list of handbill-type promotions assigned to this profile
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: An array of promotions
                    items:
                      $ref: "#/components/schemas/promotions-promotionClientDataResponse"
                  meta:
                    $ref: "#/components/schemas/promotions-responseMeta"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Handbills/operation/getHandbillForClientV2_GET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?limit=100&page=4' \
              --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", "/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?limit=100&page=4", 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/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?limit=100&page=4");
            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": "/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?limit=100&page=4",
              "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/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'limit' => '100',
              'page' => '4'
            ]);

            $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/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?limit=100&page=4")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/promotion/get-for-client/{identifierType}/{identifierValue}/with-handbills:
    get:
      tags:
        - Handbills
      summary: Generate batch handbill for Profile and get Profile promotions
      description: |
        
        Assign a batch handbill to a Profile and retrieve a list of promotions assigned to the Profile.

        **IMPORTANT**: 
        - The endpoint is limited to 1000 requests per minute (per workspace).
        - The algorithm that selects promotions for assignment candidates applies all the following filters:
            - Promotions must be of the specified type, assigned to a handbill campaign, and with the `PUBLISH` or `HIDDEN` status.
            - Promotions must be available for the entire duration of the handbill assignment, considering `startAt` and `expireAt` dates. For example, when generating assignments on May 1, 2024 at 9:00 a.m. that are expected to last 3 hours, the algorithm will consider promotions whose `startAt` date is equal to or earlier than May 1, 2024 9:00 a.m. and `expireAt` date is equal to or later than May 1, 2024 12:00 p.m. 
            - Promotions can't currently be assigned within another handbill campaign.
            - Promotions must match the filter for the slot (if applicable). Promotions are handled by the `binoculars` service and identified by UUID.
            - Promotions are deduplicated. First they are sorted by priority, then the algorithm rejects promotions with at least one product that occurred earlier. In a special case, if a promotion with a high priority has an extensive catalog of products covering other promotions, it could exclude all promotions with a lower priority.
            - If `excludeByAvailableProducts` is set to `true`, the algorithm rejects promotions for items that are available as part of other promotions (regardless of their type)
            - After sorting promotions by priority, the algorithm rejects promotions for segments that occur after the 100th unique segment is encountered. (only 100 segments can be checked per handbill assignment, consider limiting the number of segments and reusing them).
            - After checking the first 100 unique segments, the algorithm rejects promotions for segments that don't match the user.
            - To ensure the correctness of promotion usage and redemption, the algorithm rejects promotions that are currently in the `ACTIVE` or `REDEEMED` status.
            - When using AI engine, the promotion candidate list is sorted by priority and truncated to 2500 items before applying the recommendation engine.


        ---

        **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:** `PROMOTIONS_FOR_CLIENT_HANDBILL_READ`

        **User role permission required:** `campaigns_personalised_promotions: read`
      operationId: getAssignHandbillsForClient_GET
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
        - $ref: "#/components/parameters/promotions-queryHandbillUuid"
        - $ref: "#/components/parameters/promotions-queryPromotionType"
        - $ref: "#/components/parameters/promotions-queryPage"
        - $ref: "#/components/parameters/promotions-queryLimit"
        - $ref: "#/components/parameters/promotions-queryIncludeMeta"
        - $ref: "#/components/parameters/promotions-queryPromotionStatus"
        - $ref: "#/components/parameters/promotions-queryPromotionFields"
      responses:
        "200":
          description: A list of promotions assigned to this profile
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: An array of promotions
                    items:
                      $ref: "#/components/schemas/promotions-promotionClientDataResponse"
                  meta:
                    $ref: "#/components/schemas/promotions-responseMeta"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Handbills/operation/getAssignHandbillsForClient_GET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/with-handbills?handbillUuid=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&status=SOME_ARRAY_VALUE&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt' \
              --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", "/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/with-handbills?handbillUuid=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&status=SOME_ARRAY_VALUE&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt", 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/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/with-handbills?handbillUuid=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&status=SOME_ARRAY_VALUE&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt");
            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": "/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/with-handbills?handbillUuid=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&status=SOME_ARRAY_VALUE&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt",
              "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/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/with-handbills');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'handbillUuid' => 'SOME_ARRAY_VALUE',
              'type' => 'SOME_ARRAY_VALUE',
              'page' => '4',
              'limit' => '100',
              'includeMeta' => 'false',
              'status' => 'SOME_ARRAY_VALUE',
              'fields' => 'uuid,requireRedeemedPoints,requireRedeemedPoints,possibleRedeems,status,currentRedeemedQuantity,lastingAt'
            ]);

            $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/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/with-handbills?handbillUuid=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&status=SOME_ARRAY_VALUE&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/settings:
    get:
      tags:
        - Promotion settings
      summary: Get settings for current Workspace
      operationId: endpointSettingsGetSettingsGET
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-promotionsSettingsBody"
              example:
                data:
                  expression: xxxxxxx-d047-40fd-99c8-yyyyxxxxyyy
                  blockTag: BLOCK_PROMOTIONS
                  checkoutSettings:
                    handbilUuids:
                      - 1eb6c8f0-dc7a-4d9c-9e0e-bb995ee87699
                  cashbackSettings:
                    exchangeRate: 10
                    limits:
                      minPoints: 10
                      maxPoints: 100
                      maxTransactionAmount: 80
                      maxTransactionPercentage: 60
                  promotionListSettings:
                    fields:
                      - code
                      - possibleRedeems
                      - lastingAt
                      - vouchers
                    sort: NONE
                    limit: 200
                    where:
                      status:
                        - ASSIGNED
                        - ACTIVE
                      type:
                        - CUSTOM
                        - MEMBERS_ONLY
                        - HANDBILL
                      target:
                        - ALL
                        - SEGMENT
                      tagNames: null
                      lastingOnly: true
                      presentOnly: true
                      statusByType:
                        CUSTOM:
                          - ACTIVE
                        HANDBILL:
                          - ASSIGNED
                      targetByType:
                        CUSTOM:
                          - ALL
                        HANDBILL:
                          - ALL
                        MEMBERS_ONLY:
                          - SEGMENT
                      visibilityStatus:
                        - PUBLISH
                        - HIDDEN
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotion-settings/operation/endpointSettingsGetSettingsGET
      description: |
        

        ---

        **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:** `PROMOTIONS_SETTINGS_PROMOTIONS_READ`

        **User role permission required:** `campaigns_personalised_promotions: read`
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/promotions/settings
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            conn.request("GET", "/v4/promotions/settings")

            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/v4/promotions/settings");

            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": "/v4/promotions/settings",
              "headers": {}
            };

            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/v4/promotions/settings');
            $request->setMethod(HTTP_METH_GET);

            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/v4/promotions/settings")
              .asString();
    put:
      tags:
        - Promotion settings
      summary: Update settings for current Workspace
      description: |
        This method overrides all current settings. If you do not send a setting that currently exists, it will be reverted to default value.

        ---

        **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:** `PROMOTIONS_SETTINGS_PROMOTIONS_UPDATE`

        **User role permission required:** `campaigns_personalised_promotions: update`
      operationId: endpointSettingsUpdateSettingsPUT
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-promotionsSettingsBody"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      saleSettings:
                        $ref: "#/components/schemas/promotions-saleSettings"
                    additionalProperties:
                      description: More settings
                    default: {}
              example:
                application/json:
                  data:
                    expression: xxxxxxx-d047-40fd-99c8-yyyyxxxxyyy
                    blockTag: BLOCK_PROMOTIONS
                    promotionListSettings:
                      fields:
                        - code
                        - possibleRedeems
                        - lastingAt
                        - vouchers
                      sort: NONE
                      limit: 200
                      where:
                        status:
                          - ASSIGNED
                          - ACTIVE
                        type:
                          - CUSTOM
                          - MEMBERS_ONLY
                          - HANDBILL
                        target:
                          - ALL
                          - SEGMENT
                        tagNames: null
                        lastingOnly: true
                        presentOnly: true
                        statusByType:
                          CUSTOM:
                            - ACTIVE
                          HANDBILL:
                            - ASSIGNED
                        targetByType:
                          CUSTOM:
                            - ALL
                          HANDBILL:
                            - ALL
                          MEMBERS_ONLY:
                            - SEGMENT
                        visibilityStatus:
                          - PUBLISH
                          - HIDDEN
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotion-settings/operation/endpointSettingsUpdateSettingsPUT
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/v4/promotions/settings \
              --header 'content-type: application/json' \
              --data '{"checkoutSettings":{"handbillUuidsForCheckout":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"codeGeneration":{"prefix":"string","length":36,"crc":true}},"enableCodeGeneration":true,"codePrefix":"SYN","blockTag":"BLOCKED","expression":"8e30707e-988c-498c-a88e-47375a3dcfb5","promotionListSettings":{"setFieldsValues":{},"where":{"excludeIds":[3],"handbillPromotionIds":[3],"visibilityStatus":["DRAFT"],"status":["ASSIGNED"],"statusByType":{"GENERAL":["ASSIGNED"],"CUSTOM":["ASSIGNED"],"MEMBERS_ONLY":["ASSIGNED"],"HANDBILL":["ASSIGNED"]},"target":["ALL"],"targetByType":{"GENERAL":["ALL"],"CUSTOM":["ALL"],"MEMBERS_ONLY":["ALL"],"HANDBILL":["ALL"]},"type":["MEMBERS_ONLY"],"presentOnly":true,"lastingOnly":true,"displayableOnly":true,"checkExistsInTarget":true,"tagNames":["string"]},"fields":["string"],"sort":{"forDBQuery":[{"field":"headerName","direction":"asc"}],"forPaginator":"DISCOUNT_VALUE"},"page":0,"limit":0},"promotionAssignmentSettings":{"setFieldsValues":{},"where":{"excludeIds":[3],"handbillPromotionIds":[3],"visibilityStatus":["DRAFT"],"status":["ASSIGNED"],"statusByType":{"GENERAL":["ASSIGNED"],"CUSTOM":["ASSIGNED"],"MEMBERS_ONLY":["ASSIGNED"],"HANDBILL":["ASSIGNED"]},"target":["ALL"],"targetByType":{"GENERAL":["ALL"],"CUSTOM":["ALL"],"MEMBERS_ONLY":["ALL"],"HANDBILL":["ALL"]},"type":["MEMBERS_ONLY"],"presentOnly":true,"lastingOnly":true,"displayableOnly":true,"checkExistsInTarget":true,"tagNames":["string"]},"fields":["string"],"sort":{"forDBQuery":[{"field":"headerName","direction":"asc"}],"forPaginator":"DISCOUNT_VALUE"},"page":0,"limit":0},"restorePointsOnProfileDeactivation":true,"allowRedeemCompletionWhenBlocked":false,"saleSettings":{"discountSourceType":0,"clientIdCardType":0,"handbillCheckout":"04845f2a-86bf-4319-89c4-1f24d4e1f58e","priceValueBaseStrategy":"CONSTANT","combineBasketDiscounts":false,"discountOrder":{"strategy":"DISCOUNT_VALUE","direction":"asc"},"returnFields":["string"]},"lockSettings":{"promotionRequestedLockTtl":null,"processSalePromotionActivationLockWaitTime":null,"lockPromotionRequestByIdentifier":true},"transferSettings":[{"expression":"2395fc33-f2f0-420c-8e7b-0ac63c3454de","recipient":{"segments":["string"]},"sender":{"segments":["string"]}}],"cashbackSettings":{"exchangeRate":0.01,"limits":{"minPoints":10,"maxPoints":1000,"maxTransactionAmount":20,"maxTransactionPercentage":50}}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"checkoutSettings\":{\"handbillUuidsForCheckout\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"codeGeneration\":{\"prefix\":\"string\",\"length\":36,\"crc\":true}},\"enableCodeGeneration\":true,\"codePrefix\":\"SYN\",\"blockTag\":\"BLOCKED\",\"expression\":\"8e30707e-988c-498c-a88e-47375a3dcfb5\",\"promotionListSettings\":{\"setFieldsValues\":{},\"where\":{\"excludeIds\":[3],\"handbillPromotionIds\":[3],\"visibilityStatus\":[\"DRAFT\"],\"status\":[\"ASSIGNED\"],\"statusByType\":{\"GENERAL\":[\"ASSIGNED\"],\"CUSTOM\":[\"ASSIGNED\"],\"MEMBERS_ONLY\":[\"ASSIGNED\"],\"HANDBILL\":[\"ASSIGNED\"]},\"target\":[\"ALL\"],\"targetByType\":{\"GENERAL\":[\"ALL\"],\"CUSTOM\":[\"ALL\"],\"MEMBERS_ONLY\":[\"ALL\"],\"HANDBILL\":[\"ALL\"]},\"type\":[\"MEMBERS_ONLY\"],\"presentOnly\":true,\"lastingOnly\":true,\"displayableOnly\":true,\"checkExistsInTarget\":true,\"tagNames\":[\"string\"]},\"fields\":[\"string\"],\"sort\":{\"forDBQuery\":[{\"field\":\"headerName\",\"direction\":\"asc\"}],\"forPaginator\":\"DISCOUNT_VALUE\"},\"page\":0,\"limit\":0},\"promotionAssignmentSettings\":{\"setFieldsValues\":{},\"where\":{\"excludeIds\":[3],\"handbillPromotionIds\":[3],\"visibilityStatus\":[\"DRAFT\"],\"status\":[\"ASSIGNED\"],\"statusByType\":{\"GENERAL\":[\"ASSIGNED\"],\"CUSTOM\":[\"ASSIGNED\"],\"MEMBERS_ONLY\":[\"ASSIGNED\"],\"HANDBILL\":[\"ASSIGNED\"]},\"target\":[\"ALL\"],\"targetByType\":{\"GENERAL\":[\"ALL\"],\"CUSTOM\":[\"ALL\"],\"MEMBERS_ONLY\":[\"ALL\"],\"HANDBILL\":[\"ALL\"]},\"type\":[\"MEMBERS_ONLY\"],\"presentOnly\":true,\"lastingOnly\":true,\"displayableOnly\":true,\"checkExistsInTarget\":true,\"tagNames\":[\"string\"]},\"fields\":[\"string\"],\"sort\":{\"forDBQuery\":[{\"field\":\"headerName\",\"direction\":\"asc\"}],\"forPaginator\":\"DISCOUNT_VALUE\"},\"page\":0,\"limit\":0},\"restorePointsOnProfileDeactivation\":true,\"allowRedeemCompletionWhenBlocked\":false,\"saleSettings\":{\"discountSourceType\":0,\"clientIdCardType\":0,\"handbillCheckout\":\"04845f2a-86bf-4319-89c4-1f24d4e1f58e\",\"priceValueBaseStrategy\":\"CONSTANT\",\"combineBasketDiscounts\":false,\"discountOrder\":{\"strategy\":\"DISCOUNT_VALUE\",\"direction\":\"asc\"},\"returnFields\":[\"string\"]},\"lockSettings\":{\"promotionRequestedLockTtl\":null,\"processSalePromotionActivationLockWaitTime\":null,\"lockPromotionRequestByIdentifier\":true},\"transferSettings\":[{\"expression\":\"2395fc33-f2f0-420c-8e7b-0ac63c3454de\",\"recipient\":{\"segments\":[\"string\"]},\"sender\":{\"segments\":[\"string\"]}}],\"cashbackSettings\":{\"exchangeRate\":0.01,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}}"

            headers = { 'content-type': "application/json" }

            conn.request("PUT", "/v4/promotions/settings", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "checkoutSettings": {
                "handbillUuidsForCheckout": [
                  "497f6eca-6276-4993-bfeb-53cbbbba6f08"
                ],
                "codeGeneration": {
                  "prefix": "string",
                  "length": 36,
                  "crc": true
                }
              },
              "enableCodeGeneration": true,
              "codePrefix": "SYN",
              "blockTag": "BLOCKED",
              "expression": "8e30707e-988c-498c-a88e-47375a3dcfb5",
              "promotionListSettings": {
                "setFieldsValues": {},
                "where": {
                  "excludeIds": [
                    3
                  ],
                  "handbillPromotionIds": [
                    3
                  ],
                  "visibilityStatus": [
                    "DRAFT"
                  ],
                  "status": [
                    "ASSIGNED"
                  ],
                  "statusByType": {
                    "GENERAL": [
                      "ASSIGNED"
                    ],
                    "CUSTOM": [
                      "ASSIGNED"
                    ],
                    "MEMBERS_ONLY": [
                      "ASSIGNED"
                    ],
                    "HANDBILL": [
                      "ASSIGNED"
                    ]
                  },
                  "target": [
                    "ALL"
                  ],
                  "targetByType": {
                    "GENERAL": [
                      "ALL"
                    ],
                    "CUSTOM": [
                      "ALL"
                    ],
                    "MEMBERS_ONLY": [
                      "ALL"
                    ],
                    "HANDBILL": [
                      "ALL"
                    ]
                  },
                  "type": [
                    "MEMBERS_ONLY"
                  ],
                  "presentOnly": true,
                  "lastingOnly": true,
                  "displayableOnly": true,
                  "checkExistsInTarget": true,
                  "tagNames": [
                    "string"
                  ]
                },
                "fields": [
                  "string"
                ],
                "sort": {
                  "forDBQuery": [
                    {
                      "field": "headerName",
                      "direction": "asc"
                    }
                  ],
                  "forPaginator": "DISCOUNT_VALUE"
                },
                "page": 0,
                "limit": 0
              },
              "promotionAssignmentSettings": {
                "setFieldsValues": {},
                "where": {
                  "excludeIds": [
                    3
                  ],
                  "handbillPromotionIds": [
                    3
                  ],
                  "visibilityStatus": [
                    "DRAFT"
                  ],
                  "status": [
                    "ASSIGNED"
                  ],
                  "statusByType": {
                    "GENERAL": [
                      "ASSIGNED"
                    ],
                    "CUSTOM": [
                      "ASSIGNED"
                    ],
                    "MEMBERS_ONLY": [
                      "ASSIGNED"
                    ],
                    "HANDBILL": [
                      "ASSIGNED"
                    ]
                  },
                  "target": [
                    "ALL"
                  ],
                  "targetByType": {
                    "GENERAL": [
                      "ALL"
                    ],
                    "CUSTOM": [
                      "ALL"
                    ],
                    "MEMBERS_ONLY": [
                      "ALL"
                    ],
                    "HANDBILL": [
                      "ALL"
                    ]
                  },
                  "type": [
                    "MEMBERS_ONLY"
                  ],
                  "presentOnly": true,
                  "lastingOnly": true,
                  "displayableOnly": true,
                  "checkExistsInTarget": true,
                  "tagNames": [
                    "string"
                  ]
                },
                "fields": [
                  "string"
                ],
                "sort": {
                  "forDBQuery": [
                    {
                      "field": "headerName",
                      "direction": "asc"
                    }
                  ],
                  "forPaginator": "DISCOUNT_VALUE"
                },
                "page": 0,
                "limit": 0
              },
              "restorePointsOnProfileDeactivation": true,
              "allowRedeemCompletionWhenBlocked": false,
              "saleSettings": {
                "discountSourceType": 0,
                "clientIdCardType": 0,
                "handbillCheckout": "04845f2a-86bf-4319-89c4-1f24d4e1f58e",
                "priceValueBaseStrategy": "CONSTANT",
                "combineBasketDiscounts": false,
                "discountOrder": {
                  "strategy": "DISCOUNT_VALUE",
                  "direction": "asc"
                },
                "returnFields": [
                  "string"
                ]
              },
              "lockSettings": {
                "promotionRequestedLockTtl": null,
                "processSalePromotionActivationLockWaitTime": null,
                "lockPromotionRequestByIdentifier": true
              },
              "transferSettings": [
                {
                  "expression": "2395fc33-f2f0-420c-8e7b-0ac63c3454de",
                  "recipient": {
                    "segments": [
                      "string"
                    ]
                  },
                  "sender": {
                    "segments": [
                      "string"
                    ]
                  }
                }
              ],
              "cashbackSettings": {
                "exchangeRate": 0.01,
                "limits": {
                  "minPoints": 10,
                  "maxPoints": 1000,
                  "maxTransactionAmount": 20,
                  "maxTransactionPercentage": 50
                }
              }
            });

            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/v4/promotions/settings");
            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": "/v4/promotions/settings",
              "headers": {
                "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({
              checkoutSettings: {
                handbillUuidsForCheckout: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],
                codeGeneration: {prefix: 'string', length: 36, crc: true}
              },
              enableCodeGeneration: true,
              codePrefix: 'SYN',
              blockTag: 'BLOCKED',
              expression: '8e30707e-988c-498c-a88e-47375a3dcfb5',
              promotionListSettings: {
                setFieldsValues: {},
                where: {
                  excludeIds: [3],
                  handbillPromotionIds: [3],
                  visibilityStatus: ['DRAFT'],
                  status: ['ASSIGNED'],
                  statusByType: {
                    GENERAL: ['ASSIGNED'],
                    CUSTOM: ['ASSIGNED'],
                    MEMBERS_ONLY: ['ASSIGNED'],
                    HANDBILL: ['ASSIGNED']
                  },
                  target: ['ALL'],
                  targetByType: {GENERAL: ['ALL'], CUSTOM: ['ALL'], MEMBERS_ONLY: ['ALL'], HANDBILL: ['ALL']},
                  type: ['MEMBERS_ONLY'],
                  presentOnly: true,
                  lastingOnly: true,
                  displayableOnly: true,
                  checkExistsInTarget: true,
                  tagNames: ['string']
                },
                fields: ['string'],
                sort: {
                  forDBQuery: [{field: 'headerName', direction: 'asc'}],
                  forPaginator: 'DISCOUNT_VALUE'
                },
                page: 0,
                limit: 0
              },
              promotionAssignmentSettings: {
                setFieldsValues: {},
                where: {
                  excludeIds: [3],
                  handbillPromotionIds: [3],
                  visibilityStatus: ['DRAFT'],
                  status: ['ASSIGNED'],
                  statusByType: {
                    GENERAL: ['ASSIGNED'],
                    CUSTOM: ['ASSIGNED'],
                    MEMBERS_ONLY: ['ASSIGNED'],
                    HANDBILL: ['ASSIGNED']
                  },
                  target: ['ALL'],
                  targetByType: {GENERAL: ['ALL'], CUSTOM: ['ALL'], MEMBERS_ONLY: ['ALL'], HANDBILL: ['ALL']},
                  type: ['MEMBERS_ONLY'],
                  presentOnly: true,
                  lastingOnly: true,
                  displayableOnly: true,
                  checkExistsInTarget: true,
                  tagNames: ['string']
                },
                fields: ['string'],
                sort: {
                  forDBQuery: [{field: 'headerName', direction: 'asc'}],
                  forPaginator: 'DISCOUNT_VALUE'
                },
                page: 0,
                limit: 0
              },
              restorePointsOnProfileDeactivation: true,
              allowRedeemCompletionWhenBlocked: false,
              saleSettings: {
                discountSourceType: 0,
                clientIdCardType: 0,
                handbillCheckout: '04845f2a-86bf-4319-89c4-1f24d4e1f58e',
                priceValueBaseStrategy: 'CONSTANT',
                combineBasketDiscounts: false,
                discountOrder: {strategy: 'DISCOUNT_VALUE', direction: 'asc'},
                returnFields: ['string']
              },
              lockSettings: {
                promotionRequestedLockTtl: null,
                processSalePromotionActivationLockWaitTime: null,
                lockPromotionRequestByIdentifier: true
              },
              transferSettings: [
                {
                  expression: '2395fc33-f2f0-420c-8e7b-0ac63c3454de',
                  recipient: {segments: ['string']},
                  sender: {segments: ['string']}
                }
              ],
              cashbackSettings: {
                exchangeRate: 0.01,
                limits: {
                  minPoints: 10,
                  maxPoints: 1000,
                  maxTransactionAmount: 20,
                  maxTransactionPercentage: 50
                }
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/settings');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"checkoutSettings":{"handbillUuidsForCheckout":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"codeGeneration":{"prefix":"string","length":36,"crc":true}},"enableCodeGeneration":true,"codePrefix":"SYN","blockTag":"BLOCKED","expression":"8e30707e-988c-498c-a88e-47375a3dcfb5","promotionListSettings":{"setFieldsValues":{},"where":{"excludeIds":[3],"handbillPromotionIds":[3],"visibilityStatus":["DRAFT"],"status":["ASSIGNED"],"statusByType":{"GENERAL":["ASSIGNED"],"CUSTOM":["ASSIGNED"],"MEMBERS_ONLY":["ASSIGNED"],"HANDBILL":["ASSIGNED"]},"target":["ALL"],"targetByType":{"GENERAL":["ALL"],"CUSTOM":["ALL"],"MEMBERS_ONLY":["ALL"],"HANDBILL":["ALL"]},"type":["MEMBERS_ONLY"],"presentOnly":true,"lastingOnly":true,"displayableOnly":true,"checkExistsInTarget":true,"tagNames":["string"]},"fields":["string"],"sort":{"forDBQuery":[{"field":"headerName","direction":"asc"}],"forPaginator":"DISCOUNT_VALUE"},"page":0,"limit":0},"promotionAssignmentSettings":{"setFieldsValues":{},"where":{"excludeIds":[3],"handbillPromotionIds":[3],"visibilityStatus":["DRAFT"],"status":["ASSIGNED"],"statusByType":{"GENERAL":["ASSIGNED"],"CUSTOM":["ASSIGNED"],"MEMBERS_ONLY":["ASSIGNED"],"HANDBILL":["ASSIGNED"]},"target":["ALL"],"targetByType":{"GENERAL":["ALL"],"CUSTOM":["ALL"],"MEMBERS_ONLY":["ALL"],"HANDBILL":["ALL"]},"type":["MEMBERS_ONLY"],"presentOnly":true,"lastingOnly":true,"displayableOnly":true,"checkExistsInTarget":true,"tagNames":["string"]},"fields":["string"],"sort":{"forDBQuery":[{"field":"headerName","direction":"asc"}],"forPaginator":"DISCOUNT_VALUE"},"page":0,"limit":0},"restorePointsOnProfileDeactivation":true,"allowRedeemCompletionWhenBlocked":false,"saleSettings":{"discountSourceType":0,"clientIdCardType":0,"handbillCheckout":"04845f2a-86bf-4319-89c4-1f24d4e1f58e","priceValueBaseStrategy":"CONSTANT","combineBasketDiscounts":false,"discountOrder":{"strategy":"DISCOUNT_VALUE","direction":"asc"},"returnFields":["string"]},"lockSettings":{"promotionRequestedLockTtl":null,"processSalePromotionActivationLockWaitTime":null,"lockPromotionRequestByIdentifier":true},"transferSettings":[{"expression":"2395fc33-f2f0-420c-8e7b-0ac63c3454de","recipient":{"segments":["string"]},"sender":{"segments":["string"]}}],"cashbackSettings":{"exchangeRate":0.01,"limits":{"minPoints":10,"maxPoints":1000,"maxTransactionAmount":20,"maxTransactionPercentage":50}}}');

            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/v4/promotions/settings")
              .header("content-type", "application/json")
              .body("{\"checkoutSettings\":{\"handbillUuidsForCheckout\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"codeGeneration\":{\"prefix\":\"string\",\"length\":36,\"crc\":true}},\"enableCodeGeneration\":true,\"codePrefix\":\"SYN\",\"blockTag\":\"BLOCKED\",\"expression\":\"8e30707e-988c-498c-a88e-47375a3dcfb5\",\"promotionListSettings\":{\"setFieldsValues\":{},\"where\":{\"excludeIds\":[3],\"handbillPromotionIds\":[3],\"visibilityStatus\":[\"DRAFT\"],\"status\":[\"ASSIGNED\"],\"statusByType\":{\"GENERAL\":[\"ASSIGNED\"],\"CUSTOM\":[\"ASSIGNED\"],\"MEMBERS_ONLY\":[\"ASSIGNED\"],\"HANDBILL\":[\"ASSIGNED\"]},\"target\":[\"ALL\"],\"targetByType\":{\"GENERAL\":[\"ALL\"],\"CUSTOM\":[\"ALL\"],\"MEMBERS_ONLY\":[\"ALL\"],\"HANDBILL\":[\"ALL\"]},\"type\":[\"MEMBERS_ONLY\"],\"presentOnly\":true,\"lastingOnly\":true,\"displayableOnly\":true,\"checkExistsInTarget\":true,\"tagNames\":[\"string\"]},\"fields\":[\"string\"],\"sort\":{\"forDBQuery\":[{\"field\":\"headerName\",\"direction\":\"asc\"}],\"forPaginator\":\"DISCOUNT_VALUE\"},\"page\":0,\"limit\":0},\"promotionAssignmentSettings\":{\"setFieldsValues\":{},\"where\":{\"excludeIds\":[3],\"handbillPromotionIds\":[3],\"visibilityStatus\":[\"DRAFT\"],\"status\":[\"ASSIGNED\"],\"statusByType\":{\"GENERAL\":[\"ASSIGNED\"],\"CUSTOM\":[\"ASSIGNED\"],\"MEMBERS_ONLY\":[\"ASSIGNED\"],\"HANDBILL\":[\"ASSIGNED\"]},\"target\":[\"ALL\"],\"targetByType\":{\"GENERAL\":[\"ALL\"],\"CUSTOM\":[\"ALL\"],\"MEMBERS_ONLY\":[\"ALL\"],\"HANDBILL\":[\"ALL\"]},\"type\":[\"MEMBERS_ONLY\"],\"presentOnly\":true,\"lastingOnly\":true,\"displayableOnly\":true,\"checkExistsInTarget\":true,\"tagNames\":[\"string\"]},\"fields\":[\"string\"],\"sort\":{\"forDBQuery\":[{\"field\":\"headerName\",\"direction\":\"asc\"}],\"forPaginator\":\"DISCOUNT_VALUE\"},\"page\":0,\"limit\":0},\"restorePointsOnProfileDeactivation\":true,\"allowRedeemCompletionWhenBlocked\":false,\"saleSettings\":{\"discountSourceType\":0,\"clientIdCardType\":0,\"handbillCheckout\":\"04845f2a-86bf-4319-89c4-1f24d4e1f58e\",\"priceValueBaseStrategy\":\"CONSTANT\",\"combineBasketDiscounts\":false,\"discountOrder\":{\"strategy\":\"DISCOUNT_VALUE\",\"direction\":\"asc\"},\"returnFields\":[\"string\"]},\"lockSettings\":{\"promotionRequestedLockTtl\":null,\"processSalePromotionActivationLockWaitTime\":null,\"lockPromotionRequestByIdentifier\":true},\"transferSettings\":[{\"expression\":\"2395fc33-f2f0-420c-8e7b-0ac63c3454de\",\"recipient\":{\"segments\":[\"string\"]},\"sender\":{\"segments\":[\"string\"]}}],\"cashbackSettings\":{\"exchangeRate\":0.01,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}}")
              .asString();
  /v4/promotions/lock/create-points-lock-for-client/{identifierType}/{identifierValue}:
    post:
      tags:
        - Promotion locks
      summary: Create point lock for profile
      description: |
        Create a point lock for a profile. That profile cannot activate or de-activate promotions based on loyalty points until the lock is released. The profile can still redeem promotions.  
        This lock is released with the ["Release point lock for profile" endpoint](#operation/endpointLockReleaseLockForClientPOST) or when its TTL (defined in the query parameters) expires.


        ---

        **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:** `PROMOTIONS_LOCK_UPDATE`

        **User role permission required:** `campaigns_promotions: update`
      operationId: endpointLockCreateLockForClientPOST
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/promotions-queryLockTtlSec"
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
      responses:
        "200":
          description: Lock created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-createLockRes"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          $ref: "#/components/responses/promotions-ClientNotFoundError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotion-locks/operation/endpointLockCreateLockForClientPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api.synerise.com/v4/promotions/lock/create-points-lock-for-client/email/%7BidentifierValue%7D?lockTtlSec=SOME_NUMBER_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("POST", "/v4/promotions/lock/create-points-lock-for-client/email/%7BidentifierValue%7D?lockTtlSec=SOME_NUMBER_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/v4/promotions/lock/create-points-lock-for-client/email/%7BidentifierValue%7D?lockTtlSec=SOME_NUMBER_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/lock/create-points-lock-for-client/email/%7BidentifierValue%7D?lockTtlSec=SOME_NUMBER_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/lock/create-points-lock-for-client/email/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setQueryData([
              'lockTtlSec' => 'SOME_NUMBER_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/promotions/lock/create-points-lock-for-client/email/%7BidentifierValue%7D?lockTtlSec=SOME_NUMBER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/lock/release-points-lock-for-client/{identifierType}/{identifierValue}/{lockIdentifier}:
    post:
      tags:
        - Promotion locks
      summary: Release point lock for profile
      description: |
        Release a [point lock](#operation/endpointLockCreateLockForClientPOST) from a profile. That profile can now activate and de-activate promotions based on loyalty points.


        ---

        **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:** `PROMOTIONS_LOCK_UPDATE`

        **User role permission required:** `campaigns_promotions: update`
      operationId: endpointLockReleaseLockForClientPOST
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/promotions-pathLockIdentifier"
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
      responses:
        "200":
          description: Lock released
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-releaseLockRes"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          $ref: "#/components/responses/promotions-ClientNotFoundError"
        "409":
          $ref: "#/components/responses/promotions-LockAlreadyExistsError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotion-locks/operation/endpointLockReleaseLockForClientPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/lock/release-points-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119 \
              --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", "/v4/promotions/lock/release-points-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119", 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/v4/promotions/lock/release-points-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119");
            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": "/v4/promotions/lock/release-points-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119",
              "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/v4/promotions/lock/release-points-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119');
            $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/v4/promotions/lock/release-points-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/lock/release-promotion-requested-lock-for-client/{identifierType}/{identifierValue}/{lockIdentifier}:
    post:
      tags:
        - Promotion locks
      summary: Release "promotion requested" lock from profile
      description: |
        Release a "promotion requested" lock from a profile. That profile can now fetch promotion lists. This kind of lock can be applied when using the [Get Profile promotions by a custom filter](#operation/GetClientPromotionsByACustomFilter) endpoint.

        ---

        **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:** `PROMOTIONS_LOCK_UPDATE`

        **User role permission required:** `campaigns_promotions: update`
      operationId: endpointLockReleasePromotionRequestedLockForClientPOST
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/promotions-pathLockIdentifier"
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
      responses:
        "200":
          description: Lock released
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-releaseLockRes"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          description: Not found
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: "#/components/schemas/promotions-ProfileNotFoundErrorV1"
                  - $ref: "#/components/schemas/promotions-LockNotFoundErrorV1"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotion-locks/operation/endpointLockReleasePromotionRequestedLockForClientPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/lock/release-promotion-requested-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119 \
              --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", "/v4/promotions/lock/release-promotion-requested-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119", 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/v4/promotions/lock/release-promotion-requested-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119");
            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": "/v4/promotions/lock/release-promotion-requested-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119",
              "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/v4/promotions/lock/release-promotion-requested-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119');
            $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/v4/promotions/lock/release-promotion-requested-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/v2/points/transfer:
    post:
      tags:
        - Promotions points
      summary: Transfer points to another profile
      description: |
        With this method, a profile can send some of their points to another profile.

        ---

        **API consumers:** <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>
      operationId: PointsTransfer
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              required:
                - pointsAmount
                - recipient
              properties:
                pointsAmount:
                  type: integer
                  description: How many points to send
                  minimum: 1
                recipient:
                  type: object
                  description: Identifier of the recipient
                  required:
                    - clientKey
                    - clientKeyValue
                  properties:
                    clientKey:
                      $ref: "#/components/schemas/promotions-clientKey"
                    clientKeyValue:
                      $ref: "#/components/schemas/promotions-clientKeyValue"
                    name:
                      $ref: "#/components/schemas/promotions-recipientName"
                sender:
                  type: object
                  description: Information about the sender
                  properties:
                    name:
                      $ref: "#/components/schemas/promotions-senderName"
                message:
                  type: string
                  description: A message that the recipient will receive with the points
                  maxLength: 256
      responses:
        "202":
          description: Point transfer scheduled
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Point transfer scheduled
        "400":
          $ref: "#/components/responses/promotions-InvalidDataErrorResponseV2"
        "404":
          $ref: "#/components/responses/promotions-ClientNotFoundErrorResponseV2"
        "422":
          description: Unprocessable point transfer
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: "#/components/schemas/promotions-ClientNotHaveRequiredPointsError"
                  - $ref: "#/components/schemas/promotions-ClientPointsSenderNotInSegmentError"
                  - $ref: "#/components/schemas/promotions-ClientPointsRecipientNotInSegmentError"
        "423":
          $ref: "#/components/responses/promotions-ClientPointsLockErrorResponseV2"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions-points/operation/PointsTransfer
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/v2/points/transfer \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"pointsAmount":1,"recipient":{"clientKey":"clientId","clientKeyValue":"434428563","name":"string"},"sender":{"name":"string"},"message":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"pointsAmount\":1,\"recipient\":{\"clientKey\":\"clientId\",\"clientKeyValue\":\"434428563\",\"name\":\"string\"},\"sender\":{\"name\":\"string\"},\"message\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/promotions/v2/points/transfer", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "pointsAmount": 1,
              "recipient": {
                "clientKey": "clientId",
                "clientKeyValue": "434428563",
                "name": "string"
              },
              "sender": {
                "name": "string"
              },
              "message": "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/v4/promotions/v2/points/transfer");
            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": "/v4/promotions/v2/points/transfer",
              "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({
              pointsAmount: 1,
              recipient: {clientKey: 'clientId', clientKeyValue: '434428563', name: 'string'},
              sender: {name: 'string'},
              message: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/v2/points/transfer');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"pointsAmount":1,"recipient":{"clientKey":"clientId","clientKeyValue":"434428563","name":"string"},"sender":{"name":"string"},"message":"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/v4/promotions/v2/points/transfer")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"pointsAmount\":1,\"recipient\":{\"clientKey\":\"clientId\",\"clientKeyValue\":\"434428563\",\"name\":\"string\"},\"sender\":{\"name\":\"string\"},\"message\":\"string\"}")
              .asString();
  /push-devices/web-push/clean-up/{clientId}:
    post:
      security:
        - JWT: []
      tags:
        - Profile devices
      operationId: cleanUpWebPushSubscriber
      summary: |
        Clean up web push tokens
      description: |
        Remove mobile push Firebase tokens from profile. You can use this endpoint to clean up tokens updated before a selected date or by service worker version. 

        Using this endpoint generates a `webpush.tokenDelete` event for each deleted token.

        If no tokens are left after the clean-up, the `has_webpush_devices` attribute in the profile is set to false.


        ---

        **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:** `PUSH_DEVICES_SERVICE_WEB_PUSH_DEVICES_DELETE`

        **User role permission required:** `client_detail: delete`
      parameters:
        - $ref: "#/components/parameters/push-devices-service-pathClientId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/push-devices-service-WebPushCleanupRequest"
        required: true
      responses:
        "200":
          description: Tokens deleted
        4xx:
          $ref: "#/components/responses/push-devices-service-4xx"
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-devices/operation/cleanUpWebPushSubscriber
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/push-devices/web-push/clean-up/%7BclientId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"type":"BY_UPDATED_BEFORE","updated":"2019-08-24T14:15:22Z"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"type\":\"BY_UPDATED_BEFORE\",\"updated\":\"2019-08-24T14:15:22Z\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/push-devices/web-push/clean-up/%7BclientId%7D", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "type": "BY_UPDATED_BEFORE",
              "updated": "2019-08-24T14:15:22Z"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/push-devices/web-push/clean-up/%7BclientId%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": "/push-devices/web-push/clean-up/%7BclientId%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: 'BY_UPDATED_BEFORE', updated: '2019-08-24T14:15:22Z'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/push-devices/web-push/clean-up/%7BclientId%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"type":"BY_UPDATED_BEFORE","updated":"2019-08-24T14:15:22Z"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/push-devices/web-push/clean-up/%7BclientId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"type\":\"BY_UPDATED_BEFORE\",\"updated\":\"2019-08-24T14:15:22Z\"}")
              .asString();
  /push-devices/mobile-push-subscriber/clean-up/{clientId}:
    post:
      security:
        - JWT: []
      tags:
        - Profile devices
      operationId: cleanUpMobilePushSubscriber
      summary: Clean up mobile push tokens
      description: |
        Remove mobile push Firebase tokens from profile. You can use this endpoint to clean up tokens updated before a selected date. 

        Using this endpoint generates a `push.tokenDelete` event for each deleted token.  

        If no tokens are left after the clean-up, the `has_mobile_push_devices` attribute in the profile is set to false.


        ---

        **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:** `PUSH_DEVICES_SERVICE_MOBILE_PUSH_DEVICES_DELETE`

        **User role permission required:** `client_detail: delete`
      parameters:
        - $ref: "#/components/parameters/push-devices-service-pathClientId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/push-devices-service-MobilePushCleanupRequest"
        required: true
      responses:
        "200":
          description: Tokens deleted
        4xx:
          $ref: "#/components/responses/push-devices-service-4xx"
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-devices/operation/cleanUpMobilePushSubscriber
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/push-devices/mobile-push-subscriber/clean-up/%7BclientId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"type":"BY_UPDATED_BEFORE","updated":"2019-08-24T14:15:22Z"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"type\":\"BY_UPDATED_BEFORE\",\"updated\":\"2019-08-24T14:15:22Z\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/push-devices/mobile-push-subscriber/clean-up/%7BclientId%7D", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "type": "BY_UPDATED_BEFORE",
              "updated": "2019-08-24T14:15:22Z"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/push-devices/mobile-push-subscriber/clean-up/%7BclientId%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": "/push-devices/mobile-push-subscriber/clean-up/%7BclientId%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: 'BY_UPDATED_BEFORE', updated: '2019-08-24T14:15:22Z'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/push-devices/mobile-push-subscriber/clean-up/%7BclientId%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"type":"BY_UPDATED_BEFORE","updated":"2019-08-24T14:15:22Z"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/push-devices/mobile-push-subscriber/clean-up/%7BclientId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"type\":\"BY_UPDATED_BEFORE\",\"updated\":\"2019-08-24T14:15:22Z\"}")
              .asString();
  /push-devices/clients/by-uuid/{identifierValue}/linked-devices:
    post:
      security:
        - JWT: []
      summary: Link a device by other parameters
      description: |2
         Assign a device to a profile UUID. A profile may have many devices assigned. If request is made by PROFILE or ANONYMOUS_PROFILE uuid is taken from jwt token.

        ---

        **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=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:** `API_BY_IDENTIFY_DEVICE_CLIENT_UPDATE`

        **User role permission required:** `client_info: update`
      operationId: LinkAClientDeviceByClientUuid
      parameters:
        - name: identifierType
          in: path
          required: true
          description: The profile identifier to use for the request
          schema:
            type: string
            enum:
              - by-customId
              - by-uuid
        - $ref: "#/components/parameters/push-devices-service-pathIdentifierValue"
        - $ref: "#/components/parameters/push-devices-service-acceptHeader"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/push-devices-service-LinkaClientdeviceRequest"
        required: true
      responses:
        "202":
          description: Request accepted
          headers: {}
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/push-devices-service-HTTP400"
              example:
                error: Bad Request
                status: 400
                timestamp: 2020-10-29T12:34:02.222Z
                path: /clients/by-uuid/779465fc-a0c5-41e5-9be2-51c00b2588b4/linked-devices
                message: Some fields did not pass validation
                errors:
                  - code: 12301
                    field: deviceId
                    message: "12301"
        "401":
          $ref: "#/components/responses/push-devices-service-401"
        "403":
          $ref: "#/components/responses/push-devices-service-403"
        "404":
          description: Profile not found
        "415":
          $ref: "#/components/responses/push-devices-service-415"
      deprecated: false
      tags:
        - Profile devices
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-devices/operation/LinkAClientDeviceByClientUuid
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/push-devices/clients/by-uuid/%7BidentifierValue%7D/linked-devices \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"deviceId":"string","registrationId":"string","type":"android","bluetoothAddress":"string","macAddress":"string","manufacturer":"string","model":"string","osVersion":"string","product":"a51ul_htc_europe","screenHeight":0,"screenWidth":0,"publicKey":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}"

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/push-devices/clients/by-uuid/%7BidentifierValue%7D/linked-devices", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "deviceId": "string",
              "registrationId": "string",
              "type": "android",
              "bluetoothAddress": "string",
              "macAddress": "string",
              "manufacturer": "string",
              "model": "string",
              "osVersion": "string",
              "product": "a51ul_htc_europe",
              "screenHeight": 0,
              "screenWidth": 0,
              "publicKey": "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/push-devices/clients/by-uuid/%7BidentifierValue%7D/linked-devices");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            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": "/push-devices/clients/by-uuid/%7BidentifierValue%7D/linked-devices",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "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({
              deviceId: 'string',
              registrationId: 'string',
              type: 'android',
              bluetoothAddress: 'string',
              macAddress: 'string',
              manufacturer: 'string',
              model: 'string',
              osVersion: 'string',
              product: 'a51ul_htc_europe',
              screenHeight: 0,
              screenWidth: 0,
              publicKey: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/push-devices/clients/by-uuid/%7BidentifierValue%7D/linked-devices');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"deviceId":"string","registrationId":"string","type":"android","bluetoothAddress":"string","macAddress":"string","manufacturer":"string","model":"string","osVersion":"string","product":"a51ul_htc_europe","screenHeight":0,"screenWidth":0,"publicKey":"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/push-devices/clients/by-uuid/%7BidentifierValue%7D/linked-devices")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}")
              .asString();
  /push-devices/clients/linked-devices:
    post:
      security:
        - JWT: []
      summary: Link a device by other parameters
      description: |2
         Assign a device to a profile UUID from JWT token. A profile may have many devices assigned.

        ---

        **API consumers:** <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>

        **User role permission required:** `client_info: update`
      operationId: LinkAClientDeviceByClientUuidFromJwtToken
      parameters:
        - name: identifierType
          in: path
          required: true
          description: The profile identifier to use for the request
          schema:
            type: string
            enum:
              - by-customId
              - by-uuid
        - $ref: "#/components/parameters/push-devices-service-pathIdentifierValue"
        - $ref: "#/components/parameters/push-devices-service-acceptHeader"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/push-devices-service-LinkaClientdeviceRequest"
        required: true
      responses:
        "202":
          description: Request accepted
          headers: {}
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/push-devices-service-HTTP400"
              example:
                error: Bad Request
                status: 400
                timestamp: 2020-10-29T12:34:02.222Z
                path: /clients/linked-devices
                message: Some fields did not pass validation
                errors:
                  - code: 12301
                    field: deviceId
                    message: "12301"
        "401":
          $ref: "#/components/responses/push-devices-service-401"
        "403":
          $ref: "#/components/responses/push-devices-service-403"
        "404":
          description: Profile not found
        "415":
          $ref: "#/components/responses/push-devices-service-415"
      deprecated: false
      tags:
        - Profile devices
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-devices/operation/LinkAClientDeviceByClientUuidFromJwtToken
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/push-devices/clients/linked-devices \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"deviceId":"string","registrationId":"string","type":"android","bluetoothAddress":"string","macAddress":"string","manufacturer":"string","model":"string","osVersion":"string","product":"a51ul_htc_europe","screenHeight":0,"screenWidth":0,"publicKey":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}"

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/push-devices/clients/linked-devices", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "deviceId": "string",
              "registrationId": "string",
              "type": "android",
              "bluetoothAddress": "string",
              "macAddress": "string",
              "manufacturer": "string",
              "model": "string",
              "osVersion": "string",
              "product": "a51ul_htc_europe",
              "screenHeight": 0,
              "screenWidth": 0,
              "publicKey": "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/push-devices/clients/linked-devices");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            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": "/push-devices/clients/linked-devices",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "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({
              deviceId: 'string',
              registrationId: 'string',
              type: 'android',
              bluetoothAddress: 'string',
              macAddress: 'string',
              manufacturer: 'string',
              model: 'string',
              osVersion: 'string',
              product: 'a51ul_htc_europe',
              screenHeight: 0,
              screenWidth: 0,
              publicKey: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/push-devices/clients/linked-devices');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"deviceId":"string","registrationId":"string","type":"android","bluetoothAddress":"string","macAddress":"string","manufacturer":"string","model":"string","osVersion":"string","product":"a51ul_htc_europe","screenHeight":0,"screenWidth":0,"publicKey":"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/push-devices/clients/linked-devices")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}")
              .asString();
  /search/v2/indices/{indexId}/rules:
    get:
      summary: Get rules
      description: |
        Retrieves a list of rules.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `QUERY_RULES_SEARCH_READ`

        **User role permission required:** `assets_search: read`
      operationId: GetRulesV2
      tags:
        - Query Rules
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/query-rules-v2-inPathIndexId"
        - $ref: "#/components/parameters/query-rules-v2-statusFilter"
        - $ref: "#/components/parameters/query-rules-v2-nameFilter"
        - $ref: "#/components/parameters/query-rules-v2-paginationPage"
        - $ref: "#/components/parameters/query-rules-v2-paginationLimit"
        - $ref: "#/components/parameters/query-rules-v2-paginationSortBy"
        - $ref: "#/components/parameters/query-rules-v2-paginationOrdering"
        - $ref: "#/components/parameters/query-rules-v2-paginationIncludeMeta"
        - $ref: "#/components/parameters/query-rules-v2-inQueryDirectoryId"
        - $ref: "#/components/parameters/query-rules-v2-InQuerySearch"
        - $ref: "#/components/parameters/query-rules-v2-consequenceTypeFilter"
      responses:
        "200":
          description: List of rules
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-PaginatedRules"
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Query-Rules/operation/GetRulesV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules?status=SOME_STRING_VALUE&name=SOME_STRING_VALUE&page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&search=SOME_STRING_VALUE&consequenceType=SOME_ARRAY_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/rules?status=SOME_STRING_VALUE&name=SOME_STRING_VALUE&page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&search=SOME_STRING_VALUE&consequenceType=SOME_ARRAY_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules?status=SOME_STRING_VALUE&name=SOME_STRING_VALUE&page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&search=SOME_STRING_VALUE&consequenceType=SOME_ARRAY_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/rules?status=SOME_STRING_VALUE&name=SOME_STRING_VALUE&page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&search=SOME_STRING_VALUE&consequenceType=SOME_ARRAY_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'status' => 'SOME_STRING_VALUE',
              'name' => 'SOME_STRING_VALUE',
              'page' => '4',
              'limit' => '100',
              'sortBy' => 'SOME_STRING_VALUE',
              'ordering' => 'SOME_STRING_VALUE',
              'includeMeta' => 'SOME_BOOLEAN_VALUE',
              'directoryId' => 'SOME_STRING_VALUE',
              'search' => 'SOME_STRING_VALUE',
              'consequenceType' => 'SOME_ARRAY_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules?status=SOME_STRING_VALUE&name=SOME_STRING_VALUE&page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&search=SOME_STRING_VALUE&consequenceType=SOME_ARRAY_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Create rule
      description: |
        Creates a new rule.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `QUERY_RULES_SEARCH_CREATE`

        **User role permission required:** `assets_search: create`
      operationId: PostRuleV2
      tags:
        - Query Rules
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/query-rules-v2-inPathIndexId"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  $ref: "#/components/schemas/query-rules-v2-RuleName"
                author:
                  $ref: "#/components/schemas/query-rules-v2-RuleAuthor"
                activeFrom:
                  $ref: "#/components/schemas/query-rules-v2-RuleActiveFromDatetime"
                activeTo:
                  $ref: "#/components/schemas/query-rules-v2-RuleActiveToDatetime"
                timezone:
                  $ref: "#/components/schemas/query-rules-v2-RuleTimezoneSchema"
                data:
                  $ref: "#/components/schemas/query-rules-v2-RuleDataSchema"
        description: Request for posting a new rule or updating an existing one
        required: true
      responses:
        "200":
          description: ID of the new rule
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-RuleWithStatus"
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Query-Rules/operation/PostRuleV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"string","author":0,"activeFrom":"string","activeTo":"string","timezone":"string","data":{"audience":{"segmentationIds":["34ab56cd-789be-22ee-11ab-123456789abc","12xy34z5-456b-33cc-7o52-987654321ece"]},"conditions":{"patterns":["phone","notebook","mouse {color} {brand}"],"matchingType":"is","contexts":["listing","web","mobile"],"filters":{"textFilters":{"color":{"values":["green","red"],"matchingType":"InUserFilters"}},"rangeFilters":{"price":{"ranges":[{"rightEnd":{"value":20,"inclusive":true}}],"matchingType":"Exact"}},"datetimeFilters":{"created":{"ranges":[{"rightEnd":{"value":"2024-01-01","inclusive":true}}],"matchingType":"Exact"}}}},"queryConsequences":[{"type":"removeWord","word":"string","replacement":"string"}],"postQueryConsequences":{"hideHits":["string"],"promoteHits":[{"id":"string","position":0}],"promoteHitsPositionStrategy":{"type":"custom"},"standardFilters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]},"elasticFilters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]},"boostFilters":[{"weight":-100,"filters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]}}],"topHitsFilters":[{"hitsNumber":1,"filters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]}}],"distinctFilter":{"attribute":"string","maxNumItems":0,"categoryLevelModifier":0},"sortBy":{"attribute":"string","ordering":"desc"},"customData":"{\"customLandingPage\": \"https://synerise.com/\"}","returnNoData":false,"pinFacets":[{"attribute":"size","position":1},{"attribute":"width","position":2},{"attribute":"gift_wrap"}],"hideFacets":["material","fabric","sleeve_length"]}}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"name\":\"string\",\"author\":0,\"activeFrom\":\"string\",\"activeTo\":\"string\",\"timezone\":\"string\",\"data\":{\"audience\":{\"segmentationIds\":[\"34ab56cd-789be-22ee-11ab-123456789abc\",\"12xy34z5-456b-33cc-7o52-987654321ece\"]},\"conditions\":{\"patterns\":[\"phone\",\"notebook\",\"mouse {color} {brand}\"],\"matchingType\":\"is\",\"contexts\":[\"listing\",\"web\",\"mobile\"],\"filters\":{\"textFilters\":{\"color\":{\"values\":[\"green\",\"red\"],\"matchingType\":\"InUserFilters\"}},\"rangeFilters\":{\"price\":{\"ranges\":[{\"rightEnd\":{\"value\":20,\"inclusive\":true}}],\"matchingType\":\"Exact\"}},\"datetimeFilters\":{\"created\":{\"ranges\":[{\"rightEnd\":{\"value\":\"2024-01-01\",\"inclusive\":true}}],\"matchingType\":\"Exact\"}}}},\"queryConsequences\":[{\"type\":\"removeWord\",\"word\":\"string\",\"replacement\":\"string\"}],\"postQueryConsequences\":{\"hideHits\":[\"string\"],\"promoteHits\":[{\"id\":\"string\",\"position\":0}],\"promoteHitsPositionStrategy\":{\"type\":\"custom\"},\"standardFilters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]},\"elasticFilters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]},\"boostFilters\":[{\"weight\":-100,\"filters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]}}],\"topHitsFilters\":[{\"hitsNumber\":1,\"filters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]}}],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":0,\"categoryLevelModifier\":0},\"sortBy\":{\"attribute\":\"string\",\"ordering\":\"desc\"},\"customData\":\"{\\\"customLandingPage\\\": \\\"https://synerise.com/\\\"}\",\"returnNoData\":false,\"pinFacets\":[{\"attribute\":\"size\",\"position\":1},{\"attribute\":\"width\",\"position\":2},{\"attribute\":\"gift_wrap\"}],\"hideFacets\":[\"material\",\"fabric\",\"sleeve_length\"]}}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/rules", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "name": "string",
              "author": 0,
              "activeFrom": "string",
              "activeTo": "string",
              "timezone": "string",
              "data": {
                "audience": {
                  "segmentationIds": [
                    "34ab56cd-789be-22ee-11ab-123456789abc",
                    "12xy34z5-456b-33cc-7o52-987654321ece"
                  ]
                },
                "conditions": {
                  "patterns": [
                    "phone",
                    "notebook",
                    "mouse {color} {brand}"
                  ],
                  "matchingType": "is",
                  "contexts": [
                    "listing",
                    "web",
                    "mobile"
                  ],
                  "filters": {
                    "textFilters": {
                      "color": {
                        "values": [
                          "green",
                          "red"
                        ],
                        "matchingType": "InUserFilters"
                      }
                    },
                    "rangeFilters": {
                      "price": {
                        "ranges": [
                          {
                            "rightEnd": {
                              "value": 20,
                              "inclusive": true
                            }
                          }
                        ],
                        "matchingType": "Exact"
                      }
                    },
                    "datetimeFilters": {
                      "created": {
                        "ranges": [
                          {
                            "rightEnd": {
                              "value": "2024-01-01",
                              "inclusive": true
                            }
                          }
                        ],
                        "matchingType": "Exact"
                      }
                    }
                  }
                },
                "queryConsequences": [
                  {
                    "type": "removeWord",
                    "word": "string",
                    "replacement": "string"
                  }
                ],
                "postQueryConsequences": {
                  "hideHits": [
                    "string"
                  ],
                  "promoteHits": [
                    {
                      "id": "string",
                      "position": 0
                    }
                  ],
                  "promoteHitsPositionStrategy": {
                    "type": "custom"
                  },
                  "standardFilters": {
                    "textFilters": [
                      {
                        "attribute": "brand",
                        "mode": "include",
                        "values": [
                          "A-Brand",
                          "B-Brand",
                          "{brand}"
                        ]
                      }
                    ],
                    "rangeFilters": [
                      {
                        "attribute": "price",
                        "operator": "gt",
                        "value": "{price}"
                      }
                    ],
                    "datetimeFilters": [
                      {
                        "attribute": "created",
                        "operator": "gt",
                        "value": "{created}"
                      }
                    ]
                  },
                  "elasticFilters": {
                    "textFilters": [
                      {
                        "attribute": "brand",
                        "mode": "include",
                        "values": [
                          "A-Brand",
                          "B-Brand",
                          "{brand}"
                        ]
                      }
                    ],
                    "rangeFilters": [
                      {
                        "attribute": "price",
                        "operator": "gt",
                        "value": "{price}"
                      }
                    ],
                    "datetimeFilters": [
                      {
                        "attribute": "created",
                        "operator": "gt",
                        "value": "{created}"
                      }
                    ]
                  },
                  "boostFilters": [
                    {
                      "weight": -100,
                      "filters": {
                        "textFilters": [
                          {
                            "attribute": "brand",
                            "mode": "include",
                            "values": [
                              "A-Brand",
                              "B-Brand",
                              "{brand}"
                            ]
                          }
                        ],
                        "rangeFilters": [
                          {
                            "attribute": "price",
                            "operator": "gt",
                            "value": "{price}"
                          }
                        ],
                        "datetimeFilters": [
                          {
                            "attribute": "created",
                            "operator": "gt",
                            "value": "{created}"
                          }
                        ]
                      }
                    }
                  ],
                  "topHitsFilters": [
                    {
                      "hitsNumber": 1,
                      "filters": {
                        "textFilters": [
                          {
                            "attribute": "brand",
                            "mode": "include",
                            "values": [
                              "A-Brand",
                              "B-Brand",
                              "{brand}"
                            ]
                          }
                        ],
                        "rangeFilters": [
                          {
                            "attribute": "price",
                            "operator": "gt",
                            "value": "{price}"
                          }
                        ],
                        "datetimeFilters": [
                          {
                            "attribute": "created",
                            "operator": "gt",
                            "value": "{created}"
                          }
                        ]
                      }
                    }
                  ],
                  "distinctFilter": {
                    "attribute": "string",
                    "maxNumItems": 0,
                    "categoryLevelModifier": 0
                  },
                  "sortBy": {
                    "attribute": "string",
                    "ordering": "desc"
                  },
                  "customData": "{\"customLandingPage\": \"https://synerise.com/\"}",
                  "returnNoData": false,
                  "pinFacets": [
                    {
                      "attribute": "size",
                      "position": 1
                    },
                    {
                      "attribute": "width",
                      "position": 2
                    },
                    {
                      "attribute": "gift_wrap"
                    }
                  ],
                  "hideFacets": [
                    "material",
                    "fabric",
                    "sleeve_length"
                  ]
                }
              }
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/rules",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              name: 'string',
              author: 0,
              activeFrom: 'string',
              activeTo: 'string',
              timezone: 'string',
              data: {
                audience: {
                  segmentationIds: [
                    '34ab56cd-789be-22ee-11ab-123456789abc',
                    '12xy34z5-456b-33cc-7o52-987654321ece'
                  ]
                },
                conditions: {
                  patterns: ['phone', 'notebook', 'mouse {color} {brand}'],
                  matchingType: 'is',
                  contexts: ['listing', 'web', 'mobile'],
                  filters: {
                    textFilters: {color: {values: ['green', 'red'], matchingType: 'InUserFilters'}},
                    rangeFilters: {
                      price: {ranges: [{rightEnd: {value: 20, inclusive: true}}], matchingType: 'Exact'}
                    },
                    datetimeFilters: {
                      created: {
                        ranges: [{rightEnd: {value: '2024-01-01', inclusive: true}}],
                        matchingType: 'Exact'
                      }
                    }
                  }
                },
                queryConsequences: [{type: 'removeWord', word: 'string', replacement: 'string'}],
                postQueryConsequences: {
                  hideHits: ['string'],
                  promoteHits: [{id: 'string', position: 0}],
                  promoteHitsPositionStrategy: {type: 'custom'},
                  standardFilters: {
                    textFilters: [
                      {attribute: 'brand', mode: 'include', values: ['A-Brand', 'B-Brand', '{brand}']}
                    ],
                    rangeFilters: [{attribute: 'price', operator: 'gt', value: '{price}'}],
                    datetimeFilters: [{attribute: 'created', operator: 'gt', value: '{created}'}]
                  },
                  elasticFilters: {
                    textFilters: [
                      {attribute: 'brand', mode: 'include', values: ['A-Brand', 'B-Brand', '{brand}']}
                    ],
                    rangeFilters: [{attribute: 'price', operator: 'gt', value: '{price}'}],
                    datetimeFilters: [{attribute: 'created', operator: 'gt', value: '{created}'}]
                  },
                  boostFilters: [
                    {
                      weight: -100,
                      filters: {
                        textFilters: [
                          {attribute: 'brand', mode: 'include', values: ['A-Brand', 'B-Brand', '{brand}']}
                        ],
                        rangeFilters: [{attribute: 'price', operator: 'gt', value: '{price}'}],
                        datetimeFilters: [{attribute: 'created', operator: 'gt', value: '{created}'}]
                      }
                    }
                  ],
                  topHitsFilters: [
                    {
                      hitsNumber: 1,
                      filters: {
                        textFilters: [
                          {attribute: 'brand', mode: 'include', values: ['A-Brand', 'B-Brand', '{brand}']}
                        ],
                        rangeFilters: [{attribute: 'price', operator: 'gt', value: '{price}'}],
                        datetimeFilters: [{attribute: 'created', operator: 'gt', value: '{created}'}]
                      }
                    }
                  ],
                  distinctFilter: {attribute: 'string', maxNumItems: 0, categoryLevelModifier: 0},
                  sortBy: {attribute: 'string', ordering: 'desc'},
                  customData: '{"customLandingPage": "https://synerise.com/"}',
                  returnNoData: false,
                  pinFacets: [
                    {attribute: 'size', position: 1},
                    {attribute: 'width', position: 2},
                    {attribute: 'gift_wrap'}
                  ],
                  hideFacets: ['material', 'fabric', 'sleeve_length']
                }
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"name":"string","author":0,"activeFrom":"string","activeTo":"string","timezone":"string","data":{"audience":{"segmentationIds":["34ab56cd-789be-22ee-11ab-123456789abc","12xy34z5-456b-33cc-7o52-987654321ece"]},"conditions":{"patterns":["phone","notebook","mouse {color} {brand}"],"matchingType":"is","contexts":["listing","web","mobile"],"filters":{"textFilters":{"color":{"values":["green","red"],"matchingType":"InUserFilters"}},"rangeFilters":{"price":{"ranges":[{"rightEnd":{"value":20,"inclusive":true}}],"matchingType":"Exact"}},"datetimeFilters":{"created":{"ranges":[{"rightEnd":{"value":"2024-01-01","inclusive":true}}],"matchingType":"Exact"}}}},"queryConsequences":[{"type":"removeWord","word":"string","replacement":"string"}],"postQueryConsequences":{"hideHits":["string"],"promoteHits":[{"id":"string","position":0}],"promoteHitsPositionStrategy":{"type":"custom"},"standardFilters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]},"elasticFilters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]},"boostFilters":[{"weight":-100,"filters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]}}],"topHitsFilters":[{"hitsNumber":1,"filters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]}}],"distinctFilter":{"attribute":"string","maxNumItems":0,"categoryLevelModifier":0},"sortBy":{"attribute":"string","ordering":"desc"},"customData":"{\\"customLandingPage\\": \\"https://synerise.com/\\"}","returnNoData":false,"pinFacets":[{"attribute":"size","position":1},{"attribute":"width","position":2},{"attribute":"gift_wrap"}],"hideFacets":["material","fabric","sleeve_length"]}}}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\",\"author\":0,\"activeFrom\":\"string\",\"activeTo\":\"string\",\"timezone\":\"string\",\"data\":{\"audience\":{\"segmentationIds\":[\"34ab56cd-789be-22ee-11ab-123456789abc\",\"12xy34z5-456b-33cc-7o52-987654321ece\"]},\"conditions\":{\"patterns\":[\"phone\",\"notebook\",\"mouse {color} {brand}\"],\"matchingType\":\"is\",\"contexts\":[\"listing\",\"web\",\"mobile\"],\"filters\":{\"textFilters\":{\"color\":{\"values\":[\"green\",\"red\"],\"matchingType\":\"InUserFilters\"}},\"rangeFilters\":{\"price\":{\"ranges\":[{\"rightEnd\":{\"value\":20,\"inclusive\":true}}],\"matchingType\":\"Exact\"}},\"datetimeFilters\":{\"created\":{\"ranges\":[{\"rightEnd\":{\"value\":\"2024-01-01\",\"inclusive\":true}}],\"matchingType\":\"Exact\"}}}},\"queryConsequences\":[{\"type\":\"removeWord\",\"word\":\"string\",\"replacement\":\"string\"}],\"postQueryConsequences\":{\"hideHits\":[\"string\"],\"promoteHits\":[{\"id\":\"string\",\"position\":0}],\"promoteHitsPositionStrategy\":{\"type\":\"custom\"},\"standardFilters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]},\"elasticFilters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]},\"boostFilters\":[{\"weight\":-100,\"filters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]}}],\"topHitsFilters\":[{\"hitsNumber\":1,\"filters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]}}],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":0,\"categoryLevelModifier\":0},\"sortBy\":{\"attribute\":\"string\",\"ordering\":\"desc\"},\"customData\":\"{\\\"customLandingPage\\\": \\\"https://synerise.com/\\\"}\",\"returnNoData\":false,\"pinFacets\":[{\"attribute\":\"size\",\"position\":1},{\"attribute\":\"width\",\"position\":2},{\"attribute\":\"gift_wrap\"}],\"hideFacets\":[\"material\",\"fabric\",\"sleeve_length\"]}}}")
              .asString();
  /search/v2/indices/{indexId}/rules/{ruleId}:
    get:
      summary: Get rule
      description: |
        Retrieves a rule.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `QUERY_RULES_SEARCH_CREATE`

        **User role permission required:** `assets_search: create`
      operationId: GetRuleV2
      tags:
        - Query Rules
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/query-rules-v2-inPathIndexId"
        - $ref: "#/components/parameters/query-rules-v2-inPathRuleId"
      responses:
        "200":
          description: Query rule returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-RuleWithStatus"
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Query-Rules/operation/GetRuleV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    put:
      summary: Update query rule
      description: |
        Updates a rule identified by `id`.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `QUERY_RULES_SEARCH_UPDATE`

        **User role permission required:** `assets_search: update`
      operationId: PutRuleV2
      tags:
        - Query Rules
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/query-rules-v2-inPathIndexId"
        - $ref: "#/components/parameters/query-rules-v2-inPathRuleId"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  $ref: "#/components/schemas/query-rules-v2-RuleName"
                author:
                  $ref: "#/components/schemas/query-rules-v2-RuleAuthor"
                activeFrom:
                  $ref: "#/components/schemas/query-rules-v2-RuleActiveFromDatetime"
                activeTo:
                  $ref: "#/components/schemas/query-rules-v2-RuleActiveToDatetime"
                timezone:
                  $ref: "#/components/schemas/query-rules-v2-RuleTimezoneSchema"
                data:
                  $ref: "#/components/schemas/query-rules-v2-RuleDataSchema"
        description: Request for posting a new rule or updating an existing one
        required: true
      responses:
        "200":
          description: Query rule updated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-RuleWithStatus"
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Query-Rules/operation/PutRuleV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"string","author":0,"activeFrom":"string","activeTo":"string","timezone":"string","data":{"audience":{"segmentationIds":["34ab56cd-789be-22ee-11ab-123456789abc","12xy34z5-456b-33cc-7o52-987654321ece"]},"conditions":{"patterns":["phone","notebook","mouse {color} {brand}"],"matchingType":"is","contexts":["listing","web","mobile"],"filters":{"textFilters":{"color":{"values":["green","red"],"matchingType":"InUserFilters"}},"rangeFilters":{"price":{"ranges":[{"rightEnd":{"value":20,"inclusive":true}}],"matchingType":"Exact"}},"datetimeFilters":{"created":{"ranges":[{"rightEnd":{"value":"2024-01-01","inclusive":true}}],"matchingType":"Exact"}}}},"queryConsequences":[{"type":"removeWord","word":"string","replacement":"string"}],"postQueryConsequences":{"hideHits":["string"],"promoteHits":[{"id":"string","position":0}],"promoteHitsPositionStrategy":{"type":"custom"},"standardFilters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]},"elasticFilters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]},"boostFilters":[{"weight":-100,"filters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]}}],"topHitsFilters":[{"hitsNumber":1,"filters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]}}],"distinctFilter":{"attribute":"string","maxNumItems":0,"categoryLevelModifier":0},"sortBy":{"attribute":"string","ordering":"desc"},"customData":"{\"customLandingPage\": \"https://synerise.com/\"}","returnNoData":false,"pinFacets":[{"attribute":"size","position":1},{"attribute":"width","position":2},{"attribute":"gift_wrap"}],"hideFacets":["material","fabric","sleeve_length"]}}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"name\":\"string\",\"author\":0,\"activeFrom\":\"string\",\"activeTo\":\"string\",\"timezone\":\"string\",\"data\":{\"audience\":{\"segmentationIds\":[\"34ab56cd-789be-22ee-11ab-123456789abc\",\"12xy34z5-456b-33cc-7o52-987654321ece\"]},\"conditions\":{\"patterns\":[\"phone\",\"notebook\",\"mouse {color} {brand}\"],\"matchingType\":\"is\",\"contexts\":[\"listing\",\"web\",\"mobile\"],\"filters\":{\"textFilters\":{\"color\":{\"values\":[\"green\",\"red\"],\"matchingType\":\"InUserFilters\"}},\"rangeFilters\":{\"price\":{\"ranges\":[{\"rightEnd\":{\"value\":20,\"inclusive\":true}}],\"matchingType\":\"Exact\"}},\"datetimeFilters\":{\"created\":{\"ranges\":[{\"rightEnd\":{\"value\":\"2024-01-01\",\"inclusive\":true}}],\"matchingType\":\"Exact\"}}}},\"queryConsequences\":[{\"type\":\"removeWord\",\"word\":\"string\",\"replacement\":\"string\"}],\"postQueryConsequences\":{\"hideHits\":[\"string\"],\"promoteHits\":[{\"id\":\"string\",\"position\":0}],\"promoteHitsPositionStrategy\":{\"type\":\"custom\"},\"standardFilters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]},\"elasticFilters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]},\"boostFilters\":[{\"weight\":-100,\"filters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]}}],\"topHitsFilters\":[{\"hitsNumber\":1,\"filters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]}}],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":0,\"categoryLevelModifier\":0},\"sortBy\":{\"attribute\":\"string\",\"ordering\":\"desc\"},\"customData\":\"{\\\"customLandingPage\\\": \\\"https://synerise.com/\\\"}\",\"returnNoData\":false,\"pinFacets\":[{\"attribute\":\"size\",\"position\":1},{\"attribute\":\"width\",\"position\":2},{\"attribute\":\"gift_wrap\"}],\"hideFacets\":[\"material\",\"fabric\",\"sleeve_length\"]}}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("PUT", "/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "name": "string",
              "author": 0,
              "activeFrom": "string",
              "activeTo": "string",
              "timezone": "string",
              "data": {
                "audience": {
                  "segmentationIds": [
                    "34ab56cd-789be-22ee-11ab-123456789abc",
                    "12xy34z5-456b-33cc-7o52-987654321ece"
                  ]
                },
                "conditions": {
                  "patterns": [
                    "phone",
                    "notebook",
                    "mouse {color} {brand}"
                  ],
                  "matchingType": "is",
                  "contexts": [
                    "listing",
                    "web",
                    "mobile"
                  ],
                  "filters": {
                    "textFilters": {
                      "color": {
                        "values": [
                          "green",
                          "red"
                        ],
                        "matchingType": "InUserFilters"
                      }
                    },
                    "rangeFilters": {
                      "price": {
                        "ranges": [
                          {
                            "rightEnd": {
                              "value": 20,
                              "inclusive": true
                            }
                          }
                        ],
                        "matchingType": "Exact"
                      }
                    },
                    "datetimeFilters": {
                      "created": {
                        "ranges": [
                          {
                            "rightEnd": {
                              "value": "2024-01-01",
                              "inclusive": true
                            }
                          }
                        ],
                        "matchingType": "Exact"
                      }
                    }
                  }
                },
                "queryConsequences": [
                  {
                    "type": "removeWord",
                    "word": "string",
                    "replacement": "string"
                  }
                ],
                "postQueryConsequences": {
                  "hideHits": [
                    "string"
                  ],
                  "promoteHits": [
                    {
                      "id": "string",
                      "position": 0
                    }
                  ],
                  "promoteHitsPositionStrategy": {
                    "type": "custom"
                  },
                  "standardFilters": {
                    "textFilters": [
                      {
                        "attribute": "brand",
                        "mode": "include",
                        "values": [
                          "A-Brand",
                          "B-Brand",
                          "{brand}"
                        ]
                      }
                    ],
                    "rangeFilters": [
                      {
                        "attribute": "price",
                        "operator": "gt",
                        "value": "{price}"
                      }
                    ],
                    "datetimeFilters": [
                      {
                        "attribute": "created",
                        "operator": "gt",
                        "value": "{created}"
                      }
                    ]
                  },
                  "elasticFilters": {
                    "textFilters": [
                      {
                        "attribute": "brand",
                        "mode": "include",
                        "values": [
                          "A-Brand",
                          "B-Brand",
                          "{brand}"
                        ]
                      }
                    ],
                    "rangeFilters": [
                      {
                        "attribute": "price",
                        "operator": "gt",
                        "value": "{price}"
                      }
                    ],
                    "datetimeFilters": [
                      {
                        "attribute": "created",
                        "operator": "gt",
                        "value": "{created}"
                      }
                    ]
                  },
                  "boostFilters": [
                    {
                      "weight": -100,
                      "filters": {
                        "textFilters": [
                          {
                            "attribute": "brand",
                            "mode": "include",
                            "values": [
                              "A-Brand",
                              "B-Brand",
                              "{brand}"
                            ]
                          }
                        ],
                        "rangeFilters": [
                          {
                            "attribute": "price",
                            "operator": "gt",
                            "value": "{price}"
                          }
                        ],
                        "datetimeFilters": [
                          {
                            "attribute": "created",
                            "operator": "gt",
                            "value": "{created}"
                          }
                        ]
                      }
                    }
                  ],
                  "topHitsFilters": [
                    {
                      "hitsNumber": 1,
                      "filters": {
                        "textFilters": [
                          {
                            "attribute": "brand",
                            "mode": "include",
                            "values": [
                              "A-Brand",
                              "B-Brand",
                              "{brand}"
                            ]
                          }
                        ],
                        "rangeFilters": [
                          {
                            "attribute": "price",
                            "operator": "gt",
                            "value": "{price}"
                          }
                        ],
                        "datetimeFilters": [
                          {
                            "attribute": "created",
                            "operator": "gt",
                            "value": "{created}"
                          }
                        ]
                      }
                    }
                  ],
                  "distinctFilter": {
                    "attribute": "string",
                    "maxNumItems": 0,
                    "categoryLevelModifier": 0
                  },
                  "sortBy": {
                    "attribute": "string",
                    "ordering": "desc"
                  },
                  "customData": "{\"customLandingPage\": \"https://synerise.com/\"}",
                  "returnNoData": false,
                  "pinFacets": [
                    {
                      "attribute": "size",
                      "position": 1
                    },
                    {
                      "attribute": "width",
                      "position": 2
                    },
                    {
                      "attribute": "gift_wrap"
                    }
                  ],
                  "hideFacets": [
                    "material",
                    "fabric",
                    "sleeve_length"
                  ]
                }
              }
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("PUT", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              name: 'string',
              author: 0,
              activeFrom: 'string',
              activeTo: 'string',
              timezone: 'string',
              data: {
                audience: {
                  segmentationIds: [
                    '34ab56cd-789be-22ee-11ab-123456789abc',
                    '12xy34z5-456b-33cc-7o52-987654321ece'
                  ]
                },
                conditions: {
                  patterns: ['phone', 'notebook', 'mouse {color} {brand}'],
                  matchingType: 'is',
                  contexts: ['listing', 'web', 'mobile'],
                  filters: {
                    textFilters: {color: {values: ['green', 'red'], matchingType: 'InUserFilters'}},
                    rangeFilters: {
                      price: {ranges: [{rightEnd: {value: 20, inclusive: true}}], matchingType: 'Exact'}
                    },
                    datetimeFilters: {
                      created: {
                        ranges: [{rightEnd: {value: '2024-01-01', inclusive: true}}],
                        matchingType: 'Exact'
                      }
                    }
                  }
                },
                queryConsequences: [{type: 'removeWord', word: 'string', replacement: 'string'}],
                postQueryConsequences: {
                  hideHits: ['string'],
                  promoteHits: [{id: 'string', position: 0}],
                  promoteHitsPositionStrategy: {type: 'custom'},
                  standardFilters: {
                    textFilters: [
                      {attribute: 'brand', mode: 'include', values: ['A-Brand', 'B-Brand', '{brand}']}
                    ],
                    rangeFilters: [{attribute: 'price', operator: 'gt', value: '{price}'}],
                    datetimeFilters: [{attribute: 'created', operator: 'gt', value: '{created}'}]
                  },
                  elasticFilters: {
                    textFilters: [
                      {attribute: 'brand', mode: 'include', values: ['A-Brand', 'B-Brand', '{brand}']}
                    ],
                    rangeFilters: [{attribute: 'price', operator: 'gt', value: '{price}'}],
                    datetimeFilters: [{attribute: 'created', operator: 'gt', value: '{created}'}]
                  },
                  boostFilters: [
                    {
                      weight: -100,
                      filters: {
                        textFilters: [
                          {attribute: 'brand', mode: 'include', values: ['A-Brand', 'B-Brand', '{brand}']}
                        ],
                        rangeFilters: [{attribute: 'price', operator: 'gt', value: '{price}'}],
                        datetimeFilters: [{attribute: 'created', operator: 'gt', value: '{created}'}]
                      }
                    }
                  ],
                  topHitsFilters: [
                    {
                      hitsNumber: 1,
                      filters: {
                        textFilters: [
                          {attribute: 'brand', mode: 'include', values: ['A-Brand', 'B-Brand', '{brand}']}
                        ],
                        rangeFilters: [{attribute: 'price', operator: 'gt', value: '{price}'}],
                        datetimeFilters: [{attribute: 'created', operator: 'gt', value: '{created}'}]
                      }
                    }
                  ],
                  distinctFilter: {attribute: 'string', maxNumItems: 0, categoryLevelModifier: 0},
                  sortBy: {attribute: 'string', ordering: 'desc'},
                  customData: '{"customLandingPage": "https://synerise.com/"}',
                  returnNoData: false,
                  pinFacets: [
                    {attribute: 'size', position: 1},
                    {attribute: 'width', position: 2},
                    {attribute: 'gift_wrap'}
                  ],
                  hideFacets: ['material', 'fabric', 'sleeve_length']
                }
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"name":"string","author":0,"activeFrom":"string","activeTo":"string","timezone":"string","data":{"audience":{"segmentationIds":["34ab56cd-789be-22ee-11ab-123456789abc","12xy34z5-456b-33cc-7o52-987654321ece"]},"conditions":{"patterns":["phone","notebook","mouse {color} {brand}"],"matchingType":"is","contexts":["listing","web","mobile"],"filters":{"textFilters":{"color":{"values":["green","red"],"matchingType":"InUserFilters"}},"rangeFilters":{"price":{"ranges":[{"rightEnd":{"value":20,"inclusive":true}}],"matchingType":"Exact"}},"datetimeFilters":{"created":{"ranges":[{"rightEnd":{"value":"2024-01-01","inclusive":true}}],"matchingType":"Exact"}}}},"queryConsequences":[{"type":"removeWord","word":"string","replacement":"string"}],"postQueryConsequences":{"hideHits":["string"],"promoteHits":[{"id":"string","position":0}],"promoteHitsPositionStrategy":{"type":"custom"},"standardFilters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]},"elasticFilters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]},"boostFilters":[{"weight":-100,"filters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]}}],"topHitsFilters":[{"hitsNumber":1,"filters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]}}],"distinctFilter":{"attribute":"string","maxNumItems":0,"categoryLevelModifier":0},"sortBy":{"attribute":"string","ordering":"desc"},"customData":"{\\"customLandingPage\\": \\"https://synerise.com/\\"}","returnNoData":false,"pinFacets":[{"attribute":"size","position":1},{"attribute":"width","position":2},{"attribute":"gift_wrap"}],"hideFacets":["material","fabric","sleeve_length"]}}}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.put("https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\",\"author\":0,\"activeFrom\":\"string\",\"activeTo\":\"string\",\"timezone\":\"string\",\"data\":{\"audience\":{\"segmentationIds\":[\"34ab56cd-789be-22ee-11ab-123456789abc\",\"12xy34z5-456b-33cc-7o52-987654321ece\"]},\"conditions\":{\"patterns\":[\"phone\",\"notebook\",\"mouse {color} {brand}\"],\"matchingType\":\"is\",\"contexts\":[\"listing\",\"web\",\"mobile\"],\"filters\":{\"textFilters\":{\"color\":{\"values\":[\"green\",\"red\"],\"matchingType\":\"InUserFilters\"}},\"rangeFilters\":{\"price\":{\"ranges\":[{\"rightEnd\":{\"value\":20,\"inclusive\":true}}],\"matchingType\":\"Exact\"}},\"datetimeFilters\":{\"created\":{\"ranges\":[{\"rightEnd\":{\"value\":\"2024-01-01\",\"inclusive\":true}}],\"matchingType\":\"Exact\"}}}},\"queryConsequences\":[{\"type\":\"removeWord\",\"word\":\"string\",\"replacement\":\"string\"}],\"postQueryConsequences\":{\"hideHits\":[\"string\"],\"promoteHits\":[{\"id\":\"string\",\"position\":0}],\"promoteHitsPositionStrategy\":{\"type\":\"custom\"},\"standardFilters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]},\"elasticFilters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]},\"boostFilters\":[{\"weight\":-100,\"filters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]}}],\"topHitsFilters\":[{\"hitsNumber\":1,\"filters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]}}],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":0,\"categoryLevelModifier\":0},\"sortBy\":{\"attribute\":\"string\",\"ordering\":\"desc\"},\"customData\":\"{\\\"customLandingPage\\\": \\\"https://synerise.com/\\\"}\",\"returnNoData\":false,\"pinFacets\":[{\"attribute\":\"size\",\"position\":1},{\"attribute\":\"width\",\"position\":2},{\"attribute\":\"gift_wrap\"}],\"hideFacets\":[\"material\",\"fabric\",\"sleeve_length\"]}}}")
              .asString();
    delete:
      summary: Delete rule
      description: |
        Deletes a rule identified by `id`.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `QUERY_RULES_SEARCH_DELETE`

        **User role permission required:** `assets_search: delete`
      operationId: DeleteRuleV2
      tags:
        - Query Rules
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/query-rules-v2-inPathIndexId"
        - $ref: "#/components/parameters/query-rules-v2-inPathRuleId"
      responses:
        "204":
          description: Query rule deleted
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Query-Rules/operation/DeleteRuleV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("DELETE", "/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("DELETE", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/indices/{indexId}/rules/{ruleId}/activate:
    post:
      summary: Activate rule
      description: |
        Activates a rule identified by `id`.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `QUERY_RULES_SEARCH_UPDATE`

        **User role permission required:** `assets_search: update`
      operationId: ActivateRuleV2
      tags:
        - Query Rules
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/query-rules-v2-inPathIndexId"
        - $ref: "#/components/parameters/query-rules-v2-inPathRuleId"
      responses:
        "204":
          description: Query rule activated
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Query-Rules/operation/ActivateRuleV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/activate \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/activate", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/activate");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/activate",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/activate');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/activate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/indices/{indexId}/rules/{ruleId}/pause:
    post:
      summary: Pause rule
      description: |
        Pauses a rule identified by `id`.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `QUERY_RULES_SEARCH_UPDATE`

        **User role permission required:** `assets_search: update`
      operationId: PauseRuleV2
      tags:
        - Query Rules
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/query-rules-v2-inPathIndexId"
        - $ref: "#/components/parameters/query-rules-v2-inPathRuleId"
      responses:
        "204":
          description: Query rule paused
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Query-Rules/operation/PauseRuleV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/pause \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/pause", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/pause");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/pause",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/pause');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/pause")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/indices/{indexId}/rules/{ruleId}/draft:
    post:
      summary: Draft rule
      description: |
        Marks a rule as draft.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `QUERY_RULES_SEARCH_UPDATE`

        **User role permission required:** `assets_search: update`
      operationId: DraftRuleV2
      tags:
        - Query Rules
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/query-rules-v2-inPathIndexId"
        - $ref: "#/components/parameters/query-rules-v2-inPathRuleId"
      responses:
        "204":
          description: Query rule marked as draft
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Query-Rules/operation/DraftRuleV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/draft \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/draft", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/draft");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/draft",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/draft');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/draft")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/indices/{indexId}/rules/{ruleId}/finish:
    post:
      summary: Finish rule
      description: |
        Marks a rule as finished. The rule becomes inactive and can never be activated again.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `QUERY_RULES_SEARCH_UPDATE`

        **User role permission required:** `assets_search: update`
      operationId: FinishRuleV2
      tags:
        - Query Rules
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/query-rules-v2-inPathIndexId"
        - $ref: "#/components/parameters/query-rules-v2-inPathRuleId"
      responses:
        "204":
          description: Query rule marked as finished
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Query-Rules/operation/FinishRuleV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/finish \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/finish", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/finish");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/finish",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/finish');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/finish")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /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}:
    parameters:
      - $ref: "#/components/parameters/recommendation-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();
  /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();
  /sauth/auth/login/client:
    post:
      tags:
        - Authorization (deprecated)
      summary: Authenticate as Profile
      description: |
        Obtain a new Profile JWT Token.

        ---

        **Authentication:** Not required
      operationId: LogInAsClient
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-LogInAsClientRequestBody"
            example:
              apiKey: 5AEAA3D5-E147-C7EB-invalid50109A3D1
              email: testDoc@example.com
              password: testPass1!
              uuid: b3f56868-9667-4843-a8e5-0509456baa9b
        required: true
      responses:
        "200":
          description: Profile authorization token
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-JWTtoken"
              example:
                token: eyJhbGciOiJSUzUxMiJ9.eyJzdinvalidwYmZkM2FkNDg2ZjQ3ZGRiMjE5MSIsImF1ZCI6IkFQSSIsInJsbSI6ImFub255bW91c19jbGllbnQiLCJjdGQiOjE1NTMwMDQxNTkxNTEsImVtbCI6IjYyMjM3NmY4LTAwMDAtMjIyMi1kN2Y5LTA3MGZhOTU2ZTk2M0Bhbm9ueW1vdXMuaW52YWxpZCIsImF1dGgiOiJINHNJQUFBQUFBQUFBSXVPQlFBcHUwd05BZ0FBQUE9PSIsImlzcyI6IlN5bmVyaXNlIiwiYnBpIjo0OCwiY2xJZCI6NDMzMjMwMjg4LCJleHAiOjE1NTMwMDcxNTksImFwayI6IjVBRUFBM0Q1LUUxNDctQzdFQi1ENTlFLUJDRjUwMTA5QTNEMSJ9.QOmSqrneR4mJFv4JdxTYsw_wGcDawDsVQuB-GVTcPPwijiP7lQ_Jzqq2Mypg1BS6WFlfGB8fzqCY9iMF_TdtjmoB4xBrY95ylU8L9qto-9Cw5x5TURkfxq31eryiHe2IteRAEtoVzYg2_s9QhlH6ANVcFOVp8dMno0V9bfMYfeSQa3FkjEbxFsseHkMOiADmp9-tOGtLXO942Ir-2W_Hz3Utlpt4erz0dVJBw8a-mFavPA8EEDWR7ACJNocrVHFkS3wFISh3LqLn6KkXiowaynKlJOEHGctuahzKmF3ZOJ1BvGgKohxF9OXvQs9IdmCfWhYsLr5Q2p04TJJ-MyvTipuggKVioh8mHmOFdfnN-Zused6tXzhZtKPUWTmM8cBKoAOBHExxcMQ8SVSjxnw_7_eLKm7S2wNpu0V-tiPZPCH4wYZXtWBYjmfy0V9ydjXnNunXfgxKixLeFNnONUXxEuqPLvM_xAuonQBXVN4nYrgJv8p8U6_ZlGMPjJq1szfcuBZnzI34LSEWx_nSof0XC5Czm8iG_ihG8naivNWS8h-Q-qKMP_3PPFsLSH4Egh03pH93EJUuNAeSO4RGfUX1wzMvrv1nBC1SM660uFMbq-wkplFBbKnHKMYe-qRs1-lZPG5PwPWJJdpGqOUzbnoMOJYmiq06OHHVQyJSkcEHLCk
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
              example:
                timestamp: 2018-06-07T07:17:41.734+00:00
                status: 401
                error: Unauthorized
                message: Access denied
                path: /auth/login/client
                traceId: 61b4aa7c0cb1167a
        "404":
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
              example:
                timestamp: 2018-06-07T07:17:41.734+00:00
                status: 404
                error: Not Found
                message: Account does not exist
                path: /auth/login/client
                traceId: 61b4aa7c0cb1167a
        "406":
          $ref: "#/components/responses/sauth-406-account-locked"
        "423":
          $ref: "#/components/responses/sauth-423-device-control-enabled"
      deprecated: true
      x-snr-doc-urls:
        - /api-reference/authorization#tag/Authorization-(deprecated)/operation/LogInAsClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/auth/login/client \
              --header 'content-type: application/json' \
              --data '{"apiKey":"string","email":"string","password":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"apiKey\":\"string\",\"email\":\"string\",\"password\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\"}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/sauth/auth/login/client", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "apiKey": "string",
              "email": "string",
              "password": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "deviceId": "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/sauth/auth/login/client");
            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": "/sauth/auth/login/client",
              "headers": {
                "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({
              apiKey: 'string',
              email: 'string',
              password: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              deviceId: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/auth/login/client');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"apiKey":"string","email":"string","password":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"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/sauth/auth/login/client")
              .header("content-type", "application/json")
              .body("{\"apiKey\":\"string\",\"email\":\"string\",\"password\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\"}")
              .asString();
  /sauth/auth/login/client/anonymous:
    post:
      tags:
        - Authorization (deprecated)
      summary: Authenticate anonymously
      description: |
        Obtain a new JWT for an anonymous Profile. The token can be used and refreshed in the same way as tokens of registered Profiles.

        ---

        **Authentication:** Not required
      operationId: LogInAnonymously
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-LogInAnonymouslyRequestBody"
        required: true
      responses:
        "200":
          description: Anonymous authorization token
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-JWTtoken"
              example:
                token: eyJhbGciOiJSUzUxMiJ9.eyJzdinvalidwYmZkM2FkNDg2ZjQ3ZGRiMjE5MSIsImF1ZCI6IkFQSSIsInJsbSI6ImFub255bW91c19jbGllbnQiLCJjdGQiOjE1NTMwMDQxNTkxNTEsImVtbCI6IjYyMjM3NmY4LTAwMDAtMjIyMi1kN2Y5LTA3MGZhOTU2ZTk2M0Bhbm9ueW1vdXMuaW52YWxpZCIsImF1dGgiOiJINHNJQUFBQUFBQUFBSXVPQlFBcHUwd05BZ0FBQUE9PSIsImlzcyI6IlN5bmVyaXNlIiwiYnBpIjo0OCwiY2xJZCI6NDMzMjMwMjg4LCJleHAiOjE1NTMwMDcxNTksImFwayI6IjVBRUFBM0Q1LUUxNDctQzdFQi1ENTlFLUJDRjUwMTA5QTNEMSJ9.QOmSqrneR4mJFv4JdxTYsw_wGcDawDsVQuB-GVTcPPwijiP7lQ_Jzqq2Mypg1BS6WFlfGB8fzqCY9iMF_TdtjmoB4xBrY95ylU8L9qto-9Cw5x5TURkfxq31eryiHe2IteRAEtoVzYg2_s9QhlH6ANVcFOVp8dMno0V9bfMYfeSQa3FkjEbxFsseHkMOiADmp9-tOGtLXO942Ir-2W_Hz3Utlpt4erz0dVJBw8a-mFavPA8EEDWR7ACJNocrVHFkS3wFISh3LqLn6KkXiowaynKlJOEHGctuahzKmF3ZOJ1BvGgKohxF9OXvQs9IdmCfWhYsLr5Q2p04TJJ-MyvTipuggKVioh8mHmOFdfnN-Zused6tXzhZtKPUWTmM8cBKoAOBHExxcMQ8SVSjxnw_7_eLKm7S2wNpu0V-tiPZPCH4wYZXtWBYjmfy0V9ydjXnNunXfgxKixLeFNnONUXxEuqPLvM_xAuonQBXVN4nYrgJv8p8U6_ZlGMPjJq1szfcuBZnzI34LSEWx_nSof0XC5Czm8iG_ihG8naivNWS8h-Q-qKMP_3PPFsLSH4Egh03pH93EJUuNAeSO4RGfUX1wzMvrv1nBC1SM660uFMbq-wkplFBbKnHKMYe-qRs1-lZPG5PwPWJJdpGqOUzbnoMOJYmiq06OHHVQyJSkcEHLCk
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
              example:
                timestamp: 2019-03-19T14:03:35.413+00:00
                status: 401
                error: Unauthorized
                message: Could not fetch ApiKey
                path: /auth/login/client/anonymous
      deprecated: true
      x-snr-doc-urls:
        - /api-reference/authorization#tag/Authorization-(deprecated)/operation/LogInAnonymously
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/auth/login/client/anonymous \
              --header 'content-type: application/json' \
              --data '{"apiKey":"string","deviceId":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"apiKey\":\"string\",\"deviceId\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/sauth/auth/login/client/anonymous", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "apiKey": "string",
              "deviceId": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f"
            });

            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/sauth/auth/login/client/anonymous");
            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": "/sauth/auth/login/client/anonymous",
              "headers": {
                "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({
              apiKey: 'string',
              deviceId: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/auth/login/client/anonymous');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"apiKey":"string","deviceId":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f"}');

            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/sauth/auth/login/client/anonymous")
              .header("content-type", "application/json")
              .body("{\"apiKey\":\"string\",\"deviceId\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}")
              .asString();
  /sauth/auth/login/client/facebook:
    post:
      tags:
        - Authorization (deprecated)
      summary: Authenticate with Facebook
      description: |
        Use a Facebook token to obtain a Profile JWT. If a Facebook account is logging on for the first time, a self-managed account for the profile is registered in Synerise.

        ---

        **Authentication:** Not required
      operationId: AuthenticateWithFacebook
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-AuthenticateWithFacebookRequestBody"
            example: '{"facebookToken":"EAAfsMmaWLW0BAOZAqSoh8ZB5y2ZAixtSrlvvq3fpWGlcrfcoWOiAwBCZBpBDlzwHFSZB58nUBjOz2UMuopO7p2Q65QU1ZAiB2XaxRzje0bBd7Tu87f6C2pcoZAP65agWAF0ElZCNyKn4iAtFd9RhppkwU9ll0AokBZBnDroZCIaxE3IHSWGtE567AUrXkZAsQEjYsZAZAcYx0ki1w7XUToy9Wps9NA0OuBdMhruB3htuiukwOFAZDZD","apiKey":"5AEAA3D5-E147-C7EB-invalid","uuid":"91b8e035-dca3-4805-8915-2cfb01d31fde","deviceId":"deviceId","agreements":{"email":true,"sms":true,"push":true,"bluetooth":true,"rfid":true,"wifi":true},"attributes":{"property1":"string","property2":"string"}}'
        required: true
      responses:
        "200":
          description: Profile authorization token
          headers: {}
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-JWTtoken"
      deprecated: true
      x-snr-doc-urls:
        - /api-reference/authorization#tag/Authorization-(deprecated)/operation/AuthenticateWithFacebook
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/auth/login/client/facebook \
              --header 'content-type: application/json' \
              --data '{"facebookToken":"string","apiKey":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string","agreements":{"email":true,"sms":true,"push":true,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"facebookToken\":\"string\",\"apiKey\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/sauth/auth/login/client/facebook", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "facebookToken": "string",
              "apiKey": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "deviceId": "string",
              "agreements": {
                "email": true,
                "sms": true,
                "push": true,
                "bluetooth": false,
                "rfid": false,
                "wifi": false
              },
              "attributes": {
                "property1": null,
                "property2": null
              },
              "tags": [
                "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/sauth/auth/login/client/facebook");
            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": "/sauth/auth/login/client/facebook",
              "headers": {
                "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({
              facebookToken: 'string',
              apiKey: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              deviceId: 'string',
              agreements: {email: true, sms: true, push: true, bluetooth: false, rfid: false, wifi: false},
              attributes: {property1: null, property2: null},
              tags: ['string']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/auth/login/client/facebook');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"facebookToken":"string","apiKey":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string","agreements":{"email":true,"sms":true,"push":true,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["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/sauth/auth/login/client/facebook")
              .header("content-type", "application/json")
              .body("{\"facebookToken\":\"string\",\"apiKey\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}")
              .asString();
  /sauth/auth/login/client/facebook/no-registration:
    post:
      tags:
        - Authorization (deprecated)
      summary: Authenticate with Facebook without registration
      description: |
        Use a Facebook token to obtain a Profile JWT without creating a self-managed account for this Profile in Synerise.

        ---

        **Authentication:** Not required
      operationId: AuthenticateWithFacebookWithoutRegistration
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-AuthenticateWithFacebookWithoutRegistrationRequestBody"
            example: '{"facebookToken":"EAAfsMmaWLW0BAOZAqSoh8ZB5y2ZAixtSrlvvq3fpWGlcrfcoWOiAwBCZBpBDlzwHFSZB58nUBjOz2UMuopO7p2Q65QU1ZAiB2XaxRzje0bBd7Tu87f6C2pcoZAP65agWAF0ElZCNyKn4iAtFd9RhppkwU9ll0AokBZBnDroZCIaxE3IHSWGtE567AUrXkZAsQEjYsZAZAcYx0ki1w7XUToy9Wps9NA0OuBdMhruB3htuiukwOFAZDZD","apiKey":"5AEAA3D5-E147-C7EB-invalid","uuid":"91b8e035-dca3-4805-8915-2cfb01d31fde","deviceId":"deviceId","agreements":{"email":true,"sms":true,"push":true,"bluetooth":true,"rfid":true,"wifi":true},"attributes":{"property1":"string","property2":"string"}}'
        required: true
      responses:
        "200":
          description: Profile authorization token
          headers: {}
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-JWTtoken"
      deprecated: true
      x-snr-doc-urls:
        - /api-reference/authorization#tag/Authorization-(deprecated)/operation/AuthenticateWithFacebookWithoutRegistration
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/auth/login/client/facebook/no-registration \
              --header 'content-type: application/json' \
              --data '{"facebookToken":"string","apiKey":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string","agreements":{"email":true,"sms":true,"push":true,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"facebookToken\":\"string\",\"apiKey\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/sauth/auth/login/client/facebook/no-registration", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "facebookToken": "string",
              "apiKey": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "deviceId": "string",
              "agreements": {
                "email": true,
                "sms": true,
                "push": true,
                "bluetooth": false,
                "rfid": false,
                "wifi": false
              },
              "attributes": {
                "property1": null,
                "property2": null
              },
              "tags": [
                "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/sauth/auth/login/client/facebook/no-registration");
            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": "/sauth/auth/login/client/facebook/no-registration",
              "headers": {
                "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({
              facebookToken: 'string',
              apiKey: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              deviceId: 'string',
              agreements: {email: true, sms: true, push: true, bluetooth: false, rfid: false, wifi: false},
              attributes: {property1: null, property2: null},
              tags: ['string']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/auth/login/client/facebook/no-registration');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"facebookToken":"string","apiKey":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string","agreements":{"email":true,"sms":true,"push":true,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["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/sauth/auth/login/client/facebook/no-registration")
              .header("content-type", "application/json")
              .body("{\"facebookToken\":\"string\",\"apiKey\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}")
              .asString();
  /sauth/auth/login/client/oauth:
    post:
      tags:
        - Authorization (deprecated)
      summary: Authenticate with OAuth
      description: |
        Obtain a new JWT token by using OAuth authentication token.

        ---

        **Authentication:** Not required
      operationId: AuthenticateWithOauth
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-OauthAuthBody"
        required: true
      responses:
        "200":
          description: Profile authorization token
          headers: {}
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-JWTtoken"
      deprecated: true
      x-snr-doc-urls:
        - /api-reference/authorization#tag/Authorization-(deprecated)/operation/AuthenticateWithOauth
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/auth/login/client/oauth \
              --header 'content-type: application/json' \
              --data '{"accessToken":"string","apiKey":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string","agreements":{"email":true,"sms":true,"push":true,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"],"customId":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"accessToken\":\"string\",\"apiKey\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"],\"customId\":\"string\"}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/sauth/auth/login/client/oauth", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "accessToken": "string",
              "apiKey": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "deviceId": "string",
              "agreements": {
                "email": true,
                "sms": true,
                "push": true,
                "bluetooth": false,
                "rfid": false,
                "wifi": false
              },
              "attributes": {
                "property1": null,
                "property2": null
              },
              "tags": [
                "string"
              ],
              "customId": "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/sauth/auth/login/client/oauth");
            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": "/sauth/auth/login/client/oauth",
              "headers": {
                "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({
              accessToken: 'string',
              apiKey: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              deviceId: 'string',
              agreements: {email: true, sms: true, push: true, bluetooth: false, rfid: false, wifi: false},
              attributes: {property1: null, property2: null},
              tags: ['string'],
              customId: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/auth/login/client/oauth');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"accessToken":"string","apiKey":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string","agreements":{"email":true,"sms":true,"push":true,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"],"customId":"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/sauth/auth/login/client/oauth")
              .header("content-type", "application/json")
              .body("{\"accessToken\":\"string\",\"apiKey\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"],\"customId\":\"string\"}")
              .asString();
  /sauth/auth/login/client/oauth/no-registration:
    post:
      tags:
        - Authorization (deprecated)
      summary: Authenticate with OAuth without registration
      description: |
        Use an OAuth token to obtain a Profile JWT. This method does not create a Profile in Synerise.

        ---

        **Authentication:** Not required
      operationId: loginWithOauthWithoutRegistrationUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-OauthAuthBody"
        required: true
      responses:
        "200":
          description: Profile authorization token
          headers: {}
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-JWTtoken"
      deprecated: true
      x-snr-doc-urls:
        - /api-reference/authorization#tag/Authorization-(deprecated)/operation/loginWithOauthWithoutRegistrationUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/auth/login/client/oauth/no-registration \
              --header 'content-type: application/json' \
              --data '{"accessToken":"string","apiKey":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string","agreements":{"email":true,"sms":true,"push":true,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"],"customId":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"accessToken\":\"string\",\"apiKey\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"],\"customId\":\"string\"}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/sauth/auth/login/client/oauth/no-registration", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "accessToken": "string",
              "apiKey": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "deviceId": "string",
              "agreements": {
                "email": true,
                "sms": true,
                "push": true,
                "bluetooth": false,
                "rfid": false,
                "wifi": false
              },
              "attributes": {
                "property1": null,
                "property2": null
              },
              "tags": [
                "string"
              ],
              "customId": "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/sauth/auth/login/client/oauth/no-registration");
            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": "/sauth/auth/login/client/oauth/no-registration",
              "headers": {
                "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({
              accessToken: 'string',
              apiKey: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              deviceId: 'string',
              agreements: {email: true, sms: true, push: true, bluetooth: false, rfid: false, wifi: false},
              attributes: {property1: null, property2: null},
              tags: ['string'],
              customId: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/auth/login/client/oauth/no-registration');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"accessToken":"string","apiKey":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string","agreements":{"email":true,"sms":true,"push":true,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"],"customId":"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/sauth/auth/login/client/oauth/no-registration")
              .header("content-type", "application/json")
              .body("{\"accessToken\":\"string\",\"apiKey\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"],\"customId\":\"string\"}")
              .asString();
  /sauth/auth/login/client/apple:
    post:
      tags:
        - Authorization (deprecated)
      summary: Authenticate with Sign in with Apple
      description: |
        Obtain a new JWT token by using Sign in with Apple authentication token.

        ---

        **Authentication:** Not required
      operationId: AuthenticateWithApple
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-AuthenticateWithAppleRequestBody"
            example: '{"accessToken":"EAAfsMmaWLW0BAOZAqSoh8ZB5y2ZAixtSrlvvq3fpWGlcrfcoWOiAwBCZBpBDlzwHFSZB58nUBjOz2UMuopO7p2Q65QU1ZAiB2XaxRzje0bBd7Tu87f6C2pcoZAP65agWAF0ElZCNyKn4iAtFd9RhppkwU9ll0AokBZBnDroZCIaxE3IHSWGtE567AUrXkZAsQEjYsZAZAcYx0ki1w7XUToy9Wps9NA0OuBdMhruB3htuiukwOFAZDZD","apiKey":"5AEAA3D5-E147-C7EB-invalid","uuid":"91b8e035-dca3-4805-8915-2cfb01d31fde","deviceId":"deviceId","agreements":{"email":true,"sms":true,"push":true,"bluetooth":true,"rfid":true,"wifi":true},"attributes":{"property1":"string","property2":"string"}}'
        required: true
      responses:
        "200":
          description: Profile authorization token
          headers: {}
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-JWTtoken"
      deprecated: true
      x-snr-doc-urls:
        - /api-reference/authorization#tag/Authorization-(deprecated)/operation/AuthenticateWithApple
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/auth/login/client/apple \
              --header 'content-type: application/json' \
              --data '{"accessToken":"string","apiKey":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string","agreements":{"email":true,"sms":true,"push":true,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"accessToken\":\"string\",\"apiKey\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/sauth/auth/login/client/apple", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "accessToken": "string",
              "apiKey": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "deviceId": "string",
              "agreements": {
                "email": true,
                "sms": true,
                "push": true,
                "bluetooth": false,
                "rfid": false,
                "wifi": false
              },
              "attributes": {
                "property1": null,
                "property2": null
              },
              "tags": [
                "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/sauth/auth/login/client/apple");
            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": "/sauth/auth/login/client/apple",
              "headers": {
                "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({
              accessToken: 'string',
              apiKey: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              deviceId: 'string',
              agreements: {email: true, sms: true, push: true, bluetooth: false, rfid: false, wifi: false},
              attributes: {property1: null, property2: null},
              tags: ['string']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/auth/login/client/apple');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"accessToken":"string","apiKey":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string","agreements":{"email":true,"sms":true,"push":true,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["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/sauth/auth/login/client/apple")
              .header("content-type", "application/json")
              .body("{\"accessToken\":\"string\",\"apiKey\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}")
              .asString();
  /sauth/auth/login/client/apple/no-registration:
    post:
      tags:
        - Authorization (deprecated)
      summary: Authenticate with Sign in with Apple without registration
      description: |
        Use an Apple token to obtain a Profile JWT. This method does not create a Profile in Synerise.

        ---

        **Authentication:** Not required
      operationId: loginWithAppleWithoutRegistrationUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-LoginWithAppleWithoutRegistrationRequestBody"
        required: true
      responses:
        "200":
          description: Profile authorization token
          headers: {}
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-JWTtoken"
      deprecated: true
      x-snr-doc-urls:
        - /api-reference/authorization#tag/Authorization-(deprecated)/operation/loginWithAppleWithoutRegistrationUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/auth/login/client/apple/no-registration \
              --header 'content-type: application/json' \
              --data '{"accessToken":"string","apiKey":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string","agreements":{"email":true,"sms":true,"push":true,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"accessToken\":\"string\",\"apiKey\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/sauth/auth/login/client/apple/no-registration", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "accessToken": "string",
              "apiKey": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "deviceId": "string",
              "agreements": {
                "email": true,
                "sms": true,
                "push": true,
                "bluetooth": false,
                "rfid": false,
                "wifi": false
              },
              "attributes": {
                "property1": null,
                "property2": null
              },
              "tags": [
                "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/sauth/auth/login/client/apple/no-registration");
            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": "/sauth/auth/login/client/apple/no-registration",
              "headers": {
                "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({
              accessToken: 'string',
              apiKey: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              deviceId: 'string',
              agreements: {email: true, sms: true, push: true, bluetooth: false, rfid: false, wifi: false},
              attributes: {property1: null, property2: null},
              tags: ['string']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/auth/login/client/apple/no-registration');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"accessToken":"string","apiKey":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string","agreements":{"email":true,"sms":true,"push":true,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["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/sauth/auth/login/client/apple/no-registration")
              .header("content-type", "application/json")
              .body("{\"accessToken\":\"string\",\"apiKey\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}")
              .asString();
  /sauth/clients/registered:
    post:
      tags:
        - Profile registration
      summary: Register a Profile
      description: |
        Create a new account for a Profile. This account is owned by the Profile and can be accessed and edited by it. If you don't have some information about the profile, don't insert a null-value parameter - omit the parameter entirely.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `SAUTH_REGISTER_CLIENT_CREATE`
      operationId: RegisterAClient
      requestBody:
        content:
          application/json:
            schema:
              required:
                - uuid
                - email
                - password
              $ref: "#/components/schemas/sauth-RegisterAClientRequestBody"
        required: true
      responses:
        "202":
          description: Request accepted
        "400":
          description: Profile already exists or request body malformed
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/sauth-4xx-base"
                  - type: object
                    properties:
                      errorCode:
                        type: string
                        description: |
                          Error code, if applicable.
                          - `SAU-603`: A profile with this UUID already exists, you probably need to re-generate the UUID
                          - `SAU-604`: A profile with this id already exists
                          - `SAU-605`: A profile with this customId already exists and is registered
                          - `SAU-606`: This UUID cannot be used, re-generate the UUID and try again
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-forbidden"
        "424":
          description: "Only if customId was obtained from loyalty card code pool: provided customId does not exist in loyalty card code pool"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-registration/operation/RegisterAClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/clients/registered \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"email":"string","password":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","whatsAppId":"string","birthDate":"string","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":true,"sms":true,"push":true,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"email\":\"string\",\"password\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"whatsAppId\":\"string\",\"birthDate\":\"string\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/sauth/clients/registered", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "string",
              "password": "string",
              "phone": "+48111222333",
              "customId": "string",
              "firstName": "string",
              "lastName": "string",
              "displayName": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "avatarUrl": "string",
              "whatsAppId": "string",
              "birthDate": "string",
              "company": "string",
              "city": "string",
              "address": "string",
              "zipCode": "string",
              "province": "string",
              "countryCode": "PL",
              "sex": "FEMALE",
              "agreements": {
                "email": true,
                "sms": true,
                "push": true,
                "bluetooth": false,
                "rfid": false,
                "wifi": false
              },
              "attributes": {
                "property1": null,
                "property2": null
              },
              "tags": [
                "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/sauth/clients/registered");
            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": "/sauth/clients/registered",
              "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({
              email: 'string',
              password: 'string',
              phone: '+48111222333',
              customId: 'string',
              firstName: 'string',
              lastName: 'string',
              displayName: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              avatarUrl: 'string',
              whatsAppId: 'string',
              birthDate: 'string',
              company: 'string',
              city: 'string',
              address: 'string',
              zipCode: 'string',
              province: 'string',
              countryCode: 'PL',
              sex: 'FEMALE',
              agreements: {email: true, sms: true, push: true, bluetooth: false, rfid: false, wifi: false},
              attributes: {property1: null, property2: null},
              tags: ['string']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/clients/registered');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"email":"string","password":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","whatsAppId":"string","birthDate":"string","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":true,"sms":true,"push":true,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["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/sauth/clients/registered")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"email\":\"string\",\"password\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"whatsAppId\":\"string\",\"birthDate\":\"string\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}")
              .asString();
  /sauth/auth/refresh/client:
    get:
      tags:
        - Authorization (deprecated)
      summary: Refresh a Profile token
      description: |
        Retrieve a refreshed JWT Token to prolong the Profile session.

        The current token must still be active at the time of the request.

        ---

        **API consumers:** <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>

        **Authentication:** Not required
      operationId: RefreshAClientToken
      responses:
        "200":
          description: New authorization token
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-JWTtoken"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
              example:
                timestamp: 2019-03-19T13:57:33.244+00:00
                status: 401
                error: Unauthorized
                message: Full authentication is required to access this resource
                path: /auth/refresh/client
      security:
        - JWT: []
      deprecated: true
      x-snr-doc-urls:
        - /api-reference/authorization#tag/Authorization-(deprecated)/operation/RefreshAClientToken
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/sauth/auth/refresh/client \
              --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", "/sauth/auth/refresh/client", 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/sauth/auth/refresh/client");
            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": "/sauth/auth/refresh/client",
              "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/sauth/auth/refresh/client');
            $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/sauth/auth/refresh/client")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /sauth/v2/auth/refresh/client:
    post:
      deprecated: true
      tags:
        - Authorization (deprecated)
      summary: Refresh a Profile token
      description: |
        This method is deprecated. Use [the v3 method](#operation/RefreshAClientTokenV3) instead.

        Retrieve a refreshed JWT Token to prolong the session.

        The current token must still be active at the time of the request.

        ---

        **API consumers:** <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>

        **Authentication:** Not required
      operationId: RefreshAClientTokenV2
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-ClientRefreshRequest"
        required: true
      responses:
        "200":
          description: New authorization token
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-JWTtoken"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
              example:
                timestamp: 2019-03-19T13:57:33.244+00:00
                status: 401
                error: Unauthorized
                message: Full authentication is required to access this resource
                path: /v2/auth/refresh/client
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/authorization#tag/Authorization-(deprecated)/operation/RefreshAClientTokenV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/v2/auth/refresh/client \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"apiKey":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"apiKey\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/sauth/v2/auth/refresh/client", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "apiKey": "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/sauth/v2/auth/refresh/client");
            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": "/sauth/v2/auth/refresh/client",
              "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({apiKey: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/v2/auth/refresh/client');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"apiKey":"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/sauth/v2/auth/refresh/client")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"apiKey\":\"string\"}")
              .asString();
  /sauth/v3/auth/refresh/client:
    post:
      tags:
        - Authorization
      summary: Refresh a Profile token
      description: |
        Retrieve a refreshed JWT Token to prolong the session.

        The current token must still be active at the time of the request.

        ---

        **API consumers:** <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>

        **Authentication:** Not required
      operationId: RefreshAClientTokenV3
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-ClientRefreshRequest"
        required: true
      responses:
        "200":
          description: New authorization token
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-JWTtokenV3"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
              example:
                timestamp: 2019-03-19T13:57:33.244+00:00
                status: 401
                error: Unauthorized
                message: Full authentication is required to access this resource
                path: /v3/auth/refresh/client
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/authorization#tag/Authorization/operation/RefreshAClientTokenV3
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/v3/auth/refresh/client \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"apiKey":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"apiKey\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/sauth/v3/auth/refresh/client", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "apiKey": "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/sauth/v3/auth/refresh/client");
            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": "/sauth/v3/auth/refresh/client",
              "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({apiKey: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/v3/auth/refresh/client');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"apiKey":"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/sauth/v3/auth/refresh/client")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"apiKey\":\"string\"}")
              .asString();
  /sauth/clients/activation/by-pin-code/confirmation:
    post:
      security:
        - JWT: []
      tags:
        - Profile registration
      summary: Confirm registration with PIN code
      description: |
        Confirm account registration with PIN code received by email (code is sent automatically at registration).

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>
      operationId: confirmByPinCodeUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-PinCodeConfirmationRequest"
      responses:
        "200":
          description: OK, account confirmed
        "400":
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/sauth-4xx-base"
                  - type: object
                    properties:
                      errorCode:
                        type: string
                        description: |
                          Error code, if applicable.
                          - `SAU-602`: Account is already confirmed
                          - `SAU-601`: Device ID is required and missing
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/sauth-4xx-base"
                  - type: object
                    properties:
                      errorCode:
                        type: string
                        description: |
                          Error code, if applicable.
                          - `SAU-304`: Wrong PIN
                          - `SAU-305`: PIN expired
                          - `SAU-306`: PIN was sent from a different device than the account was registered (by default, this is not allowed)
        "404":
          description: Not Found
      deprecated: false
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-registration/operation/confirmByPinCodeUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/clients/activation/by-pin-code/confirmation \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"deviceId":"string","email":"string","pinCode":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"deviceId\":\"string\",\"email\":\"string\",\"pinCode\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/sauth/clients/activation/by-pin-code/confirmation", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "deviceId": "string",
              "email": "string",
              "pinCode": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f"
            });

            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/sauth/clients/activation/by-pin-code/confirmation");
            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": "/sauth/clients/activation/by-pin-code/confirmation",
              "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({
              deviceId: 'string',
              email: 'string',
              pinCode: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/clients/activation/by-pin-code/confirmation');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"deviceId":"string","email":"string","pinCode":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f"}');

            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/sauth/clients/activation/by-pin-code/confirmation")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"deviceId\":\"string\",\"email\":\"string\",\"pinCode\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}")
              .asString();
  /sauth/clients/activation/by-pin-code/request:
    post:
      security:
        - JWT: []
      tags:
        - Profile registration
      summary: Re-send PIN code
      description: |
        Re-send a PIN code to the Profile's email.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>
      operationId: resendByPinCodeUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-ClientPinActivationResendRequest"
      responses:
        "200":
          description: OK
        "400":
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/sauth-4xx-base"
                  - type: object
                    properties:
                      errorCode:
                        type: string
                        description: |
                          Error code, if applicable.
                          - `SAU-601`: Device ID is required and missing
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/sauth-4xx-base"
                  - type: object
                    properties:
                      errorCode:
                        type: string
                        description: |
                          Error code, if applicable.
                          - `SAU-304`: Wrong PIN
                          - `SAU-305`: PIN expired
                          - `SAU-306`: PIN was sent from a different device than the account was registered (by default, this is not allowed)
        "404":
          description: Not Found
      deprecated: false
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-registration/operation/resendByPinCodeUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/clients/activation/by-pin-code/request \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"email":"string","deviceId":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"email\":\"string\",\"deviceId\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/sauth/clients/activation/by-pin-code/request", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "string",
              "deviceId": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f"
            });

            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/sauth/clients/activation/by-pin-code/request");
            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": "/sauth/clients/activation/by-pin-code/request",
              "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({
              email: 'string',
              deviceId: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/clients/activation/by-pin-code/request');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"email":"string","deviceId":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f"}');

            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/sauth/clients/activation/by-pin-code/request")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"email\":\"string\",\"deviceId\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}")
              .asString();
  /sauth/clients/activation/confirmation:
    post:
      tags:
        - Profile registration
      summary: Activate a Profile's account
      description: |
        Activate the Profile's account. This is used when registration is configured to keep the account inactive until the email is confirmed.

        ---

        **API consumers:** <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>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `SAUTH_CONFIRMATION_CLIENT_CREATE`
      operationId: ConfirmAClientAccount
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-ConfirmAClientAccountRequestBody"
            example:
              token: 8a0be35a-f6be-437b-ab18-339cc6194df5
        required: true
      responses:
        "200":
          description: Request accepted
          headers: {}
        "400":
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/sauth-4xx-base"
                  - type: object
                    properties:
                      errorCode:
                        type: string
                        description: |
                          Error code, if applicable.
                          - `SAU-602`: Account is already confirmed
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
              example:
                timestamp: 2018-08-09T07:53:32.406+00:00
                status: 409
                error: Conflict
                message: Account already activated
                path: /clients/activation/request
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-registration/operation/ConfirmAClientAccount
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/clients/activation/confirmation \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"token":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"token\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/sauth/clients/activation/confirmation", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "token": "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/sauth/clients/activation/confirmation");
            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": "/sauth/clients/activation/confirmation",
              "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({token: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/clients/activation/confirmation');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"token":"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/sauth/clients/activation/confirmation")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"token\":\"string\"}")
              .asString();
  /sauth/clients/activation/request:
    post:
      tags:
        - Profile registration
      summary: Re-send email confirmation
      description: |
        Request a re-sending of the confirmation email.

        ---

        **API consumers:** <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>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `SAUTH_CONFIRMATION_CLIENT_CREATE`
      operationId: resendUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-ClientActivationResendRequest"
        required: true
      responses:
        "200":
          description: OK
          content: {}
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-forbidden"
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-registration/operation/resendUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/clients/activation/request \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"email":"string","deviceId":"string","uuid":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"email\":\"string\",\"deviceId\":\"string\",\"uuid\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/sauth/clients/activation/request", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "string",
              "deviceId": "string",
              "uuid": "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/sauth/clients/activation/request");
            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": "/sauth/clients/activation/request",
              "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({email: 'string', deviceId: 'string', uuid: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/clients/activation/request');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"email":"string","deviceId":"string","uuid":"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/sauth/clients/activation/request")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"email\":\"string\",\"deviceId\":\"string\",\"uuid\":\"string\"}")
              .asString();
  /sauth/clients/password-reset/request:
    post:
      tags:
        - Profile account management
      summary: Request Profile password reset
      description: |
        Allows a Profile to send a password reset request. A reset link is sent to the specified email address.
        To confirm the request, use the [Confirm a Profile's password reset](#operation/ConfirmClientPasswordReset) endpoint.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `SAUTH_PASSWORD_RESET_CLIENT_CREATE`
      operationId: RequestClientPasswordReset
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-RequestClientpasswordresetRequest"
        required: true
      responses:
        "200":
          description: Request accepted
        "201":
          description: Created
          content: {}
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/sauth-4xx-base"
                  - type: object
                    properties:
                      errorCode:
                        type: string
                        description: |
                          Error code, if applicable.
                          - `SAU-307`: Cannot reset password, email confirmation by hash code (activation link) required
                          - `SAU-308`: Cannot reset password, email confirmation by PIN (activation link) required
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/RequestClientPasswordReset
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/clients/password-reset/request \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"email":"testDoc@example.com"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"email\":\"testDoc@example.com\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/sauth/clients/password-reset/request", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "testDoc@example.com"
            });

            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/sauth/clients/password-reset/request");
            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": "/sauth/clients/password-reset/request",
              "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({email: 'testDoc@example.com'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/clients/password-reset/request');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"email":"testDoc@example.com"}');

            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/sauth/clients/password-reset/request")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"email\":\"testDoc@example.com\"}")
              .asString();
  /sauth/clients/password-reset/confirmation:
    post:
      tags:
        - Profile account management
      summary: Confirm Profile password reset
      description: |
        Confirm a password reset using the token obtained from the [Request Profile password reset](#operation/RequestClientPasswordReset) endpoint.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `SAUTH_PASSWORD_RESET_CLIENT_CREATE`
      operationId: ConfirmClientPasswordReset
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-ConfirmClientpasswordresetRequest"
        required: true
      responses:
        "200":
          description: Request accepted
          headers: {}
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/ConfirmClientPasswordReset
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/clients/password-reset/confirmation \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"password":"testPass1!","token":"token_from_pass_reset_req"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"password\":\"testPass1!\",\"token\":\"token_from_pass_reset_req\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/sauth/clients/password-reset/confirmation", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "password": "testPass1!",
              "token": "token_from_pass_reset_req"
            });

            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/sauth/clients/password-reset/confirmation");
            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": "/sauth/clients/password-reset/confirmation",
              "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({password: 'testPass1!', token: 'token_from_pass_reset_req'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/clients/password-reset/confirmation');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"password":"testPass1!","token":"token_from_pass_reset_req"}');

            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/sauth/clients/password-reset/confirmation")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"password\":\"testPass1!\",\"token\":\"token_from_pass_reset_req\"}")
              .asString();
  /sauth/my-account/change-password:
    post:
      tags:
        - Profile account management
      summary: Change Profile password
      description: |
        A Profile can update the password to its account.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: ChangeClientPassword
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-ChangeClientPasswordRequestBody"
            example: '{"oldPassword":"test1.1234","password":"Test.1234","deviceId":"optional"}'
        required: true
      responses:
        "200":
          description: Request accepted
          headers: {}
          content:
            text/plain:
              schema:
                type: object
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
              example:
                error: Bad Request
                status: 400
                timestamp: 2018-08-01T19:46:52.178Z
                message: Password must have at least 6 characters and must contain at least one digit, one letter and one special character
                path: /my-account/change-password
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/ChangeClientPassword
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/my-account/change-password \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"oldPassword":"string","password":"string","deviceId":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"oldPassword\":\"string\",\"password\":\"string\",\"deviceId\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/sauth/my-account/change-password", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "oldPassword": "string",
              "password": "string",
              "deviceId": "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/sauth/my-account/change-password");
            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": "/sauth/my-account/change-password",
              "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({oldPassword: 'string', password: 'string', deviceId: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/my-account/change-password');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"oldPassword":"string","password":"string","deviceId":"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/sauth/my-account/change-password")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"oldPassword\":\"string\",\"password\":\"string\",\"deviceId\":\"string\"}")
              .asString();
  /sauth/v2/auth/login/client:
    post:
      deprecated: true
      tags:
        - Authorization (deprecated)
      summary: Authenticate as Profile
      description: |
        This method is deprecated. Use [the v3 method](#operation/authenticateUsingPOST_v3) instead.

        Obtain a new JWT token for a Profile. If an account for the Profile does not exist and the `identityProvider` is different than `SYNERISE`, this request creates an account.


        ---

        **Authentication:** Not required
      operationId: authenticateUsingPOST_v2
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-AuthenticationRequestV2_and_3"
      responses:
        "200":
          description: Profile authorization token
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-JWTtoken"
              example:
                token: eyJhbGciOiJSUzUxMiJ9.eyJzdinvalidwYmZkM2FkNDg2ZjQ3ZGRiMjE5MSIsImF1ZCI6IkFQSSIsInJsbSI6ImFub255bW91c19jbGllbnQiLCJjdGQiOjE1NTMwMDQxNTkxNTEsImVtbCI6IjYyMjM3NmY4LTAwMDAtMjIyMi1kN2Y5LTA3MGZhOTU2ZTk2M0Bhbm9ueW1vdXMuaW52YWxpZCIsImF1dGgiOiJINHNJQUFBQUFBQUFBSXVPQlFBcHUwd05BZ0FBQUE9PSIsImlzcyI6IlN5bmVyaXNlIiwiYnBpIjo0OCwiY2xJZCI6NDMzMjMwMjg4LCJleHAiOjE1NTMwMDcxNTksImFwayI6IjVBRUFBM0Q1LUUxNDctQzdFQi1ENTlFLUJDRjUwMTA5QTNEMSJ9.QOmSqrneR4mJFv4JdxTYsw_wGcDawDsVQuB-GVTcPPwijiP7lQ_Jzqq2Mypg1BS6WFlfGB8fzqCY9iMF_TdtjmoB4xBrY95ylU8L9qto-9Cw5x5TURkfxq31eryiHe2IteRAEtoVzYg2_s9QhlH6ANVcFOVp8dMno0V9bfMYfeSQa3FkjEbxFsseHkMOiADmp9-tOGtLXO942Ir-2W_Hz3Utlpt4erz0dVJBw8a-mFavPA8EEDWR7ACJNocrVHFkS3wFISh3LqLn6KkXiowaynKlJOEHGctuahzKmF3ZOJ1BvGgKohxF9OXvQs9IdmCfWhYsLr5Q2p04TJJ-MyvTipuggKVioh8mHmOFdfnN-Zused6tXzhZtKPUWTmM8cBKoAOBHExxcMQ8SVSjxnw_7_eLKm7S2wNpu0V-tiPZPCH4wYZXtWBYjmfy0V9ydjXnNunXfgxKixLeFNnONUXxEuqPLvM_xAuonQBXVN4nYrgJv8p8U6_ZlGMPjJq1szfcuBZnzI34LSEWx_nSof0XC5Czm8iG_ihG8naivNWS8h-Q-qKMP_3PPFsLSH4Egh03pH93EJUuNAeSO4RGfUX1wzMvrv1nBC1SM660uFMbq-wkplFBbKnHKMYe-qRs1-lZPG5PwPWJJdpGqOUzbnoMOJYmiq06OHHVQyJSkcEHLCk
        "400":
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/sauth-4xx-base"
                  - type: object
                    properties:
                      errorCode:
                        type: string
                        description: |
                          Error code, if applicable.
                          - `SAU-601`: Device ID is required and missing
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
              example:
                timestamp: 2018-06-07T07:17:41.734+00:00
                status: 401
                error: Unauthorized
                message: Access denied
                path: /v2/auth/login/client
                traceId: 61b4aa7c0cb1167a
        "403":
          $ref: "#/components/responses/sauth-403-login"
        "404":
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
              example:
                timestamp: 2018-06-07T07:17:41.734+00:00
                status: 404
                error: Not Found
                message: Account does not exist
                path: /v2/auth/login/client
                traceId: 61b4aa7c0cb1167a
        "406":
          $ref: "#/components/responses/sauth-406-account-locked"
        "423":
          $ref: "#/components/responses/sauth-423-device-control-enabled"
      x-snr-doc-urls:
        - /api-reference/authorization#tag/Authorization-(deprecated)/operation/authenticateUsingPOST_v2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/v2/auth/login/client \
              --header 'content-type: application/json' \
              --data '{"apiKey":"string","identityProvider":"SYNERISE","identityProviderToken":"string","email":"string","customId":null,"password":"string","uuid":"string","deviceId":"string","agreements":{"email":true,"sms":true,"push":true,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"apiKey\":\"string\",\"identityProvider\":\"SYNERISE\",\"identityProviderToken\":\"string\",\"email\":\"string\",\"customId\":null,\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/sauth/v2/auth/login/client", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "apiKey": "string",
              "identityProvider": "SYNERISE",
              "identityProviderToken": "string",
              "email": "string",
              "customId": null,
              "password": "string",
              "uuid": "string",
              "deviceId": "string",
              "agreements": {
                "email": true,
                "sms": true,
                "push": true,
                "bluetooth": false,
                "rfid": false,
                "wifi": false
              },
              "attributes": {
                "property1": null,
                "property2": null
              },
              "tags": [
                "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/sauth/v2/auth/login/client");
            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": "/sauth/v2/auth/login/client",
              "headers": {
                "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({
              apiKey: 'string',
              identityProvider: 'SYNERISE',
              identityProviderToken: 'string',
              email: 'string',
              customId: null,
              password: 'string',
              uuid: 'string',
              deviceId: 'string',
              agreements: {email: true, sms: true, push: true, bluetooth: false, rfid: false, wifi: false},
              attributes: {property1: null, property2: null},
              tags: ['string']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/v2/auth/login/client');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"apiKey":"string","identityProvider":"SYNERISE","identityProviderToken":"string","email":"string","customId":null,"password":"string","uuid":"string","deviceId":"string","agreements":{"email":true,"sms":true,"push":true,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["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/sauth/v2/auth/login/client")
              .header("content-type", "application/json")
              .body("{\"apiKey\":\"string\",\"identityProvider\":\"SYNERISE\",\"identityProviderToken\":\"string\",\"email\":\"string\",\"customId\":null,\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}")
              .asString();
  /sauth/v2/auth/login/client/conditional:
    post:
      deprecated: true
      summary: Authenticate as Profile (conditional)
      description: |
        This method is deprecated. Use [the v3 method](#operation/authenticateConditionalUsingPOSTv3) instead.      


        Obtain a new JWT token for a Profile.

        - If the account does not exist, an account is not created.
        - If any additional conditions are required for logging in, the response is HTTP200 and lists the conditions.
        - Note that using this endpoint requires authenticating as an anonymous Profile first.


        ---

        **Authentication:** Not required
      security:
        - JWT: []
      tags:
        - Authorization (deprecated)
      operationId: authenticateConditionalUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-AuthenticationRequestV2_and_3"
      responses:
        "200":
          description: Details of the login operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-ConditionalAuthenticationResponse"
        "400":
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/sauth-4xx-base"
                  - type: object
                    properties:
                      errorCode:
                        type: string
                        description: |
                          Error code, if applicable.
                          - `SAU-601`: Device ID is required and missing
        "401":
          description: See error message for details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
        "403":
          $ref: "#/components/responses/sauth-403-login"
        "404":
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
              example:
                timestamp: 2018-06-07T07:17:41.734+00:00
                status: 404
                error: Not Found
                message: Account does not exist
                path: /v2/auth/login/client/conditional
                traceId: 61b4aa7c0cb1167a
        "406":
          $ref: "#/components/responses/sauth-406-account-locked"
        "423":
          $ref: "#/components/responses/sauth-423-device-control-enabled"
      x-snr-doc-urls:
        - /api-reference/authorization#tag/Authorization-(deprecated)/operation/authenticateConditionalUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/v2/auth/login/client/conditional \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"apiKey":"string","identityProvider":"SYNERISE","identityProviderToken":"string","email":"string","customId":null,"password":"string","uuid":"string","deviceId":"string","agreements":{"email":true,"sms":true,"push":true,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"apiKey\":\"string\",\"identityProvider\":\"SYNERISE\",\"identityProviderToken\":\"string\",\"email\":\"string\",\"customId\":null,\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/sauth/v2/auth/login/client/conditional", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "apiKey": "string",
              "identityProvider": "SYNERISE",
              "identityProviderToken": "string",
              "email": "string",
              "customId": null,
              "password": "string",
              "uuid": "string",
              "deviceId": "string",
              "agreements": {
                "email": true,
                "sms": true,
                "push": true,
                "bluetooth": false,
                "rfid": false,
                "wifi": false
              },
              "attributes": {
                "property1": null,
                "property2": null
              },
              "tags": [
                "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/sauth/v2/auth/login/client/conditional");
            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": "/sauth/v2/auth/login/client/conditional",
              "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({
              apiKey: 'string',
              identityProvider: 'SYNERISE',
              identityProviderToken: 'string',
              email: 'string',
              customId: null,
              password: 'string',
              uuid: 'string',
              deviceId: 'string',
              agreements: {email: true, sms: true, push: true, bluetooth: false, rfid: false, wifi: false},
              attributes: {property1: null, property2: null},
              tags: ['string']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/v2/auth/login/client/conditional');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"apiKey":"string","identityProvider":"SYNERISE","identityProviderToken":"string","email":"string","customId":null,"password":"string","uuid":"string","deviceId":"string","agreements":{"email":true,"sms":true,"push":true,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["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/sauth/v2/auth/login/client/conditional")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"apiKey\":\"string\",\"identityProvider\":\"SYNERISE\",\"identityProviderToken\":\"string\",\"email\":\"string\",\"customId\":null,\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}")
              .asString();
  /sauth/v2/auth/login/client/anonymous:
    post:
      deprecated: true
      tags:
        - Authorization (deprecated)
      summary: Authenticate anonymously
      description: |
        This method is deprecated. Use [the v3 method](#operation/LogInAnonymouslyV3) instead.

        Obtain a new JWT for an anonymous Profile. The token can be used and refreshed in the same way
        as tokens of registered Profiles.


        ---

        **Authentication:** Not required
      operationId: LogInAnonymouslyV2
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-LogInAnonymouslyV2RequestBody"
        required: true
      responses:
        "200":
          description: Anonymous authorization token
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-JWTtoken"
              example:
                token: eyJhbGciOiJSUzUxMiJ9.eyJzdinvalidwYmZkM2FkNDg2ZjQ3ZGRiMjE5MSIsImF1ZCI6IkFQSSIsInJsbSI6ImFub255bW91c19jbGllbnQiLCJjdGQiOjE1NTMwMDQxNTkxNTEsImVtbCI6IjYyMjM3NmY4LTAwMDAtMjIyMi1kN2Y5LTA3MGZhOTU2ZTk2M0Bhbm9ueW1vdXMuaW52YWxpZCIsImF1dGgiOiJINHNJQUFBQUFBQUFBSXVPQlFBcHUwd05BZ0FBQUE9PSIsImlzcyI6IlN5bmVyaXNlIiwiYnBpIjo0OCwiY2xJZCI6NDMzMjMwMjg4LCJleHAiOjE1NTMwMDcxNTksImFwayI6IjVBRUFBM0Q1LUUxNDctQzdFQi1ENTlFLUJDRjUwMTA5QTNEMSJ9.QOmSqrneR4mJFv4JdxTYsw_wGcDawDsVQuB-GVTcPPwijiP7lQ_Jzqq2Mypg1BS6WFlfGB8fzqCY9iMF_TdtjmoB4xBrY95ylU8L9qto-9Cw5x5TURkfxq31eryiHe2IteRAEtoVzYg2_s9QhlH6ANVcFOVp8dMno0V9bfMYfeSQa3FkjEbxFsseHkMOiADmp9-tOGtLXO942Ir-2W_Hz3Utlpt4erz0dVJBw8a-mFavPA8EEDWR7ACJNocrVHFkS3wFISh3LqLn6KkXiowaynKlJOEHGctuahzKmF3ZOJ1BvGgKohxF9OXvQs9IdmCfWhYsLr5Q2p04TJJ-MyvTipuggKVioh8mHmOFdfnN-Zused6tXzhZtKPUWTmM8cBKoAOBHExxcMQ8SVSjxnw_7_eLKm7S2wNpu0V-tiPZPCH4wYZXtWBYjmfy0V9ydjXnNunXfgxKixLeFNnONUXxEuqPLvM_xAuonQBXVN4nYrgJv8p8U6_ZlGMPjJq1szfcuBZnzI34LSEWx_nSof0XC5Czm8iG_ihG8naivNWS8h-Q-qKMP_3PPFsLSH4Egh03pH93EJUuNAeSO4RGfUX1wzMvrv1nBC1SM660uFMbq-wkplFBbKnHKMYe-qRs1-lZPG5PwPWJJdpGqOUzbnoMOJYmiq06OHHVQyJSkcEHLCk
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
              example:
                timestamp: 2019-03-19T14:03:35.413+00:00
                status: 401
                error: Unauthorized
                message: Could not fetch ApiKey
                path: /v2/auth/login/client/anonymous
      x-snr-doc-urls:
        - /api-reference/authorization#tag/Authorization-(deprecated)/operation/LogInAnonymouslyV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/v2/auth/login/client/anonymous \
              --header 'content-type: application/json' \
              --data '{"apiKey":"string","deviceId":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"apiKey\":\"string\",\"deviceId\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/sauth/v2/auth/login/client/anonymous", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "apiKey": "string",
              "deviceId": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f"
            });

            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/sauth/v2/auth/login/client/anonymous");
            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": "/sauth/v2/auth/login/client/anonymous",
              "headers": {
                "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({
              apiKey: 'string',
              deviceId: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/v2/auth/login/client/anonymous');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"apiKey":"string","deviceId":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f"}');

            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/sauth/v2/auth/login/client/anonymous")
              .header("content-type", "application/json")
              .body("{\"apiKey\":\"string\",\"deviceId\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}")
              .asString();
  /sauth/v3/auth/login/client:
    post:
      tags:
        - Authorization
      summary: Authenticate as Profile
      description: |
        Obtain a new JWT for a Profile. If an account for the Profile does not exist and the `identityProvider` is different than `SYNERISE`, this request creates an account.

        ---

        **Authentication:** Not required
      operationId: authenticateUsingPOST_v3
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-AuthenticationRequestV2_and_3"
      responses:
        "200":
          description: Profile authorization token
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-JWTtokenV3"
              example:
                token: eyJhbGciOiJSUzUxMiJ9.eyJzdinvalidwYmZkM2FkNDg2ZjQ3ZGRiMjE5MSIsImF1ZCI6IkFQSSIsInJsbSI6ImFub255bW91c19jbGllbnQiLCJjdGQiOjE1NTMwMDQxNTkxNTEsImVtbCI6IjYyMjM3NmY4LTAwMDAtMjIyMi1kN2Y5LTA3MGZhOTU2ZTk2M0Bhbm9ueW1vdXMuaW52YWxpZCIsImF1dGgiOiJINHNJQUFBQUFBQUFBSXVPQlFBcHUwd05BZ0FBQUE9PSIsImlzcyI6IlN5bmVyaXNlIiwiYnBpIjo0OCwiY2xJZCI6NDMzMjMwMjg4LCJleHAiOjE1NTMwMDcxNTksImFwayI6IjVBRUFBM0Q1LUUxNDctQzdFQi1ENTlFLUJDRjUwMTA5QTNEMSJ9.QOmSqrneR4mJFv4JdxTYsw_wGcDawDsVQuB-GVTcPPwijiP7lQ_Jzqq2Mypg1BS6WFlfGB8fzqCY9iMF_TdtjmoB4xBrY95ylU8L9qto-9Cw5x5TURkfxq31eryiHe2IteRAEtoVzYg2_s9QhlH6ANVcFOVp8dMno0V9bfMYfeSQa3FkjEbxFsseHkMOiADmp9-tOGtLXO942Ir-2W_Hz3Utlpt4erz0dVJBw8a-mFavPA8EEDWR7ACJNocrVHFkS3wFISh3LqLn6KkXiowaynKlJOEHGctuahzKmF3ZOJ1BvGgKohxF9OXvQs9IdmCfWhYsLr5Q2p04TJJ-MyvTipuggKVioh8mHmOFdfnN-Zused6tXzhZtKPUWTmM8cBKoAOBHExxcMQ8SVSjxnw_7_eLKm7S2wNpu0V-tiPZPCH4wYZXtWBYjmfy0V9ydjXnNunXfgxKixLeFNnONUXxEuqPLvM_xAuonQBXVN4nYrgJv8p8U6_ZlGMPjJq1szfcuBZnzI34LSEWx_nSof0XC5Czm8iG_ihG8naivNWS8h-Q-qKMP_3PPFsLSH4Egh03pH93EJUuNAeSO4RGfUX1wzMvrv1nBC1SM660uFMbq-wkplFBbKnHKMYe-qRs1-lZPG5PwPWJJdpGqOUzbnoMOJYmiq06OHHVQyJSkcEHLCk
        "400":
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/sauth-4xx-base"
                  - type: object
                    properties:
                      errorCode:
                        type: string
                        description: |
                          Error code, if applicable.
                          - `SAU-601`: Device ID is required and missing
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
              example:
                timestamp: 2018-06-07T07:17:41.734+00:00
                status: 401
                error: Unauthorized
                message: Access denied
                path: /v3/auth/login/client
                traceId: 61b4aa7c0cb1167a
        "403":
          $ref: "#/components/responses/sauth-403-login"
        "404":
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
              example:
                timestamp: 2018-06-07T07:17:41.734+00:00
                status: 404
                error: Not Found
                message: Account does not exist
                path: /v3/auth/login/client
                traceId: 61b4aa7c0cb1167a
        "406":
          $ref: "#/components/responses/sauth-406-account-locked"
        "423":
          $ref: "#/components/responses/sauth-423-device-control-enabled"
      deprecated: false
      x-snr-doc-urls:
        - /api-reference/authorization#tag/Authorization/operation/authenticateUsingPOST_v3
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/v3/auth/login/client \
              --header 'content-type: application/json' \
              --data '{"apiKey":"string","identityProvider":"SYNERISE","identityProviderToken":"string","email":"string","customId":null,"password":"string","uuid":"string","deviceId":"string","agreements":{"email":true,"sms":true,"push":true,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"apiKey\":\"string\",\"identityProvider\":\"SYNERISE\",\"identityProviderToken\":\"string\",\"email\":\"string\",\"customId\":null,\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/sauth/v3/auth/login/client", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "apiKey": "string",
              "identityProvider": "SYNERISE",
              "identityProviderToken": "string",
              "email": "string",
              "customId": null,
              "password": "string",
              "uuid": "string",
              "deviceId": "string",
              "agreements": {
                "email": true,
                "sms": true,
                "push": true,
                "bluetooth": false,
                "rfid": false,
                "wifi": false
              },
              "attributes": {
                "property1": null,
                "property2": null
              },
              "tags": [
                "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/sauth/v3/auth/login/client");
            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": "/sauth/v3/auth/login/client",
              "headers": {
                "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({
              apiKey: 'string',
              identityProvider: 'SYNERISE',
              identityProviderToken: 'string',
              email: 'string',
              customId: null,
              password: 'string',
              uuid: 'string',
              deviceId: 'string',
              agreements: {email: true, sms: true, push: true, bluetooth: false, rfid: false, wifi: false},
              attributes: {property1: null, property2: null},
              tags: ['string']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/v3/auth/login/client');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"apiKey":"string","identityProvider":"SYNERISE","identityProviderToken":"string","email":"string","customId":null,"password":"string","uuid":"string","deviceId":"string","agreements":{"email":true,"sms":true,"push":true,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["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/sauth/v3/auth/login/client")
              .header("content-type", "application/json")
              .body("{\"apiKey\":\"string\",\"identityProvider\":\"SYNERISE\",\"identityProviderToken\":\"string\",\"email\":\"string\",\"customId\":null,\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}")
              .asString();
  /sauth/v2/auth/server/login/client:
    post:
      deprecated: true
      tags:
        - Authorization (deprecated)
      summary: Authenticate as Profile
      description: |
        This method is deprecated. Use [the v3 method](#operation/authenticateViaServerV3) instead.

        Obtain a new JWT for a Profile. It is designed to be used from backend server. If an account for the Profile does not exist and the `identityProvider` is different than `SYNERISE`, this request creates an account.


        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `SAUTH_SERVER_LOGIN_CLIENT_CREATE`
      operationId: authenticateViaServerV2
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-ServerAuthenticationRequestV2_and_3"
      responses:
        "200":
          description: Profile authorization token
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-JWTtokenV3"
              example:
                token: eyJhbGciOiJSUzUxMiJ9.eyJzdinvalidwYmZkM2FkNDg2ZjQ3ZGRiMjE5MSIsImF1ZCI6IkFQSSIsInJsbSI6ImFub255bW91c19jbGllbnQiLCJjdGQiOjE1NTMwMDQxNTkxNTEsImVtbCI6IjYyMjM3NmY4LTAwMDAtMjIyMi1kN2Y5LTA3MGZhOTU2ZTk2M0Bhbm9ueW1vdXMuaW52YWxpZCIsImF1dGgiOiJINHNJQUFBQUFBQUFBSXVPQlFBcHUwd05BZ0FBQUE9PSIsImlzcyI6IlN5bmVyaXNlIiwiYnBpIjo0OCwiY2xJZCI6NDMzMjMwMjg4LCJleHAiOjE1NTMwMDcxNTksImFwayI6IjVBRUFBM0Q1LUUxNDctQzdFQi1ENTlFLUJDRjUwMTA5QTNEMSJ9.QOmSqrneR4mJFv4JdxTYsw_wGcDawDsVQuB-GVTcPPwijiP7lQ_Jzqq2Mypg1BS6WFlfGB8fzqCY9iMF_TdtjmoB4xBrY95ylU8L9qto-9Cw5x5TURkfxq31eryiHe2IteRAEtoVzYg2_s9QhlH6ANVcFOVp8dMno0V9bfMYfeSQa3FkjEbxFsseHkMOiADmp9-tOGtLXO942Ir-2W_Hz3Utlpt4erz0dVJBw8a-mFavPA8EEDWR7ACJNocrVHFkS3wFISh3LqLn6KkXiowaynKlJOEHGctuahzKmF3ZOJ1BvGgKohxF9OXvQs9IdmCfWhYsLr5Q2p04TJJ-MyvTipuggKVioh8mHmOFdfnN-Zused6tXzhZtKPUWTmM8cBKoAOBHExxcMQ8SVSjxnw_7_eLKm7S2wNpu0V-tiPZPCH4wYZXtWBYjmfy0V9ydjXnNunXfgxKixLeFNnONUXxEuqPLvM_xAuonQBXVN4nYrgJv8p8U6_ZlGMPjJq1szfcuBZnzI34LSEWx_nSof0XC5Czm8iG_ihG8naivNWS8h-Q-qKMP_3PPFsLSH4Egh03pH93EJUuNAeSO4RGfUX1wzMvrv1nBC1SM660uFMbq-wkplFBbKnHKMYe-qRs1-lZPG5PwPWJJdpGqOUzbnoMOJYmiq06OHHVQyJSkcEHLCk
        "400":
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/sauth-4xx-base"
                  - type: object
                    properties:
                      errorCode:
                        type: string
                        description: |
                          Error code, if applicable.
                          - `SAU-601`: Device ID is required and missing
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
              example:
                timestamp: 2018-06-07T07:17:41.734+00:00
                status: 401
                error: Unauthorized
                message: Access denied
                path: /v3/auth/login/client
                traceId: 61b4aa7c0cb1167a
        "403":
          $ref: "#/components/responses/sauth-403-login"
        "404":
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
              example:
                timestamp: 2018-06-07T07:17:41.734+00:00
                status: 404
                error: Not Found
                message: Account does not exist
                path: /v3/auth/login/client
                traceId: 61b4aa7c0cb1167a
        "406":
          $ref: "#/components/responses/sauth-406-account-locked"
        "423":
          $ref: "#/components/responses/sauth-423-device-control-enabled"
      x-snr-doc-urls:
        - /api-reference/authorization#tag/Authorization-(deprecated)/operation/authenticateViaServerV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/v2/auth/server/login/client \
              --header 'content-type: application/json' \
              --data '{"ipAddress":"string","apiKey":"string","identityProvider":"SYNERISE","identityProviderToken":"string","email":"string","customId":null,"password":"string","uuid":"string","deviceId":"string","agreements":{"email":true,"sms":true,"push":true,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"ipAddress\":\"string\",\"apiKey\":\"string\",\"identityProvider\":\"SYNERISE\",\"identityProviderToken\":\"string\",\"email\":\"string\",\"customId\":null,\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/sauth/v2/auth/server/login/client", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "ipAddress": "string",
              "apiKey": "string",
              "identityProvider": "SYNERISE",
              "identityProviderToken": "string",
              "email": "string",
              "customId": null,
              "password": "string",
              "uuid": "string",
              "deviceId": "string",
              "agreements": {
                "email": true,
                "sms": true,
                "push": true,
                "bluetooth": false,
                "rfid": false,
                "wifi": false
              },
              "attributes": {
                "property1": null,
                "property2": null
              },
              "tags": [
                "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/sauth/v2/auth/server/login/client");
            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": "/sauth/v2/auth/server/login/client",
              "headers": {
                "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({
              ipAddress: 'string',
              apiKey: 'string',
              identityProvider: 'SYNERISE',
              identityProviderToken: 'string',
              email: 'string',
              customId: null,
              password: 'string',
              uuid: 'string',
              deviceId: 'string',
              agreements: {email: true, sms: true, push: true, bluetooth: false, rfid: false, wifi: false},
              attributes: {property1: null, property2: null},
              tags: ['string']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/v2/auth/server/login/client');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"ipAddress":"string","apiKey":"string","identityProvider":"SYNERISE","identityProviderToken":"string","email":"string","customId":null,"password":"string","uuid":"string","deviceId":"string","agreements":{"email":true,"sms":true,"push":true,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["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/sauth/v2/auth/server/login/client")
              .header("content-type", "application/json")
              .body("{\"ipAddress\":\"string\",\"apiKey\":\"string\",\"identityProvider\":\"SYNERISE\",\"identityProviderToken\":\"string\",\"email\":\"string\",\"customId\":null,\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}")
              .asString();
  /sauth/v3/auth/server/login/client:
    post:
      tags:
        - Authorization
      summary: Authenticate Profile with a server
      description: |
        Obtain a new JWT for a Profile. This method is designed to be used from a backend server that handles login requests and communicates with Synerise to execute them.  
        If an account for the Profile does not exist and the `identityProvider` is different than `SYNERISE`, this request creates an account.


        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `SAUTH_SERVER_LOGIN_CLIENT_CREATE`
      operationId: authenticateViaServerV3
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-ServerAuthenticationRequestV2_and_3"
      responses:
        "200":
          description: Profile authorization token
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-JWTtokenV3"
              example:
                token: eyJhbGciOiJSUzUxMiJ9.eyJzdinvalidwYmZkM2FkNDg2ZjQ3ZGRiMjE5MSIsImF1ZCI6IkFQSSIsInJsbSI6ImFub255bW91c19jbGllbnQiLCJjdGQiOjE1NTMwMDQxNTkxNTEsImVtbCI6IjYyMjM3NmY4LTAwMDAtMjIyMi1kN2Y5LTA3MGZhOTU2ZTk2M0Bhbm9ueW1vdXMuaW52YWxpZCIsImF1dGgiOiJINHNJQUFBQUFBQUFBSXVPQlFBcHUwd05BZ0FBQUE9PSIsImlzcyI6IlN5bmVyaXNlIiwiYnBpIjo0OCwiY2xJZCI6NDMzMjMwMjg4LCJleHAiOjE1NTMwMDcxNTksImFwayI6IjVBRUFBM0Q1LUUxNDctQzdFQi1ENTlFLUJDRjUwMTA5QTNEMSJ9.QOmSqrneR4mJFv4JdxTYsw_wGcDawDsVQuB-GVTcPPwijiP7lQ_Jzqq2Mypg1BS6WFlfGB8fzqCY9iMF_TdtjmoB4xBrY95ylU8L9qto-9Cw5x5TURkfxq31eryiHe2IteRAEtoVzYg2_s9QhlH6ANVcFOVp8dMno0V9bfMYfeSQa3FkjEbxFsseHkMOiADmp9-tOGtLXO942Ir-2W_Hz3Utlpt4erz0dVJBw8a-mFavPA8EEDWR7ACJNocrVHFkS3wFISh3LqLn6KkXiowaynKlJOEHGctuahzKmF3ZOJ1BvGgKohxF9OXvQs9IdmCfWhYsLr5Q2p04TJJ-MyvTipuggKVioh8mHmOFdfnN-Zused6tXzhZtKPUWTmM8cBKoAOBHExxcMQ8SVSjxnw_7_eLKm7S2wNpu0V-tiPZPCH4wYZXtWBYjmfy0V9ydjXnNunXfgxKixLeFNnONUXxEuqPLvM_xAuonQBXVN4nYrgJv8p8U6_ZlGMPjJq1szfcuBZnzI34LSEWx_nSof0XC5Czm8iG_ihG8naivNWS8h-Q-qKMP_3PPFsLSH4Egh03pH93EJUuNAeSO4RGfUX1wzMvrv1nBC1SM660uFMbq-wkplFBbKnHKMYe-qRs1-lZPG5PwPWJJdpGqOUzbnoMOJYmiq06OHHVQyJSkcEHLCk
        "400":
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/sauth-4xx-base"
                  - type: object
                    properties:
                      errorCode:
                        type: string
                        description: |
                          Error code, if applicable.
                          - `SAU-601`: Device ID is required and missing
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
              example:
                timestamp: 2018-06-07T07:17:41.734+00:00
                status: 401
                error: Unauthorized
                message: Access denied
                path: /v3/auth/login/client
                traceId: 61b4aa7c0cb1167a
        "403":
          $ref: "#/components/responses/sauth-403-login"
        "404":
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
              example:
                timestamp: 2018-06-07T07:17:41.734+00:00
                status: 404
                error: Not Found
                message: Account does not exist
                path: /v3/auth/login/client
                traceId: 61b4aa7c0cb1167a
        "406":
          $ref: "#/components/responses/sauth-406-account-locked"
        "423":
          $ref: "#/components/responses/sauth-423-device-control-enabled"
      deprecated: false
      x-snr-doc-urls:
        - /api-reference/authorization#tag/Authorization/operation/authenticateViaServerV3
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/v3/auth/server/login/client \
              --header 'content-type: application/json' \
              --data '{"ipAddress":"string","apiKey":"string","identityProvider":"SYNERISE","identityProviderToken":"string","email":"string","customId":null,"password":"string","uuid":"string","deviceId":"string","agreements":{"email":true,"sms":true,"push":true,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"ipAddress\":\"string\",\"apiKey\":\"string\",\"identityProvider\":\"SYNERISE\",\"identityProviderToken\":\"string\",\"email\":\"string\",\"customId\":null,\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/sauth/v3/auth/server/login/client", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "ipAddress": "string",
              "apiKey": "string",
              "identityProvider": "SYNERISE",
              "identityProviderToken": "string",
              "email": "string",
              "customId": null,
              "password": "string",
              "uuid": "string",
              "deviceId": "string",
              "agreements": {
                "email": true,
                "sms": true,
                "push": true,
                "bluetooth": false,
                "rfid": false,
                "wifi": false
              },
              "attributes": {
                "property1": null,
                "property2": null
              },
              "tags": [
                "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/sauth/v3/auth/server/login/client");
            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": "/sauth/v3/auth/server/login/client",
              "headers": {
                "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({
              ipAddress: 'string',
              apiKey: 'string',
              identityProvider: 'SYNERISE',
              identityProviderToken: 'string',
              email: 'string',
              customId: null,
              password: 'string',
              uuid: 'string',
              deviceId: 'string',
              agreements: {email: true, sms: true, push: true, bluetooth: false, rfid: false, wifi: false},
              attributes: {property1: null, property2: null},
              tags: ['string']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/v3/auth/server/login/client');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"ipAddress":"string","apiKey":"string","identityProvider":"SYNERISE","identityProviderToken":"string","email":"string","customId":null,"password":"string","uuid":"string","deviceId":"string","agreements":{"email":true,"sms":true,"push":true,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["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/sauth/v3/auth/server/login/client")
              .header("content-type", "application/json")
              .body("{\"ipAddress\":\"string\",\"apiKey\":\"string\",\"identityProvider\":\"SYNERISE\",\"identityProviderToken\":\"string\",\"email\":\"string\",\"customId\":null,\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}")
              .asString();
  /sauth/v3/auth/login/client/conditional:
    post:
      summary: Authenticate as Profile (conditional)
      description: |
        Obtain a new JWT token for a Profile.

        - If the account does not exist, an account is not created.
        - If any additional conditions are required for logging in, the response is HTTP200 and lists the conditions.
        - Note that using this endpoint requires authenticating as an anonymous Profile first.


        ---

        **Authentication:** Not required
      security:
        - JWT: []
      tags:
        - Authorization
      operationId: authenticateConditionalUsingPOSTv3
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-AuthenticationRequestV2_and_3"
      responses:
        "200":
          description: Details of the login operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-ConditionalAuthenticationResponseV3"
        "400":
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/sauth-4xx-base"
                  - type: object
                    properties:
                      errorCode:
                        type: string
                        description: |
                          Error code, if applicable.
                          - `SAU-601`: Device ID is required and missing
        "401":
          description: See error message for details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
        "403":
          $ref: "#/components/responses/sauth-403-login"
        "404":
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
              example:
                timestamp: 2018-06-07T07:17:41.734+00:00
                status: 404
                error: Not Found
                message: Account does not exist
                path: /v3/auth/login/client/conditional
                traceId: 61b4aa7c0cb1167a
        "406":
          $ref: "#/components/responses/sauth-406-account-locked"
        "423":
          $ref: "#/components/responses/sauth-423-device-control-enabled"
      deprecated: false
      x-snr-doc-urls:
        - /api-reference/authorization#tag/Authorization/operation/authenticateConditionalUsingPOSTv3
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/v3/auth/login/client/conditional \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"apiKey":"string","identityProvider":"SYNERISE","identityProviderToken":"string","email":"string","customId":null,"password":"string","uuid":"string","deviceId":"string","agreements":{"email":true,"sms":true,"push":true,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"apiKey\":\"string\",\"identityProvider\":\"SYNERISE\",\"identityProviderToken\":\"string\",\"email\":\"string\",\"customId\":null,\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/sauth/v3/auth/login/client/conditional", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "apiKey": "string",
              "identityProvider": "SYNERISE",
              "identityProviderToken": "string",
              "email": "string",
              "customId": null,
              "password": "string",
              "uuid": "string",
              "deviceId": "string",
              "agreements": {
                "email": true,
                "sms": true,
                "push": true,
                "bluetooth": false,
                "rfid": false,
                "wifi": false
              },
              "attributes": {
                "property1": null,
                "property2": null
              },
              "tags": [
                "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/sauth/v3/auth/login/client/conditional");
            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": "/sauth/v3/auth/login/client/conditional",
              "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({
              apiKey: 'string',
              identityProvider: 'SYNERISE',
              identityProviderToken: 'string',
              email: 'string',
              customId: null,
              password: 'string',
              uuid: 'string',
              deviceId: 'string',
              agreements: {email: true, sms: true, push: true, bluetooth: false, rfid: false, wifi: false},
              attributes: {property1: null, property2: null},
              tags: ['string']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/v3/auth/login/client/conditional');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"apiKey":"string","identityProvider":"SYNERISE","identityProviderToken":"string","email":"string","customId":null,"password":"string","uuid":"string","deviceId":"string","agreements":{"email":true,"sms":true,"push":true,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["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/sauth/v3/auth/login/client/conditional")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"apiKey\":\"string\",\"identityProvider\":\"SYNERISE\",\"identityProviderToken\":\"string\",\"email\":\"string\",\"customId\":null,\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}")
              .asString();
  /sauth/v3/auth/login/client/anonymous:
    post:
      tags:
        - Authorization
      summary: Authenticate anonymously
      description: |
        Obtain a new JWT for an anonymous Profile. The token can be used and refreshed in the same way as tokens of registered Profiles.

        ---

        **Authentication:** Not required
      operationId: LogInAnonymouslyV3
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-LogInAnonymouslyV3RequestBody"
        required: true
      responses:
        "200":
          description: Anonymous authorization token
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-JWTtokenV3"
              example:
                token: eyJhbGciOiJSUzUxMiJ9.eyJzdinvalidwYmZkM2FkNDg2ZjQ3ZGRiMjE5MSIsImF1ZCI6IkFQSSIsInJsbSI6ImFub255bW91c19jbGllbnQiLCJjdGQiOjE1NTMwMDQxNTkxNTEsImVtbCI6IjYyMjM3NmY4LTAwMDAtMjIyMi1kN2Y5LTA3MGZhOTU2ZTk2M0Bhbm9ueW1vdXMuaW52YWxpZCIsImF1dGgiOiJINHNJQUFBQUFBQUFBSXVPQlFBcHUwd05BZ0FBQUE9PSIsImlzcyI6IlN5bmVyaXNlIiwiYnBpIjo0OCwiY2xJZCI6NDMzMjMwMjg4LCJleHAiOjE1NTMwMDcxNTksImFwayI6IjVBRUFBM0Q1LUUxNDctQzdFQi1ENTlFLUJDRjUwMTA5QTNEMSJ9.QOmSqrneR4mJFv4JdxTYsw_wGcDawDsVQuB-GVTcPPwijiP7lQ_Jzqq2Mypg1BS6WFlfGB8fzqCY9iMF_TdtjmoB4xBrY95ylU8L9qto-9Cw5x5TURkfxq31eryiHe2IteRAEtoVzYg2_s9QhlH6ANVcFOVp8dMno0V9bfMYfeSQa3FkjEbxFsseHkMOiADmp9-tOGtLXO942Ir-2W_Hz3Utlpt4erz0dVJBw8a-mFavPA8EEDWR7ACJNocrVHFkS3wFISh3LqLn6KkXiowaynKlJOEHGctuahzKmF3ZOJ1BvGgKohxF9OXvQs9IdmCfWhYsLr5Q2p04TJJ-MyvTipuggKVioh8mHmOFdfnN-Zused6tXzhZtKPUWTmM8cBKoAOBHExxcMQ8SVSjxnw_7_eLKm7S2wNpu0V-tiPZPCH4wYZXtWBYjmfy0V9ydjXnNunXfgxKixLeFNnONUXxEuqPLvM_xAuonQBXVN4nYrgJv8p8U6_ZlGMPjJq1szfcuBZnzI34LSEWx_nSof0XC5Czm8iG_ihG8naivNWS8h-Q-qKMP_3PPFsLSH4Egh03pH93EJUuNAeSO4RGfUX1wzMvrv1nBC1SM660uFMbq-wkplFBbKnHKMYe-qRs1-lZPG5PwPWJJdpGqOUzbnoMOJYmiq06OHHVQyJSkcEHLCk
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
              example:
                timestamp: 2019-03-19T14:03:35.413+00:00
                status: 401
                error: Unauthorized
                message: Could not fetch ApiKey
                path: /v3/auth/login/client/anonymous
      x-snr-doc-urls:
        - /api-reference/authorization#tag/Authorization/operation/LogInAnonymouslyV3
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/v3/auth/login/client/anonymous \
              --header 'content-type: application/json' \
              --data '{"apiKey":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"apiKey\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\"}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/sauth/v3/auth/login/client/anonymous", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "apiKey": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "deviceId": "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/sauth/v3/auth/login/client/anonymous");
            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": "/sauth/v3/auth/login/client/anonymous",
              "headers": {
                "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({
              apiKey: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              deviceId: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/v3/auth/login/client/anonymous');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"apiKey":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"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/sauth/v3/auth/login/client/anonymous")
              .header("content-type", "application/json")
              .body("{\"apiKey\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\"}")
              .asString();
  /sauth/v2/my-account/delete:
    post:
      tags:
        - Profile account management
      summary: Delete account
      description: |
        A Profile can delete its own account. Its history shows an `client.deleteAccount` event. All marketing agreements are cancelled. The profile is signed out on all devices and cannot sign in again.


        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: deleteAccountUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-DeleteAccountV2RequestBody"
        required: true
      responses:
        "200":
          description: Account deleted
        "400":
          $ref: "#/components/responses/sauth-400-malformed"
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-invalid-credentials-in-body"
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/deleteAccountUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/v2/my-account/delete \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"password":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","externalToken":"string","customId":"string","identityProvider":"FACEBOOK","deviceId":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"password\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"externalToken\":\"string\",\"customId\":\"string\",\"identityProvider\":\"FACEBOOK\",\"deviceId\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/sauth/v2/my-account/delete", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "password": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "externalToken": "string",
              "customId": "string",
              "identityProvider": "FACEBOOK",
              "deviceId": "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/sauth/v2/my-account/delete");
            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": "/sauth/v2/my-account/delete",
              "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({
              password: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              externalToken: 'string',
              customId: 'string',
              identityProvider: 'FACEBOOK',
              deviceId: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/v2/my-account/delete');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"password":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","externalToken":"string","customId":"string","identityProvider":"FACEBOOK","deviceId":"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/sauth/v2/my-account/delete")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"password\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"externalToken\":\"string\",\"customId\":\"string\",\"identityProvider\":\"FACEBOOK\",\"deviceId\":\"string\"}")
              .asString();
  /sauth/v2/my-account/email-change/request:
    post:
      tags:
        - Profile account management
      summary: Request Profile email change
      description: |
        A Profile can request an email change for its own account. A confirmation token is sent to the new email by and must be applied by clicking the link in the message or using the [Confirm Profile email change](#operation/confirmClientEmailChange) endpoint.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: changeEmailRequestUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-GenericClientEmailChangeRequest"
      responses:
        "200":
          description: Email change requested, confirmation token sent to new email
        "400":
          $ref: "#/components/responses/sauth-400-malformed"
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-invalid-credentials-in-body"
        "404":
          description: Not Found
          content: {}
      deprecated: false
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/changeEmailRequestUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/v2/my-account/email-change/request \
              --header 'content-type: application/json' \
              --data '{"email":"string","externalToken":"string","password":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string","customId":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"email\":\"string\",\"externalToken\":\"string\",\"password\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"customId\":\"string\"}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/sauth/v2/my-account/email-change/request", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "string",
              "externalToken": "string",
              "password": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "deviceId": "string",
              "customId": "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/sauth/v2/my-account/email-change/request");
            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": "/sauth/v2/my-account/email-change/request",
              "headers": {
                "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({
              email: 'string',
              externalToken: 'string',
              password: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              deviceId: 'string',
              customId: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/v2/my-account/email-change/request');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"email":"string","externalToken":"string","password":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string","customId":"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/sauth/v2/my-account/email-change/request")
              .header("content-type", "application/json")
              .body("{\"email\":\"string\",\"externalToken\":\"string\",\"password\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"customId\":\"string\"}")
              .asString();
  /sauth/v3/my-account/logout:
    post:
      tags:
        - Profile account management
      summary: Log out a Profile
      description: |
        Log out a Profile when authenticated as that Profile.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, ANONYMOUS_CLIENT_CONDITIONAL
      operationId: logoutUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-ClientLogoutRequest"
      responses:
        "200":
          description: OK
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-forbidden"
        "404":
          description: Profile not found
      deprecated: false
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/logoutUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/v3/my-account/logout \
              --header 'content-type: application/json' \
              --data '{"action":"LOGOUT"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"action\":\"LOGOUT\"}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/sauth/v3/my-account/logout", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "action": "LOGOUT"
            });

            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/sauth/v3/my-account/logout");
            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": "/sauth/v3/my-account/logout",
              "headers": {
                "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({action: 'LOGOUT'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/v3/my-account/logout');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"action":"LOGOUT"}');

            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/sauth/v3/my-account/logout")
              .header("content-type", "application/json")
              .body("{\"action\":\"LOGOUT\"}")
              .asString();
  /sauth/my-account/email-change/confirmation:
    post:
      tags:
        - Profile account management
      summary: Confirm Profile email change
      description: |
        The Profile can confirm the email change by providing the token that they received by email as a result of the [Request a Profile email change](#operation/changeEmailRequestUsingPOST) call.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: confirmClientEmailChange
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-ConfirmClientEmailChangeRequestBody"
            example: '{"token":"token_from_email_change_mail","newsletterAgreement":true}'
        required: true
      responses:
        "200":
          description: Request accepted
        "400":
          $ref: "#/components/responses/sauth-400-malformed"
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          description: Invalid confirmation token
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/confirmClientEmailChange
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/my-account/email-change/confirmation \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"token":"58acd5bd-8efd-47ed-b101-32eb56e13839","newsletterAgreement":true}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"token\":\"58acd5bd-8efd-47ed-b101-32eb56e13839\",\"newsletterAgreement\":true}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/sauth/my-account/email-change/confirmation", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "token": "58acd5bd-8efd-47ed-b101-32eb56e13839",
              "newsletterAgreement": 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/sauth/my-account/email-change/confirmation");
            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": "/sauth/my-account/email-change/confirmation",
              "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({token: '58acd5bd-8efd-47ed-b101-32eb56e13839', newsletterAgreement: true}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/my-account/email-change/confirmation');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"token":"58acd5bd-8efd-47ed-b101-32eb56e13839","newsletterAgreement":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/sauth/my-account/email-change/confirmation")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"token\":\"58acd5bd-8efd-47ed-b101-32eb56e13839\",\"newsletterAgreement\":true}")
              .asString();
  /sauth/clients/facebook/email-change/request:
    post:
      tags:
        - Profile account management
      summary: Change Facebook Profile email
      description: |
        Change the email address of a Profile registered by Facebook

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: changeEmailUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-ClientEmailChangeRequest"
        required: true
      responses:
        "200":
          description: OK
          content: {}
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-forbidden"
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/changeEmailUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/clients/facebook/email-change/request \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"email":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"email\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/sauth/clients/facebook/email-change/request", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "deviceId": "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/sauth/clients/facebook/email-change/request");
            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": "/sauth/clients/facebook/email-change/request",
              "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({
              email: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              deviceId: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/clients/facebook/email-change/request');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"email":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"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/sauth/clients/facebook/email-change/request")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"email\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\"}")
              .asString();
  /sauth/management/client/{clientID}/logout:
    post:
      tags:
        - Profile management
      summary: Log out a Profile
      description: |
        Log out a Profile when authenticated as a Synerise User or a 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:** `SAUTH_LOGOUT_CLIENT_CREATE`

        **User role permission required:** `settings_customers_iam: create`
      operationId: logoutClientUsingPOST
      parameters:
        - $ref: "#/components/parameters/sauth-pathClientId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-ClientLogoutRequest"
      responses:
        "200":
          description: OK
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-forbidden"
        "404":
          description: Profile not found
      deprecated: false
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/logoutClientUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/management/client/434428563/logout \
              --header 'content-type: application/json' \
              --data '{"action":"LOGOUT"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"action\":\"LOGOUT\"}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/sauth/management/client/434428563/logout", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "action": "LOGOUT"
            });

            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/sauth/management/client/434428563/logout");
            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": "/sauth/management/client/434428563/logout",
              "headers": {
                "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({action: 'LOGOUT'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/management/client/434428563/logout');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"action":"LOGOUT"}');

            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/sauth/management/client/434428563/logout")
              .header("content-type", "application/json")
              .body("{\"action\":\"LOGOUT\"}")
              .asString();
  /sauth/settings/ban:
    get:
      tags:
        - Settings
      summary: Get ban settings
      description: |
        Retrieve the configuration of applying bans after a number of failed logins.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_customers_iam_locking_policy: read`
      operationId: getBanSettingsUsingGET
      security:
        - JWT: []
      responses:
        "200":
          description: Current settings
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-BanSettingsPayload"
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-forbidden"
        "404":
          description: Not Found
          content: {}
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Settings/operation/getBanSettingsUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/sauth/settings/ban \
              --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", "/sauth/settings/ban", 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/sauth/settings/ban");
            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": "/sauth/settings/ban",
              "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/sauth/settings/ban');
            $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/sauth/settings/ban")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - Settings
      summary: Update ban settings
      description: |
        Update the configuration of applying bans after a number of failed logins.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_customers_iam_locking_policy: update`
      operationId: updateBanSettingsUsingPOST
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-BanSettingsPayload"
        required: true
      responses:
        "200":
          description: Current settings
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-BanSettingsPayload"
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-forbidden"
        "404":
          description: Not Found
          content: {}
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Settings/operation/updateBanSettingsUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/settings/ban \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"blockingForClientEnabled":true,"firstBanCollectingTime":0,"firstBanDuration":0,"firstBanThreshold":0,"secondBanCollectingTime":0,"secondBanDuration":0,"secondBanThreshold":0,"permanentBanCollectingTime":0,"permanentBanDuration":0,"permanentBanThreshold":0}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"blockingForClientEnabled\":true,\"firstBanCollectingTime\":0,\"firstBanDuration\":0,\"firstBanThreshold\":0,\"secondBanCollectingTime\":0,\"secondBanDuration\":0,\"secondBanThreshold\":0,\"permanentBanCollectingTime\":0,\"permanentBanDuration\":0,\"permanentBanThreshold\":0}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/sauth/settings/ban", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "blockingForClientEnabled": true,
              "firstBanCollectingTime": 0,
              "firstBanDuration": 0,
              "firstBanThreshold": 0,
              "secondBanCollectingTime": 0,
              "secondBanDuration": 0,
              "secondBanThreshold": 0,
              "permanentBanCollectingTime": 0,
              "permanentBanDuration": 0,
              "permanentBanThreshold": 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/sauth/settings/ban");
            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": "/sauth/settings/ban",
              "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({
              blockingForClientEnabled: true,
              firstBanCollectingTime: 0,
              firstBanDuration: 0,
              firstBanThreshold: 0,
              secondBanCollectingTime: 0,
              secondBanDuration: 0,
              secondBanThreshold: 0,
              permanentBanCollectingTime: 0,
              permanentBanDuration: 0,
              permanentBanThreshold: 0
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/settings/ban');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"blockingForClientEnabled":true,"firstBanCollectingTime":0,"firstBanDuration":0,"firstBanThreshold":0,"secondBanCollectingTime":0,"secondBanDuration":0,"secondBanThreshold":0,"permanentBanCollectingTime":0,"permanentBanDuration":0,"permanentBanThreshold":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/sauth/settings/ban")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"blockingForClientEnabled\":true,\"firstBanCollectingTime\":0,\"firstBanDuration\":0,\"firstBanThreshold\":0,\"secondBanCollectingTime\":0,\"secondBanDuration\":0,\"secondBanThreshold\":0,\"permanentBanCollectingTime\":0,\"permanentBanDuration\":0,\"permanentBanThreshold\":0}")
              .asString();
  /sauth/settings/templates:
    get:
      security:
        - JWT: []
      tags:
        - Settings
      summary: Get email template settings
      operationId: getTemplateSettingsUsingGET
      description: |
        Get settings for email templates.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_customers_iam_account_confirmation: read`
      responses:
        "200":
          description: Current settings
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-TemplateSettingsData"
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      deprecated: false
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Settings/operation/getTemplateSettingsUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/sauth/settings/templates \
              --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", "/sauth/settings/templates", 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/sauth/settings/templates");
            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": "/sauth/settings/templates",
              "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/sauth/settings/templates');
            $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/sauth/settings/templates")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      security:
        - JWT: []
      tags:
        - Settings
      summary: Update email template settings
      operationId: updateTemplateSettingsUsingPOST
      description: |
        Update email template settings. **Omitted settings are reset to null!**

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_customers_iam_account_confirmation: update`
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-TemplateSettingsData"
        required: true
      responses:
        "200":
          description: Current settings
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-TemplateSettingsData"
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      deprecated: false
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Settings/operation/updateTemplateSettingsUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/settings/templates \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"clientEmailChangeRequestMailSubject":"string","clientEmailChangeRequestMailBody":"string","clientEmailChangeRequestMailTemplateId":"string","clientEmailChangeNotificationMailSubject":"string","clientEmailChangeNotificationMailBody":"string","clientEmailChangeNotificationMailTemplateId":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"clientEmailChangeRequestMailSubject\":\"string\",\"clientEmailChangeRequestMailBody\":\"string\",\"clientEmailChangeRequestMailTemplateId\":\"string\",\"clientEmailChangeNotificationMailSubject\":\"string\",\"clientEmailChangeNotificationMailBody\":\"string\",\"clientEmailChangeNotificationMailTemplateId\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/sauth/settings/templates", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "clientEmailChangeRequestMailSubject": "string",
              "clientEmailChangeRequestMailBody": "string",
              "clientEmailChangeRequestMailTemplateId": "string",
              "clientEmailChangeNotificationMailSubject": "string",
              "clientEmailChangeNotificationMailBody": "string",
              "clientEmailChangeNotificationMailTemplateId": "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/sauth/settings/templates");
            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": "/sauth/settings/templates",
              "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({
              clientEmailChangeRequestMailSubject: 'string',
              clientEmailChangeRequestMailBody: 'string',
              clientEmailChangeRequestMailTemplateId: 'string',
              clientEmailChangeNotificationMailSubject: 'string',
              clientEmailChangeNotificationMailBody: 'string',
              clientEmailChangeNotificationMailTemplateId: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/settings/templates');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"clientEmailChangeRequestMailSubject":"string","clientEmailChangeRequestMailBody":"string","clientEmailChangeRequestMailTemplateId":"string","clientEmailChangeNotificationMailSubject":"string","clientEmailChangeNotificationMailBody":"string","clientEmailChangeNotificationMailTemplateId":"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/sauth/settings/templates")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"clientEmailChangeRequestMailSubject\":\"string\",\"clientEmailChangeRequestMailBody\":\"string\",\"clientEmailChangeRequestMailTemplateId\":\"string\",\"clientEmailChangeNotificationMailSubject\":\"string\",\"clientEmailChangeNotificationMailBody\":\"string\",\"clientEmailChangeNotificationMailTemplateId\":\"string\"}")
              .asString();
  /sauth/settings/device-control:
    get:
      tags:
        - Settings
      summary: Get device authorization settings
      description: |
        Retrieve the settings related to authorization of logins from unknown devices.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_customers_iam_locking_policy: read`
      operationId: getDeviceControlSettingsUsingGET
      security:
        - JWT: []
      responses:
        "200":
          description: Current settings
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-DeviceControlSettingsPayload"
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-forbidden"
        "404":
          description: Not Found
          content: {}
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Settings/operation/getDeviceControlSettingsUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/sauth/settings/device-control \
              --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", "/sauth/settings/device-control", 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/sauth/settings/device-control");
            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": "/sauth/settings/device-control",
              "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/sauth/settings/device-control');
            $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/sauth/settings/device-control")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - Settings
      summary: Update device authorization settings
      description: |
        Update the settings related to authorization of logins from unknown devices.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_customers_iam_locking_policy: update`
      operationId: updateDeviceSettingsUsingPOST
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-DeviceControlSettingsPayload"
        required: true
      responses:
        "200":
          description: Current settings
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-DeviceControlSettingsPayload"
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-forbidden"
        "404":
          description: Not Found
          content: {}
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Settings/operation/updateDeviceSettingsUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/settings/device-control \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"deviceControlMode":"OFF","hardMailBody":"string","hardMailTitle":"string","hardTemplateId":"string","softMailBody":"string","softMailTitle":"string","softTemplateId":"string","deviceUnlockSuccessRedirectUrl":"string","deviceUnlockAlreadyConfirmedRedirectUrl":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"deviceControlMode\":\"OFF\",\"hardMailBody\":\"string\",\"hardMailTitle\":\"string\",\"hardTemplateId\":\"string\",\"softMailBody\":\"string\",\"softMailTitle\":\"string\",\"softTemplateId\":\"string\",\"deviceUnlockSuccessRedirectUrl\":\"string\",\"deviceUnlockAlreadyConfirmedRedirectUrl\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/sauth/settings/device-control", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "deviceControlMode": "OFF",
              "hardMailBody": "string",
              "hardMailTitle": "string",
              "hardTemplateId": "string",
              "softMailBody": "string",
              "softMailTitle": "string",
              "softTemplateId": "string",
              "deviceUnlockSuccessRedirectUrl": "string",
              "deviceUnlockAlreadyConfirmedRedirectUrl": "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/sauth/settings/device-control");
            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": "/sauth/settings/device-control",
              "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({
              deviceControlMode: 'OFF',
              hardMailBody: 'string',
              hardMailTitle: 'string',
              hardTemplateId: 'string',
              softMailBody: 'string',
              softMailTitle: 'string',
              softTemplateId: 'string',
              deviceUnlockSuccessRedirectUrl: 'string',
              deviceUnlockAlreadyConfirmedRedirectUrl: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/settings/device-control');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"deviceControlMode":"OFF","hardMailBody":"string","hardMailTitle":"string","hardTemplateId":"string","softMailBody":"string","softMailTitle":"string","softTemplateId":"string","deviceUnlockSuccessRedirectUrl":"string","deviceUnlockAlreadyConfirmedRedirectUrl":"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/sauth/settings/device-control")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"deviceControlMode\":\"OFF\",\"hardMailBody\":\"string\",\"hardMailTitle\":\"string\",\"hardTemplateId\":\"string\",\"softMailBody\":\"string\",\"softMailTitle\":\"string\",\"softTemplateId\":\"string\",\"deviceUnlockSuccessRedirectUrl\":\"string\",\"deviceUnlockAlreadyConfirmedRedirectUrl\":\"string\"}")
              .asString();
  /sauth/settings/general:
    get:
      security:
        - JWT: []
      tags:
        - Settings
      summary: Get general settings
      operationId: getGeneralConfigUsingGET
      description: |
        Retrieve the general settings of 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:** `settings_customers_iam_account_confirmation: read`
      responses:
        "200":
          description: Current settings
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-GeneralSettingsData"
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      deprecated: false
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Settings/operation/getGeneralConfigUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/sauth/settings/general \
              --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", "/sauth/settings/general", 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/sauth/settings/general");
            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": "/sauth/settings/general",
              "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/sauth/settings/general');
            $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/sauth/settings/general")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - Settings
      security:
        - JWT: []
      summary: Update general settings
      operationId: updateGeneralSettingsUsingPOST
      description: |
        Update general settings. **Settings omitted in the request are reset to default!**.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_customers_iam_account_confirmation: update`
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-GeneralSettingsData"
        required: true
      responses:
        "200":
          description: New settings
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-GeneralSettingsData"
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      deprecated: false
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Settings/operation/updateGeneralSettingsUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/settings/general \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"tokenLifetimeInSeconds":0,"voucherPoolUuid":null,"allowOverwriteCustomIdentify":false,"allowOverwriteExternalId":false,"allowEmailChangeFromWebForm":false,"allowToPassCustomIdentifyWithVoucherPool":false}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"tokenLifetimeInSeconds\":0,\"voucherPoolUuid\":null,\"allowOverwriteCustomIdentify\":false,\"allowOverwriteExternalId\":false,\"allowEmailChangeFromWebForm\":false,\"allowToPassCustomIdentifyWithVoucherPool\":false}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/sauth/settings/general", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "tokenLifetimeInSeconds": 0,
              "voucherPoolUuid": null,
              "allowOverwriteCustomIdentify": false,
              "allowOverwriteExternalId": false,
              "allowEmailChangeFromWebForm": false,
              "allowToPassCustomIdentifyWithVoucherPool": 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/sauth/settings/general");
            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": "/sauth/settings/general",
              "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({
              tokenLifetimeInSeconds: 0,
              voucherPoolUuid: null,
              allowOverwriteCustomIdentify: false,
              allowOverwriteExternalId: false,
              allowEmailChangeFromWebForm: false,
              allowToPassCustomIdentifyWithVoucherPool: false
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/settings/general');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"tokenLifetimeInSeconds":0,"voucherPoolUuid":null,"allowOverwriteCustomIdentify":false,"allowOverwriteExternalId":false,"allowEmailChangeFromWebForm":false,"allowToPassCustomIdentifyWithVoucherPool":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/sauth/settings/general")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"tokenLifetimeInSeconds\":0,\"voucherPoolUuid\":null,\"allowOverwriteCustomIdentify\":false,\"allowOverwriteExternalId\":false,\"allowEmailChangeFromWebForm\":false,\"allowToPassCustomIdentifyWithVoucherPool\":false}")
              .asString();
  /sauth/settings/oauth:
    get:
      tags:
        - Settings
      summary: Get OAuth settings
      description: |
        Retrieve OAuth authentication settings

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_customers_iam_oauth: read`
      operationId: getOauthSettingsUsingGET
      security:
        - JWT: []
      responses:
        "200":
          description: Current settings
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-OauthSettingsResponse"
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-forbidden"
        "404":
          description: Not Found
          content: {}
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Settings/operation/getOauthSettingsUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/sauth/settings/oauth \
              --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", "/sauth/settings/oauth", 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/sauth/settings/oauth");
            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": "/sauth/settings/oauth",
              "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/sauth/settings/oauth');
            $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/sauth/settings/oauth")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - Settings
      summary: Update OAuth settings
      description: |
        Update OAuth authentication settings

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_customers_iam_oauth: update`
      operationId: updateOatuhSettingsUsingPOST
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-OauthSettingsRequest"
        required: true
      responses:
        "200":
          description: Current settings
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-OauthSettingsResponse"
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-forbidden"
        "404":
          description: Not Found
          content: {}
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Settings/operation/updateOatuhSettingsUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/settings/oauth \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"enabled":true,"mode":"JWT_TOKEN","name":"string","endpoint":"string","headers":{"Content-Type":"application/json","Authorization":"Bearer {{_snrs_access_token}}","Cache-control":"no-cache"},"mapping":{"property1":"string","property2":"string"},"mappedExternal":true,"syncDataOnLogin":false}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"enabled\":true,\"mode\":\"JWT_TOKEN\",\"name\":\"string\",\"endpoint\":\"string\",\"headers\":{\"Content-Type\":\"application/json\",\"Authorization\":\"Bearer {{_snrs_access_token}}\",\"Cache-control\":\"no-cache\"},\"mapping\":{\"property1\":\"string\",\"property2\":\"string\"},\"mappedExternal\":true,\"syncDataOnLogin\":false}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/sauth/settings/oauth", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "enabled": true,
              "mode": "JWT_TOKEN",
              "name": "string",
              "endpoint": "string",
              "headers": {
                "Content-Type": "application/json",
                "Authorization": "Bearer {{_snrs_access_token}}",
                "Cache-control": "no-cache"
              },
              "mapping": {
                "property1": "string",
                "property2": "string"
              },
              "mappedExternal": true,
              "syncDataOnLogin": 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/sauth/settings/oauth");
            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": "/sauth/settings/oauth",
              "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({
              enabled: true,
              mode: 'JWT_TOKEN',
              name: 'string',
              endpoint: 'string',
              headers: {
                'Content-Type': 'application/json',
                Authorization: 'Bearer {{_snrs_access_token}}',
                'Cache-control': 'no-cache'
              },
              mapping: {property1: 'string', property2: 'string'},
              mappedExternal: true,
              syncDataOnLogin: false
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/settings/oauth');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"enabled":true,"mode":"JWT_TOKEN","name":"string","endpoint":"string","headers":{"Content-Type":"application/json","Authorization":"Bearer {{_snrs_access_token}}","Cache-control":"no-cache"},"mapping":{"property1":"string","property2":"string"},"mappedExternal":true,"syncDataOnLogin":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/sauth/settings/oauth")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"enabled\":true,\"mode\":\"JWT_TOKEN\",\"name\":\"string\",\"endpoint\":\"string\",\"headers\":{\"Content-Type\":\"application/json\",\"Authorization\":\"Bearer {{_snrs_access_token}}\",\"Cache-control\":\"no-cache\"},\"mapping\":{\"property1\":\"string\",\"property2\":\"string\"},\"mappedExternal\":true,\"syncDataOnLogin\":false}")
              .asString();
  /sauth/settings/synerise-auth:
    get:
      tags:
        - Settings
      operationId: getSyneriseAuthConfig
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-SyneriseAuthSettingsData"
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Settings/operation/getSyneriseAuthConfig
      description: |
        

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_customers_iam: read`
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/sauth/settings/synerise-auth
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            conn.request("GET", "/sauth/settings/synerise-auth")

            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/sauth/settings/synerise-auth");

            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": "/sauth/settings/synerise-auth",
              "headers": {}
            };

            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/sauth/settings/synerise-auth');
            $request->setMethod(HTTP_METH_GET);

            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/sauth/settings/synerise-auth")
              .asString();
    post:
      tags:
        - Settings
      operationId: updateSyneriseAuthSettings
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-SyneriseAuthSettingsData"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-SyneriseAuthSettingsData"
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Settings/operation/updateSyneriseAuthSettings
      description: |
        

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_customers_iam: update`
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/settings/synerise-auth \
              --header 'content-type: application/json' \
              --data '{"enabled":true,"registrationType":"REQUIRE_ACTIVATION","pinConfirmationType":"EVERYONE","pinConfirmationLength":6,"pinConfirmationValidInSeconds":300,"allowPinResendFromDifferentDeviceId":false,"confirmationRedirectLink":null,"confirmationMailSubject":"string","confirmationMailBody":"string","confirmationMailTemplateId":"string","passwordResetMailTemplateId":"string","passwordResetMailSubject":"string","passwordResetMailBody":"string","pinConfirmationMailSubject":"string","pinConfirmationMailBody":"string","pinConfirmationMailTemplateId":"string","maxLength":0,"minLength":0,"requireAtLeastOneLowercaseLetter":false,"requireAtLeastOneNonAlphaNumericCharacter":false,"requireAtLeastOneNumber":false,"requireAtLeastOneUppercaseLetter":false}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"enabled\":true,\"registrationType\":\"REQUIRE_ACTIVATION\",\"pinConfirmationType\":\"EVERYONE\",\"pinConfirmationLength\":6,\"pinConfirmationValidInSeconds\":300,\"allowPinResendFromDifferentDeviceId\":false,\"confirmationRedirectLink\":null,\"confirmationMailSubject\":\"string\",\"confirmationMailBody\":\"string\",\"confirmationMailTemplateId\":\"string\",\"passwordResetMailTemplateId\":\"string\",\"passwordResetMailSubject\":\"string\",\"passwordResetMailBody\":\"string\",\"pinConfirmationMailSubject\":\"string\",\"pinConfirmationMailBody\":\"string\",\"pinConfirmationMailTemplateId\":\"string\",\"maxLength\":0,\"minLength\":0,\"requireAtLeastOneLowercaseLetter\":false,\"requireAtLeastOneNonAlphaNumericCharacter\":false,\"requireAtLeastOneNumber\":false,\"requireAtLeastOneUppercaseLetter\":false}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/sauth/settings/synerise-auth", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "enabled": true,
              "registrationType": "REQUIRE_ACTIVATION",
              "pinConfirmationType": "EVERYONE",
              "pinConfirmationLength": 6,
              "pinConfirmationValidInSeconds": 300,
              "allowPinResendFromDifferentDeviceId": false,
              "confirmationRedirectLink": null,
              "confirmationMailSubject": "string",
              "confirmationMailBody": "string",
              "confirmationMailTemplateId": "string",
              "passwordResetMailTemplateId": "string",
              "passwordResetMailSubject": "string",
              "passwordResetMailBody": "string",
              "pinConfirmationMailSubject": "string",
              "pinConfirmationMailBody": "string",
              "pinConfirmationMailTemplateId": "string",
              "maxLength": 0,
              "minLength": 0,
              "requireAtLeastOneLowercaseLetter": false,
              "requireAtLeastOneNonAlphaNumericCharacter": false,
              "requireAtLeastOneNumber": false,
              "requireAtLeastOneUppercaseLetter": 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/sauth/settings/synerise-auth");
            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": "/sauth/settings/synerise-auth",
              "headers": {
                "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({
              enabled: true,
              registrationType: 'REQUIRE_ACTIVATION',
              pinConfirmationType: 'EVERYONE',
              pinConfirmationLength: 6,
              pinConfirmationValidInSeconds: 300,
              allowPinResendFromDifferentDeviceId: false,
              confirmationRedirectLink: null,
              confirmationMailSubject: 'string',
              confirmationMailBody: 'string',
              confirmationMailTemplateId: 'string',
              passwordResetMailTemplateId: 'string',
              passwordResetMailSubject: 'string',
              passwordResetMailBody: 'string',
              pinConfirmationMailSubject: 'string',
              pinConfirmationMailBody: 'string',
              pinConfirmationMailTemplateId: 'string',
              maxLength: 0,
              minLength: 0,
              requireAtLeastOneLowercaseLetter: false,
              requireAtLeastOneNonAlphaNumericCharacter: false,
              requireAtLeastOneNumber: false,
              requireAtLeastOneUppercaseLetter: false
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/settings/synerise-auth');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"enabled":true,"registrationType":"REQUIRE_ACTIVATION","pinConfirmationType":"EVERYONE","pinConfirmationLength":6,"pinConfirmationValidInSeconds":300,"allowPinResendFromDifferentDeviceId":false,"confirmationRedirectLink":null,"confirmationMailSubject":"string","confirmationMailBody":"string","confirmationMailTemplateId":"string","passwordResetMailTemplateId":"string","passwordResetMailSubject":"string","passwordResetMailBody":"string","pinConfirmationMailSubject":"string","pinConfirmationMailBody":"string","pinConfirmationMailTemplateId":"string","maxLength":0,"minLength":0,"requireAtLeastOneLowercaseLetter":false,"requireAtLeastOneNonAlphaNumericCharacter":false,"requireAtLeastOneNumber":false,"requireAtLeastOneUppercaseLetter":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/sauth/settings/synerise-auth")
              .header("content-type", "application/json")
              .body("{\"enabled\":true,\"registrationType\":\"REQUIRE_ACTIVATION\",\"pinConfirmationType\":\"EVERYONE\",\"pinConfirmationLength\":6,\"pinConfirmationValidInSeconds\":300,\"allowPinResendFromDifferentDeviceId\":false,\"confirmationRedirectLink\":null,\"confirmationMailSubject\":\"string\",\"confirmationMailBody\":\"string\",\"confirmationMailTemplateId\":\"string\",\"passwordResetMailTemplateId\":\"string\",\"passwordResetMailSubject\":\"string\",\"passwordResetMailBody\":\"string\",\"pinConfirmationMailSubject\":\"string\",\"pinConfirmationMailBody\":\"string\",\"pinConfirmationMailTemplateId\":\"string\",\"maxLength\":0,\"minLength\":0,\"requireAtLeastOneLowercaseLetter\":false,\"requireAtLeastOneNonAlphaNumericCharacter\":false,\"requireAtLeastOneNumber\":false,\"requireAtLeastOneUppercaseLetter\":false}")
              .asString();
  /sauth/settings/oauth/facebook:
    get:
      tags:
        - Settings
      operationId: getFacebookOauthSettings
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-FacebookOauthSettingsPayload"
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Settings/operation/getFacebookOauthSettings
      description: |
        

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_customers_iam_oauth: read`
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/sauth/settings/oauth/facebook
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            conn.request("GET", "/sauth/settings/oauth/facebook")

            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/sauth/settings/oauth/facebook");

            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": "/sauth/settings/oauth/facebook",
              "headers": {}
            };

            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/sauth/settings/oauth/facebook');
            $request->setMethod(HTTP_METH_GET);

            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/sauth/settings/oauth/facebook")
              .asString();
    post:
      tags:
        - Settings
      operationId: updateFacebookOauthSettings
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-FacebookOauthSettingsPayload"
        required: true
      responses:
        "200":
          description: OK
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/sauth-FacebookOauthSettingsPayload"
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Settings/operation/updateFacebookOauthSettings
      description: |
        

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_customers_iam_oauth: update`
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/settings/oauth/facebook \
              --header 'content-type: application/json' \
              --data '{"enabled":true}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"enabled\":true}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/sauth/settings/oauth/facebook", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "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/sauth/settings/oauth/facebook");
            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": "/sauth/settings/oauth/facebook",
              "headers": {
                "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({enabled: true}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/settings/oauth/facebook');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"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/sauth/settings/oauth/facebook")
              .header("content-type", "application/json")
              .body("{\"enabled\":true}")
              .asString();
  /sauth/settings/oauth/google:
    get:
      tags:
        - Settings
      operationId: getGoogleOauthSettings
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-GoogleOauthSettingsPayload"
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Settings/operation/getGoogleOauthSettings
      description: |
        

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_customers_iam_oauth: read`
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/sauth/settings/oauth/google
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            conn.request("GET", "/sauth/settings/oauth/google")

            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/sauth/settings/oauth/google");

            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": "/sauth/settings/oauth/google",
              "headers": {}
            };

            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/sauth/settings/oauth/google');
            $request->setMethod(HTTP_METH_GET);

            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/sauth/settings/oauth/google")
              .asString();
    post:
      tags:
        - Settings
      operationId: updateGoogleOauthSettings
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-GoogleOauthSettingsPayload"
        required: true
      responses:
        "200":
          description: OK
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/sauth-GoogleOauthSettingsPayload"
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Settings/operation/updateGoogleOauthSettings
      description: |
        

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_customers_iam_oauth: update`
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/settings/oauth/google \
              --header 'content-type: application/json' \
              --data '{"enabled":true}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"enabled\":true}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/sauth/settings/oauth/google", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "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/sauth/settings/oauth/google");
            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": "/sauth/settings/oauth/google",
              "headers": {
                "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({enabled: true}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/settings/oauth/google');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"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/sauth/settings/oauth/google")
              .header("content-type", "application/json")
              .body("{\"enabled\":true}")
              .asString();
  /sauth/settings/oauth/apple:
    get:
      tags:
        - Settings
      summary: Get Sign in with Apple settings
      description: |
        Retrieve Sign in with Apple settings.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_customers_iam_oauth: read`
      operationId: getAppleAuthSettingsUsingGET
      security:
        - JWT: []
      responses:
        "200":
          description: Current settings
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-AppleAuthSettingsPayload"
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-forbidden"
        "404":
          description: Not Found
          content: {}
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Settings/operation/getAppleAuthSettingsUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/sauth/settings/oauth/apple \
              --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", "/sauth/settings/oauth/apple", 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/sauth/settings/oauth/apple");
            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": "/sauth/settings/oauth/apple",
              "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/sauth/settings/oauth/apple');
            $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/sauth/settings/oauth/apple")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - Settings
      summary: Update Sign in with Apple settings
      description: |
        Update Sign in with Apple settings.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_customers_iam_oauth: update`
      operationId: updateAppleAuthSettingsUsingPOST
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-AppleAuthSettingsPayload"
        required: true
      responses:
        "200":
          description: Current settings
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-AppleAuthSettingsPayload"
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-forbidden"
        "404":
          description: Not Found
          content: {}
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Settings/operation/updateAppleAuthSettingsUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/settings/oauth/apple \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"enabled":true,"bundle":"com.synerise.sdk.sample-swift"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"enabled\":true,\"bundle\":\"com.synerise.sdk.sample-swift\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/sauth/settings/oauth/apple", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "enabled": true,
              "bundle": "com.synerise.sdk.sample-swift"
            });

            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/sauth/settings/oauth/apple");
            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": "/sauth/settings/oauth/apple",
              "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({enabled: true, bundle: 'com.synerise.sdk.sample-swift'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/settings/oauth/apple');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"enabled":true,"bundle":"com.synerise.sdk.sample-swift"}');

            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/sauth/settings/oauth/apple")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"enabled\":true,\"bundle\":\"com.synerise.sdk.sample-swift\"}")
              .asString();
  /sauth/clients/oauth/deleted:
    post:
      deprecated: true
      tags:
        - Profile account management
      summary: Delete Client Account (OAuth)
      description: |
        
        This endpoint is deprecated. Use [this one](#operation/deleteAccountUsingPOST).

        A Client can delete their own account.


        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: deleteOauthClientUsingPOST
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-DeleteOauthClientRequestBody"
        required: true
      responses:
        "200":
          description: OK
          content: {}
        "400":
          $ref: "#/components/responses/sauth-400-malformed"
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-invalid-credentials-in-body"
        "404":
          description: Not Found
          content: {}
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/deleteOauthClientUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/clients/oauth/deleted \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"accessToken":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string","customId":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"accessToken\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"customId\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/sauth/clients/oauth/deleted", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "accessToken": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "deviceId": "string",
              "customId": "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/sauth/clients/oauth/deleted");
            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": "/sauth/clients/oauth/deleted",
              "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({
              accessToken: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              deviceId: 'string',
              customId: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/clients/oauth/deleted');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"accessToken":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string","customId":"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/sauth/clients/oauth/deleted")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"accessToken\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"customId\":\"string\"}")
              .asString();
  /sauth/clients/apple/deleted:
    post:
      deprecated: true
      tags:
        - Profile account management
      summary: Delete Profile account (Sign in with Apple)
      description: |
        
        This endpoint is deprecated. Use [this one](#operation/deleteAccountUsingPOST).

        A Profile can delete its own account.


        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: deleteAppleClientUsingPOST
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-DeleteAppleClientRequestBody"
        required: true
      responses:
        "200":
          description: OK
          content: {}
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-forbidden"
        "404":
          description: Not Found
          content: {}
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/deleteAppleClientUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/clients/apple/deleted \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"accessToken":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string","customId":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"accessToken\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"customId\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/sauth/clients/apple/deleted", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "accessToken": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "deviceId": "string",
              "customId": "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/sauth/clients/apple/deleted");
            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": "/sauth/clients/apple/deleted",
              "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({
              accessToken: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              deviceId: 'string',
              customId: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/clients/apple/deleted');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"accessToken":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string","customId":"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/sauth/clients/apple/deleted")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"accessToken\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"customId\":\"string\"}")
              .asString();
  /sauth/clients/facebook/deleted:
    post:
      deprecated: true
      tags:
        - Profile account management
      summary: Delete Facebook Profile Account
      description: |
        
        This endpoint is deprecated. Use [this one](#operation/deleteAccountUsingPOST).

        A Profile can delete its own account.


        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: DeleteAFacebookClientAccount
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-DeleteAFacebookClientAccountRequestBody"
        required: true
      responses:
        "200":
          description: Request accepted
          headers: {}
        "400":
          $ref: "#/components/responses/sauth-400-malformed"
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-invalid-credentials-in-body"
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/DeleteAFacebookClientAccount
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/clients/facebook/deleted \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"facebookToken":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"facebookToken\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/sauth/clients/facebook/deleted", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "facebookToken": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "deviceId": "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/sauth/clients/facebook/deleted");
            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": "/sauth/clients/facebook/deleted",
              "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({
              facebookToken: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              deviceId: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/clients/facebook/deleted');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"facebookToken":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"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/sauth/clients/facebook/deleted")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"facebookToken\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\"}")
              .asString();
  /sauth/my-account/delete:
    post:
      deprecated: true
      tags:
        - Profile account management
      summary: Delete account
      description: |
        
        This endpoint is deprecated. Use [this one](#operation/deleteAccountUsingPOST).

        A Profile can delete its own account.


        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: deleteAccountUsingPOST-v1
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-DeleteAccountV1RequestBody"
      responses:
        "200":
          description: OK
          content: {}
        "400":
          $ref: "#/components/responses/sauth-400-malformed"
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-invalid-credentials-in-body"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/deleteAccountUsingPOST-v1
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/my-account/delete \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"password":"string","uuid":"string","deviceId":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/sauth/my-account/delete", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "password": "string",
              "uuid": "string",
              "deviceId": "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/sauth/my-account/delete");
            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": "/sauth/my-account/delete",
              "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({password: 'string', uuid: 'string', deviceId: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/my-account/delete');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"password":"string","uuid":"string","deviceId":"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/sauth/my-account/delete")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\"}")
              .asString();
  /sauth/my-account/email-change/request:
    post:
      deprecated: true
      tags:
        - Profile account management
      summary: Request Profile email change
      description: |
        
        This endpoint is deprecated. Use [this one](#operation/changeEmailRequestUsingPOST).

        A Profile can request an email change for its account. A confirmation token is sent by and must be applied using the [Confirm Profile email change](#operation/confirmClientEmailChange) endpoint.


        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: requestClientEmailChange
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-RequestClientEmailChangeRequestBody"
            example: '{"email":"newEmail","password":"my_password","uuid":"my_uuid","deviceId":"optional"}'
        required: true
      responses:
        "202":
          description: Request accepted
        "400":
          description: Clients not recognizable by email
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/requestClientEmailChange
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/my-account/email-change/request \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"email":"string","password":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"email\":\"string\",\"password\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/sauth/my-account/email-change/request", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "string",
              "password": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "deviceId": "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/sauth/my-account/email-change/request");
            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": "/sauth/my-account/email-change/request",
              "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({
              email: 'string',
              password: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              deviceId: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/my-account/email-change/request');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"email":"string","password":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"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/sauth/my-account/email-change/request")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"email\":\"string\",\"password\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\"}")
              .asString();
  /schema-service/v3/screen-views/{feedSlug}/generate:
    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();
    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();
  /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:
    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();
    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();
  /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:
    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();
    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();
  /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/v2/documents/{slug}/generate:
    get:
      tags:
        - Documents
      summary: Generate document (slug)
      description: |
        Generate a document. Inserts are processed. If an insert can't be processed, the returned `content` is empty.

        If the document includes inserts with a context (for example, `{% customer param %}`), you must authenticate the request with a JWT that provides the context.

        If you want to authenticate with a JWT that doesn't provide the required context, you can use the [`POST /v2/documents/{slug}/generate` endpoint](operation/generateDocumentBySlug) to provide the parameter values in the request body.

        **IMPORTANT**: When the request's context is a Workspace or Synerise User JWT, only documents with the audience set to `ALL` ("Everyone" in the Synerise Web Application) can be generated.


        ---

        **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: generateDocumentBySlugGet
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-PathDocumentSlug"
      responses:
        "200":
          description: Processed JSON content
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-DocumentGenerateResponse"
        "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/asset-management#tag/Documents/operation/generateDocumentBySlugGet
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/v2/documents/%7Bslug%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/v2/documents/%7Bslug%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/v2/documents/%7Bslug%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/v2/documents/%7Bslug%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/v2/documents/%7Bslug%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/v2/documents/%7Bslug%7D/generate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - Documents
      summary: Generate document (slug)
      description: |
        Generate a document. Inserts are processed. If an insert can't be processed, the returned `content` is empty.

        **IMPORTANT**: When the request's context is a Workspace or Synerise User JWT, only documents with the audience set to `ALL` ("Everyone" in the Synerise Web Application) can be generated.


        ---

        **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: generateDocumentBySlug
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-PathDocumentSlug"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                customer.firstName: Joe
              additionalProperties:
                $ref: "#/components/schemas/schema-service-additionalPropertiesForGenerate"
      responses:
        "200":
          description: Processed JSON content
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-DocumentGenerateResponse"
        "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/asset-management#tag/Documents/operation/generateDocumentBySlug
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/documents/%7Bslug%7D/generate \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"customer.firstName":"Joe"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"customer.firstName\":\"Joe\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/schema-service/v2/documents/%7Bslug%7D/generate", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "customer.firstName": "Joe"
            });

            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/documents/%7Bslug%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/v2/documents/%7Bslug%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({'customer.firstName': 'Joe'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/documents/%7Bslug%7D/generate');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"customer.firstName":"Joe"}');

            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/documents/%7Bslug%7D/generate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"customer.firstName\":\"Joe\"}")
              .asString();
  /schema-service/v2/documents/{documentId}/generate:
    post:
      tags:
        - Documents
      summary: Generate document (document UUID)
      description: |
        Generate a document. Inserts are processed. If an insert can't be processed, the returned `content` is empty.

        **IMPORTANT**: When the request's context is a Workspace or Synerise User JWT, only documents with the audience set to `ALL` ("Everyone" in the Synerise Web Application) can be generated.


        ---

        **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_READ`

        **User role permission required:** `assets_docs: read`
      operationId: generateDocumentByIdPost
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-PathDocumentUuid"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                customer.firstName: Joe
              additionalProperties:
                $ref: "#/components/schemas/schema-service-additionalPropertiesForGenerate"
      responses:
        "200":
          $ref: "#/components/responses/schema-service-processedDocumentJsonResponse"
        "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/asset-management#tag/Documents/operation/generateDocumentByIdPost
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/generate \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"customer.firstName":"Joe"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"customer.firstName\":\"Joe\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/schema-service/v2/documents/%7BdocumentId%7D/generate", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "customer.firstName": "Joe"
            });

            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/documents/%7BdocumentId%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/v2/documents/%7BdocumentId%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({'customer.firstName': 'Joe'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/generate');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"customer.firstName":"Joe"}');

            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/documents/%7BdocumentId%7D/generate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"customer.firstName\":\"Joe\"}")
              .asString();
  /schema-service/v2/documents/create:
    post:
      tags:
        - Documents
      summary: Create document
      description: |
        Create a new document.

        ---

        **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: createDocumentPost
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-CreateDocumentRequest"
      responses:
        "200":
          description: Document created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-Document"
        "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/asset-management#tag/Documents/operation/createDocumentPost
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/documents/create \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"string","priority":100,"content":{"someBoolean":true,"someString":"Lorem ipsum","aNestedDocument":"{% document exampleslug %}"},"slug":"basket","schema":"containers","groupId":"eb54e96e-21b8-4f54-9cd4-80fccbd06f55","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"},"directoryId":"786c2ec1-fb9a-4593-b705-005b34c18c18"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"name\":\"string\",\"priority\":100,\"content\":{\"someBoolean\":true,\"someString\":\"Lorem ipsum\",\"aNestedDocument\":\"{% document exampleslug %}\"},\"slug\":\"basket\",\"schema\":\"containers\",\"groupId\":\"eb54e96e-21b8-4f54-9cd4-80fccbd06f55\",\"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\"},\"directoryId\":\"786c2ec1-fb9a-4593-b705-005b34c18c18\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/schema-service/v2/documents/create", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "name": "string",
              "priority": 100,
              "content": {
                "someBoolean": true,
                "someString": "Lorem ipsum",
                "aNestedDocument": "{% document exampleslug %}"
              },
              "slug": "basket",
              "schema": "containers",
              "groupId": "eb54e96e-21b8-4f54-9cd4-80fccbd06f55",
              "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"
              },
              "directoryId": "786c2ec1-fb9a-4593-b705-005b34c18c18"
            });

            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/documents/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/v2/documents/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({
              name: 'string',
              priority: 100,
              content: {
                someBoolean: true,
                someString: 'Lorem ipsum',
                aNestedDocument: '{% document exampleslug %}'
              },
              slug: 'basket',
              schema: 'containers',
              groupId: 'eb54e96e-21b8-4f54-9cd4-80fccbd06f55',
              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'
              },
              directoryId: '786c2ec1-fb9a-4593-b705-005b34c18c18'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/documents/create');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"name":"string","priority":100,"content":{"someBoolean":true,"someString":"Lorem ipsum","aNestedDocument":"{% document exampleslug %}"},"slug":"basket","schema":"containers","groupId":"eb54e96e-21b8-4f54-9cd4-80fccbd06f55","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"},"directoryId":"786c2ec1-fb9a-4593-b705-005b34c18c18"}');

            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/documents/create")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\",\"priority\":100,\"content\":{\"someBoolean\":true,\"someString\":\"Lorem ipsum\",\"aNestedDocument\":\"{% document exampleslug %}\"},\"slug\":\"basket\",\"schema\":\"containers\",\"groupId\":\"eb54e96e-21b8-4f54-9cd4-80fccbd06f55\",\"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\"},\"directoryId\":\"786c2ec1-fb9a-4593-b705-005b34c18c18\"}")
              .asString();
  /schema-service/v2/documents/createNew:
    post:
      tags:
        - Documents
      summary: Initialize document
      description: |
        Create a new document. 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: initializeDocumentPost
      security:
        - JWT: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-CreateRequest"
      responses:
        "200":
          description: Document initialized
          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/asset-management#tag/Documents/operation/initializeDocumentPost
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/documents/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/documents/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/documents/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/documents/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/documents/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/documents/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/documents/{documentId}/audience:
    post:
      tags:
        - Documents
      summary: Add audience to document
      description: |
        Define the audience for a document.

        ---

        **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: createDocumentAudience
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-PathDocumentUuid"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-Audience"
      responses:
        "200":
          description: Audience defined
          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/asset-management#tag/Documents/operation/createDocumentAudience
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/{documentId}/content:
    post:
      tags:
        - Documents
      summary: Add content to document
      description: |
        Add content and configuration (priority, schema, and so on) to a document.

        ---

        **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: createDocumentContent
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-PathDocumentUuid"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-DocumentContent"
      responses:
        "200":
          description: Content added
          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/asset-management#tag/Documents/operation/createDocumentContent
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/content \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"priority":100,"content":{"property1":null,"property2":null},"slug":"basket","schema":"containers","groupId":"43c97b25-4a10-45d0-99b7-d472eea2bb24"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"priority\":100,\"content\":{\"property1\":null,\"property2\":null},\"slug\":\"basket\",\"schema\":\"containers\",\"groupId\":\"43c97b25-4a10-45d0-99b7-d472eea2bb24\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/schema-service/v2/documents/%7BdocumentId%7D/content", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "priority": 100,
              "content": {
                "property1": null,
                "property2": null
              },
              "slug": "basket",
              "schema": "containers",
              "groupId": "43c97b25-4a10-45d0-99b7-d472eea2bb24"
            });

            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/documents/%7BdocumentId%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/documents/%7BdocumentId%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({
              priority: 100,
              content: {property1: null, property2: null},
              slug: 'basket',
              schema: 'containers',
              groupId: '43c97b25-4a10-45d0-99b7-d472eea2bb24'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/content');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"priority":100,"content":{"property1":null,"property2":null},"slug":"basket","schema":"containers","groupId":"43c97b25-4a10-45d0-99b7-d472eea2bb24"}');

            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/documents/%7BdocumentId%7D/content")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"priority\":100,\"content\":{\"property1\":null,\"property2\":null},\"slug\":\"basket\",\"schema\":\"containers\",\"groupId\":\"43c97b25-4a10-45d0-99b7-d472eea2bb24\"}")
              .asString();
  /schema-service/v2/documents/{documentId}/name:
    put:
      tags:
        - Documents
      summary: Rename document
      description: |
        Rename a document.

        ---

        **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: updateDocumentName
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-PathDocumentUuid"
      requestBody:
        content:
          application/json:
            schema:
              type: string
              description: New name for the document
      responses:
        "200":
          description: Document renamed
          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/asset-management#tag/Documents/operation/updateDocumentName
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%7D/name")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("\"string\"")
              .asString();
  /schema-service/v2/documents/{documentId}/priority:
    put:
      tags:
        - Documents
      summary: Update priority in document
      description: |
        Update priority in a document.

        ---

        **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: updateDocumentPriority
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-PathDocumentUuid"
      requestBody:
        content:
          application/json:
            schema:
              type: integer
              format: int32
      responses:
        "200":
          description: Priority changed
          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/asset-management#tag/Documents/operation/updateDocumentPriority
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%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/v2/documents/%7BdocumentId%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/v2/documents/%7BdocumentId%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/documents/%7BdocumentId%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/v2/documents/%7BdocumentId%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/v2/documents/%7BdocumentId%7D/priority")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("0")
              .asString();
  /schema-service/v2/documents/preview/by/{identifierType}:
    post:
      tags:
        - Documents
      summary: Preview document content for a profile
      description: |
        Preview document content in context of a profile. Inserts are processed. If an insert can't be processed, the returned `content` is empty.

        This method should not be used in production implementations, its purpose is to test the content. Use the "generate document" endpoints for implementation.


        ---

        **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: previewDocumentByIdentifierPost
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathIdentifierType"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-PreviewDocumentByProfile"
      responses:
        "200":
          $ref: "#/components/responses/schema-service-processedDocumentJsonResponse"
        "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/asset-management#tag/Documents/operation/previewDocumentByIdentifierPost
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/documents/preview/by/%7BidentifierType%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"identifierValue":"string","content":{"someBoolean":true,"someString":"Lorem ipsum","aNestedDocument":"{% document exampleslug %}"},"params":{"property1":"string","property2":"string"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"identifierValue\":\"string\",\"content\":{\"someBoolean\":true,\"someString\":\"Lorem ipsum\",\"aNestedDocument\":\"{% document exampleslug %}\"},\"params\":{\"property1\":\"string\",\"property2\":\"string\"}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/schema-service/v2/documents/preview/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",
              "content": {
                "someBoolean": true,
                "someString": "Lorem ipsum",
                "aNestedDocument": "{% document exampleslug %}"
              },
              "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/documents/preview/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/documents/preview/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',
              content: {
                someBoolean: true,
                someString: 'Lorem ipsum',
                aNestedDocument: '{% document exampleslug %}'
              },
              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/documents/preview/by/%7BidentifierType%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"identifierValue":"string","content":{"someBoolean":true,"someString":"Lorem ipsum","aNestedDocument":"{% document exampleslug %}"},"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/documents/preview/by/%7BidentifierType%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"identifierValue\":\"string\",\"content\":{\"someBoolean\":true,\"someString\":\"Lorem ipsum\",\"aNestedDocument\":\"{% document exampleslug %}\"},\"params\":{\"property1\":\"string\",\"property2\":\"string\"}}")
              .asString();
  /schema-service/v2/documents/{documentIdentifier}/generate/by/{identifierType}:
    post:
      tags:
        - Documents
      summary: Generate document for a profile
      description: |
        Generate a document in context of a profile. Inserts are processed. If an insert can't be processed, the returned `content` 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: generateDocumentWithProfileContextPost
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-PathDocumentIdentifier"
        - $ref: "#/components/parameters/schema-service-pathIdentifierType"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-generateDocumentWithIdReq"
      responses:
        "200":
          $ref: "#/components/responses/schema-service-processedDocumentJsonResponse"
        "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/asset-management#tag/Documents/operation/generateDocumentWithProfileContextPost
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentIdentifier%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/documents/%7BdocumentIdentifier%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/documents/%7BdocumentIdentifier%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/documents/%7BdocumentIdentifier%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/documents/%7BdocumentIdentifier%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/documents/%7BdocumentIdentifier%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/documents/preview/grouped-by/groups/list:
    post:
      tags:
        - Documents
      summary: List grouped documents
      description: |
        Retrieve a group or groups of documents with information about the documents in those groups and relations between them. The response is an array of arrays (groups) of objects (documents).

        ---

        **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: previewListOfDocumentsGroupedByGroup
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/schema-service-groupUuid"
      responses:
        "200":
          description: List of document groups
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/schema-service-PreviewGroup"
        "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/asset-management#tag/Documents/operation/previewListOfDocumentsGroupedByGroup
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/documents/preview/grouped-by/groups/list \
              --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/documents/preview/grouped-by/groups/list", 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/documents/preview/grouped-by/groups/list");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/documents/preview/grouped-by/groups/list",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify(['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/documents/preview/grouped-by/groups/list');
            $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/documents/preview/grouped-by/groups/list")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"]")
              .asString();
  /schema-service/v2/documents:
    get:
      tags:
        - Documents
      summary: List documents
      description: |
        Returns a paginated list of documents.

        ---

        **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-queryPage"
        - $ref: "#/components/parameters/schema-service-queryLimit"
        - $ref: "#/components/parameters/schema-service-querySearch"
        - $ref: "#/components/parameters/schema-service-queryDirectoryId"
        - $ref: "#/components/parameters/schema-service-queryGroupId"
        - $ref: "#/components/parameters/schema-service-queryStatus"
        - $ref: "#/components/parameters/schema-service-querySchema"
      responses:
        "200":
          description: List of documents
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-DocumentsListResponse"
        "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: documents-list
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Documents/operation/documents-list
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/schema-service/v2/documents?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&groupId=SOME_STRING_VALUE&status=SOME_STRING_VALUE&schema=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/documents?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&groupId=SOME_STRING_VALUE&status=SOME_STRING_VALUE&schema=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/documents?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&groupId=SOME_STRING_VALUE&status=SOME_STRING_VALUE&schema=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/documents?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&groupId=SOME_STRING_VALUE&status=SOME_STRING_VALUE&schema=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/documents');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_NUMBER_VALUE',
              'limit' => 'SOME_NUMBER_VALUE',
              'search' => 'SOME_STRING_VALUE',
              'directoryId' => 'SOME_STRING_VALUE',
              'groupId' => 'SOME_STRING_VALUE',
              'status' => 'SOME_STRING_VALUE',
              'schema' => '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/documents?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&groupId=SOME_STRING_VALUE&status=SOME_STRING_VALUE&schema=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/documents/preview/list:
    post:
      tags:
        - Documents
      summary: List documents from groups
      description: |
        Retrieve a list of documents from a group or groups. The response includes information about relations between documents. The response is an array of objects (documents) without sorting them by group.

        ---

        **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: previewListOfDocumentsByGroup
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/schema-service-groupUuid"
      responses:
        "200":
          description: List of documents from the requested groups, without sorting into groups
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/schema-service-DocumentPreviewGroup"
        "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/asset-management#tag/Documents/operation/previewListOfDocumentsByGroup
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/documents/preview/list \
              --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/documents/preview/list", 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/documents/preview/list");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/documents/preview/list",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify(['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/documents/preview/list');
            $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/documents/preview/list")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"]")
              .asString();
  /schema-service/v2/documents/{slug}:
    get:
      tags:
        - Documents
      summary: Get document by slug
      description: |
        Retrieve a document and its metadata. The content isn't processed.

        ---

        **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-document-by-slug
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-PathDocumentSlug"
      responses:
        "200":
          $ref: "#/components/responses/schema-service-rawDocumentJsonResponse"
        "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/asset-management#tag/Documents/operation/get-document-by-slug
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/v2/documents/%7Bslug%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/documents/%7Bslug%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/documents/%7Bslug%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/documents/%7Bslug%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/documents/%7Bslug%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/documents/%7Bslug%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/documents/by/slug/{slug}/predecessors:
    get:
      tags:
        - Documents
      summary: Get predecessors for document
      description: |
        Retrieve information about documents or screen views that refer **to** the requested document.

        ---

        **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-PathDocumentSlug"
      responses:
        "200":
          description: Documents which refer to the requested document
          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: document-predecessors-by-slug-get
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Documents/operation/document-predecessors-by-slug-get
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/v2/documents/by/slug/%7Bslug%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/documents/by/slug/%7Bslug%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/documents/by/slug/%7Bslug%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/documents/by/slug/%7Bslug%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/documents/by/slug/%7Bslug%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/documents/by/slug/%7Bslug%7D/predecessors")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/documents/{documentId}/predecessors:
    get:
      tags:
        - Documents
      summary: Get predecessors for document
      description: |
        Retrieve information about documents or screen views that refer **to** the requested document.

        ---

        **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-PathDocumentUuid"
      responses:
        "200":
          description: Documents which refer to the requested document
          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: document-predecessors-get
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Documents/operation/document-predecessors-get
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%7D/predecessors")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/documents/by/slug/{slug}/successors:
    get:
      tags:
        - Documents
      summary: Get successors for document
      description: |
        Retrieve information about documents referenced **from** the requested document.

        ---

        **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-PathDocumentSlug"
      responses:
        "200":
          description: Documents referenced from the requested document
          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: document-successors-by-slug-get
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Documents/operation/document-successors-by-slug-get
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/v2/documents/by/slug/%7Bslug%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/documents/by/slug/%7Bslug%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/documents/by/slug/%7Bslug%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/documents/by/slug/%7Bslug%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/documents/by/slug/%7Bslug%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/documents/by/slug/%7Bslug%7D/successors")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/documents/{documentId}/successors:
    get:
      tags:
        - Documents
      summary: Get successors for document
      description: |
        Retrieve information about documents referenced **from** the requested document.

        ---

        **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-PathDocumentUuid"
      responses:
        "200":
          description: Documents referenced from the requested document
          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: document-successors-get
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Documents/operation/document-successors-get
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%7D/successors")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/documents/{documentId}:
    post:
      tags:
        - Documents
      summary: Update document
      description: |
        Update a document.

        ---

        **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: updateDocumentPost
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-PathDocumentUuid"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-UpdateDocumentRequest"
      responses:
        "200":
          description: Updated document
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-Document"
        "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/asset-management#tag/Documents/operation/updateDocumentPost
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"string","priority":100,"content":{"someBoolean":true,"someString":"Lorem ipsum","aNestedDocument":"{% document exampleslug %}"},"schema":"containers","groupId":"43c97b25-4a10-45d0-99b7-d472eea2bb24","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"},"directoryId":"786c2ec1-fb9a-4593-b705-005b34c18c18"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"name\":\"string\",\"priority\":100,\"content\":{\"someBoolean\":true,\"someString\":\"Lorem ipsum\",\"aNestedDocument\":\"{% document exampleslug %}\"},\"schema\":\"containers\",\"groupId\":\"43c97b25-4a10-45d0-99b7-d472eea2bb24\",\"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\"},\"directoryId\":\"786c2ec1-fb9a-4593-b705-005b34c18c18\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/schema-service/v2/documents/%7BdocumentId%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",
              "priority": 100,
              "content": {
                "someBoolean": true,
                "someString": "Lorem ipsum",
                "aNestedDocument": "{% document exampleslug %}"
              },
              "schema": "containers",
              "groupId": "43c97b25-4a10-45d0-99b7-d472eea2bb24",
              "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"
              },
              "directoryId": "786c2ec1-fb9a-4593-b705-005b34c18c18"
            });

            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/documents/%7BdocumentId%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/documents/%7BdocumentId%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',
              priority: 100,
              content: {
                someBoolean: true,
                someString: 'Lorem ipsum',
                aNestedDocument: '{% document exampleslug %}'
              },
              schema: 'containers',
              groupId: '43c97b25-4a10-45d0-99b7-d472eea2bb24',
              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'
              },
              directoryId: '786c2ec1-fb9a-4593-b705-005b34c18c18'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"name":"string","priority":100,"content":{"someBoolean":true,"someString":"Lorem ipsum","aNestedDocument":"{% document exampleslug %}"},"schema":"containers","groupId":"43c97b25-4a10-45d0-99b7-d472eea2bb24","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"},"directoryId":"786c2ec1-fb9a-4593-b705-005b34c18c18"}');

            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/documents/%7BdocumentId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\",\"priority\":100,\"content\":{\"someBoolean\":true,\"someString\":\"Lorem ipsum\",\"aNestedDocument\":\"{% document exampleslug %}\"},\"schema\":\"containers\",\"groupId\":\"43c97b25-4a10-45d0-99b7-d472eea2bb24\",\"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\"},\"directoryId\":\"786c2ec1-fb9a-4593-b705-005b34c18c18\"}")
              .asString();
    get:
      tags:
        - Documents
      summary: Get document by UUID
      description: |
        Retrieve a document and its metadata. The content isn't processed.

        ---

        **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: get-document
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-PathDocumentUuid"
      responses:
        "200":
          $ref: "#/components/responses/schema-service-rawDocumentJsonResponse"
        "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/asset-management#tag/Documents/operation/get-document
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    delete:
      tags:
        - Documents
      summary: Delete document
      description: |
        Delete a document. 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:** `SCHEMA_SERVICE_SCHEMA_DELETE`

        **User role permission required:** `assets_docs: delete`
      operationId: delete-document
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-PathDocumentUuid"
      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/asset-management#tag/Documents/operation/delete-document
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/documents/{documentId}/copy:
    post:
      tags:
        - Documents
      summary: Copy document
      description: |
        Copy a document.The copy receives the DRAFT status, regardless of the status of the original document.

        ---

        **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-document
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-PathDocumentUuid"
      responses:
        "200":
          description: Data of the created copy
          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/asset-management#tag/Documents/operation/copy-document
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%7D/copy")
              .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/v2/documents/{documentId}/directory/{directoryId}/attach:
    post:
      tags:
        - Documents
      summary: Assign document to directory
      description: |
        Assign a document to a directory. A document 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-document-to-directory
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-PathDocumentUuid"
        - $ref: "#/components/parameters/schema-service-pathDirectoryId"
      responses:
        "200":
          description: Document assigned to directory
          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/asset-management#tag/Documents/operation/attach-document-to-directory
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%7D/directory/%7BdirectoryId%7D/attach")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/documents/directory/{directoryId}:
    post:
      tags:
        - Documents
      summary: Rename document directory
      description: |
        Update a document directory name.

        ---

        **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: documents-update-name-directory
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathDirectoryId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-RenameDirectory"
      responses:
        "200":
          description: Directory renamed
          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/asset-management#tag/Documents/operation/documents-update-name-directory
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/documents/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/documents/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/documents/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/documents/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/documents/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/documents/directory/%7BdirectoryId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\"}")
              .asString();
    delete:
      tags:
        - Documents
      summary: Delete document directory
      description: |
        Delete a directory. The contents are moved into the default directory.

        ---

        **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: documents-delete-directory
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathDirectoryId"
      responses:
        "200":
          description: Directory deleted
          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/asset-management#tag/Documents/operation/documents-delete-directory
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/schema-service/v2/documents/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/documents/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/documents/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/documents/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/documents/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/documents/directory/%7BdirectoryId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/documents/directory:
    get:
      tags:
        - Documents
      summary: List document directories
      description: |
        Returns a list of 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_READ`

        **User role permission required:** `assets_docs: read`
      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: documents-directory-list
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Documents/operation/documents-directory-list
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/v2/documents/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/documents/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/documents/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/documents/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/documents/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/documents/directory")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - Documents
      summary: Add document directory
      operationId: documents-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/asset-management#tag/Documents/operation/documents-add-directory
      description: |
        

        ---

        **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`
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/documents/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/documents/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/documents/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/documents/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/documents/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/documents/directory")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\"}")
              .asString();
  /schema-service/v2/groups/{groupId}:
    delete:
      tags:
        - Documents
      summary: Delete document group
      description: |
        Delete a document group. The documents that were in this group are no longer assigned to any group.

        ---

        **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: deleteGroup
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathGroupId"
      responses:
        "200":
          description: Success, details of the deleted group are returned in the response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-Group"
        "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/asset-management#tag/Documents/operation/deleteGroup
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/schema-service/v2/groups/%7BgroupId%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/groups/%7BgroupId%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/groups/%7BgroupId%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/groups/%7BgroupId%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/groups/%7BgroupId%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/groups/%7BgroupId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/groups:
    post:
      tags:
        - Documents
      summary: Add group
      description: |
        Create a new document group.

        ---

        **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: addGroup
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              title: add group
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  description: Name of the group
      responses:
        "200":
          description: Created group
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-Group"
        "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/asset-management#tag/Documents/operation/addGroup
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/groups \
              --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/groups", 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/groups");
            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/groups",
              "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/groups');
            $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/groups")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\"}")
              .asString();
    get:
      tags:
        - Documents
      summary: List groups
      description: |
        Returns a list of groups.

        ---

        **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 groups
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/schema-service-Group"
        "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: groups-list
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Documents/operation/groups-list
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/v2/groups \
              --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/groups", 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/groups");
            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/groups",
              "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/groups');
            $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/groups")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/documents/{documentId}/status/finish:
    post:
      tags:
        - Documents
      summary: Finish document
      description: |
        Finish a document.

        Finished documents are no longer displayed to recipients.


        ---

        **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: finishDocument
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-PathDocumentUuid"
      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/asset-management#tag/Documents/operation/finishDocument
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%7D/status/finish")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/documents/{documentId}/status/activate:
    post:
      tags:
        - Documents
      summary: Activate document
      description: |
        Activate a document. It can now be displayed to recipients.

        ---

        **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: activateDocument
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-PathDocumentUuid"
      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/asset-management#tag/Documents/operation/activateDocument
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%7D/status/activate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/documents/{documentId}/status/resume:
    post:
      tags:
        - Documents
      summary: Resume document
      description: |
        Resume a document 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: resumeDocument
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-PathDocumentUuid"
      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/asset-management#tag/Documents/operation/resumeDocument
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%7D/status/resume")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/documents/{documentId}/status/pause:
    post:
      tags:
        - Documents
      summary: Pause document
      description: |
        Pause a document to temporarily stop displaying it to recipients

        ---

        **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: pauseDocument
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-PathDocumentUuid"
      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/asset-management#tag/Documents/operation/pauseDocument
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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/documents/%7BdocumentId%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();
  /schema-service/schemaTypes:
    get:
      tags:
        - Documents
      summary: Get schema types
      description: |
        Retrieve a list of all schema types in the workspace.
        Schema types can be used to inform your application about the type of
        content included in the document's body.  
        In the Synerise Web Application, they are called "Type".


        ---

        **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: getSchemaTypes
      security:
        - JWT: []
      responses:
        "200":
          description: List of schema types
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
                  description: Schema type ID
        "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/asset-management#tag/Documents/operation/getSchemaTypes
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/schemaTypes \
              --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/schemaTypes", 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/schemaTypes");
            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/schemaTypes",
              "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/schemaTypes');
            $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/schemaTypes")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    delete:
      tags:
        - Documents
      summary: Delete schema types
      description: |
        Delete one or more schema types. 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: deleteSchemaTypes
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              title: delete schema types
              type: array
              items:
                type: string
                description: Schema ID. Ensure that the IDs are exactly the same as in the database, including escape characters.
        required: true
      responses:
        "200":
          description: Deletion status
          content:
            application/json:
              schema:
                type: boolean
                description: "`true` if successful"
        "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/asset-management#tag/Documents/operation/deleteSchemaTypes
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/schema-service/schemaTypes \
              --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("DELETE", "/schema-service/schemaTypes", 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("DELETE", "https://api.synerise.com/schema-service/schemaTypes");
            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": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/schemaTypes",
              "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/schemaTypes');
            $request->setMethod(HTTP_METH_DELETE);

            $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.delete("https://api.synerise.com/schema-service/schemaTypes")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[\"string\"]")
              .asString();
    post:
      tags:
        - Documents
      summary: Add schema type
      description: |
        Create a new schema type.  
        Schema types can be used to inform your application about the type of
        content included in the document's body.  
        In the Synerise Web Application, they are called "Type".


        ---

        **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: addSchemaType
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              title: add schema type
              type: string
              description: Schema type name.
        required: true
      responses:
        "200":
          description: Schema created
          content:
            application/json:
              schema:
                type: string
                description: Schema name
        "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/asset-management#tag/Documents/operation/addSchemaType
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/schemaTypes \
              --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/schemaTypes", 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/schemaTypes");
            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/schemaTypes",
              "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/schemaTypes');
            $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/schemaTypes")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("\"string\"")
              .asString();
  /schema-service/document/preview:
    post:
      deprecated: true
      tags:
        - Documents (legacy)
      summary: Preview document
      description: |
        Preview a document.

        ---

        **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: update`
      operationId: documentPreview
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-previewReq"
        required: true
      responses:
        "200":
          description: JSON content of the document
          content:
            application/json:
              schema:
                type: object
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Documents-(legacy)/operation/documentPreview
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/document/preview \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"content":{},"schema":"containers"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"content\":{},\"schema\":\"containers\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/schema-service/document/preview", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "content": {},
              "schema": "containers"
            });

            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/document/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": "/schema-service/document/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({content: {}, schema: 'containers'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/document/preview');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"content":{},"schema":"containers"}');

            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/document/preview")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"content\":{},\"schema\":\"containers\"}")
              .asString();
  /schema-service/document/{uuid}:
    post:
      deprecated: true
      tags:
        - Documents (legacy)
      operationId: documentVersionPost
      summary: Create document version
      description: |
        Create a new version of a document. To modify an existing version of a document, see [Update document](#operation/documentUpdatePost).

        ---

        **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: update`
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathDocumentUuidLegacy"
      requestBody:
        content:
          application/json:
            schema:
              title: create document version
              type: object
              properties:
                content:
                  $ref: "#/components/schemas/schema-service-documentContent"
                description:
                  $ref: "#/components/schemas/schema-service-documentDescription"
                name:
                  $ref: "#/components/schemas/schema-service-documentName"
                version:
                  $ref: "#/components/schemas/schema-service-documentVersion"
      responses:
        "200":
          description: Document
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/schema-service-documentView"
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Documents-(legacy)/operation/documentVersionPost
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/document/%7Buuid%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"content":{},"description":"string","name":"string","version":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"content\":{},\"description\":\"string\",\"name\":\"string\",\"version\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/schema-service/document/%7Buuid%7D", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "content": {},
              "description": "string",
              "name": "string",
              "version": "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/document/%7Buuid%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/document/%7Buuid%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({content: {}, description: 'string', name: 'string', version: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/document/%7Buuid%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"content":{},"description":"string","name":"string","version":"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/document/%7Buuid%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"content\":{},\"description\":\"string\",\"name\":\"string\",\"version\":\"string\"}")
              .asString();
  /schema-service/document/{id}:
    get:
      deprecated: true
      tags:
        - Documents (legacy)
      summary: Get raw document
      description: |
        Retrieve a single document in raw form (inserts are not processed).

        ---

        **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: rawDocumentGet
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathDocumentIdLegacy"
      responses:
        "200":
          description: Raw document
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-documentView"
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Documents-(legacy)/operation/rawDocumentGet
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/document/%7Bid%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/document/%7Bid%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/document/%7Bid%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/document/%7Bid%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/document/%7Bid%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/document/%7Bid%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/document/{uuid}/{id}:
    post:
      deprecated: true
      tags:
        - Documents (legacy)
      operationId: documentUpdatePost
      summary: Update document
      description: |
        Update an existing version of a document. This endpoint does not create a new version. To create a new version, see [Create document version](#operation/documentVersionPost).

        ---

        **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: update`
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathDocumentUuidLegacy"
        - $ref: "#/components/parameters/schema-service-pathDocumentIdLegacy"
      requestBody:
        content:
          application/json:
            schema:
              title: update document
              type: object
              properties:
                content:
                  $ref: "#/components/schemas/schema-service-documentContent"
                description:
                  $ref: "#/components/schemas/schema-service-documentDescription"
                name:
                  $ref: "#/components/schemas/schema-service-documentName"
      responses:
        "200":
          description: Updated document
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-documentView"
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Documents-(legacy)/operation/documentUpdatePost
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/document/%7Buuid%7D/%7Bid%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"content":{},"description":"string","name":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"content\":{},\"description\":\"string\",\"name\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/schema-service/document/%7Buuid%7D/%7Bid%7D", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "content": {},
              "description": "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/document/%7Buuid%7D/%7Bid%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/document/%7Buuid%7D/%7Bid%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({content: {}, description: 'string', name: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/document/%7Buuid%7D/%7Bid%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"content":{},"description":"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/document/%7Buuid%7D/%7Bid%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"content\":{},\"description\":\"string\",\"name\":\"string\"}")
              .asString();
  /schema-service/v2/document/slug/{slug}/content:
    get:
      deprecated: true
      tags:
        - Documents (legacy)
      summary: Generate processed document (only content)
      description: |
        Retrieve a generated document, without any metadata in the response. Inserts are processed.

        ---

        **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=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>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `SCHEMA_SERVICE_DOCUMENT_READ`

        **User role permission required:** `assets_docs: read`
      operationId: generateContentDocumentGetV2
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-PathDocumentSlug"
      responses:
        "200":
          description: Generated document
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: "#/components/schemas/schema-service-documentContent"
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Documents-(legacy)/operation/generateContentDocumentGetV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/v2/document/slug/%7Bslug%7D/content \
              --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/document/slug/%7Bslug%7D/content", 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/document/slug/%7Bslug%7D/content");
            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/document/slug/%7Bslug%7D/content",
              "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/document/slug/%7Bslug%7D/content');
            $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/document/slug/%7Bslug%7D/content")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/document/slug/{slug}/content:
    post:
      deprecated: true
      tags:
        - Documents (legacy)
      summary: Generate processed document (only content)
      description: |
        Retrieve a generated document, without any metadata in the response. Inserts are processed.

        ---

        **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=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>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `SCHEMA_SERVICE_DOCUMENT_READ`

        **User role permission required:** `assets_docs: read`
      operationId: generateContentDocumentPost
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathDocumentSlugLegacy"
        - in: query
          name: version
          description: Document version. If not provided, defaults to the latest version.
          required: false
          schema:
            type: string
        - in: query
          name: page
          description: Page of items in the document
          required: false
          schema:
            type: integer
        - in: query
          name: limit
          description: Limit of items per page
          required: false
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              title: generate processed document
              type: object
              additionalProperties:
                type: string
      responses:
        "200":
          description: Generated document
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: "#/components/schemas/schema-service-documentContent"
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Documents-(legacy)/operation/generateContentDocumentPost
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api.synerise.com/schema-service/document/slug/%7Bslug%7D/content?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE' \
              --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/document/slug/%7Bslug%7D/content?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE", 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/document/slug/%7Bslug%7D/content?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE");
            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/document/slug/%7Bslug%7D/content?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE",
              "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/document/slug/%7Bslug%7D/content');
            $request->setMethod(HTTP_METH_POST);

            $request->setQueryData([
              'version' => 'SOME_STRING_VALUE',
              'page' => 'SOME_INTEGER_VALUE',
              'limit' => 'SOME_INTEGER_VALUE'
            ]);

            $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/document/slug/%7Bslug%7D/content?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"property1\":\"string\",\"property2\":\"string\"}")
              .asString();
    get:
      deprecated: true
      tags:
        - Documents (legacy)
      summary: Generate processed document (only content)
      description: |
        Retrieve a generated document, without any metadata in the response. Inserts are processed.

        ---

        **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=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>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `SCHEMA_SERVICE_DOCUMENT_READ`

        **User role permission required:** `assets_docs: read`
      operationId: generateContentDocumentGet
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathDocumentSlugLegacy"
        - in: query
          name: version
          description: Document version. If not provided, defaults to the latest version.
          required: false
          schema:
            type: string
        - in: query
          name: page
          description: Page of items in the document
          required: false
          schema:
            type: integer
        - in: query
          name: limit
          description: Limit of items per page
          required: false
          schema:
            type: integer
      responses:
        "200":
          description: Generated document
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: "#/components/schemas/schema-service-documentContent"
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Documents-(legacy)/operation/generateContentDocumentGet
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/schema-service/document/slug/%7Bslug%7D/content?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=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/document/slug/%7Bslug%7D/content?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=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/document/slug/%7Bslug%7D/content?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=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/document/slug/%7Bslug%7D/content?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=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/document/slug/%7Bslug%7D/content');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'version' => 'SOME_STRING_VALUE',
              'page' => 'SOME_INTEGER_VALUE',
              'limit' => '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/document/slug/%7Bslug%7D/content?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/document/certification/{slug}:
    get:
      deprecated: true
      tags:
        - Documents (legacy)
      summary: Generate certification document with specific slug.
      description: |
        Retrieve a certification document. Inserts are processed.

        ---

        **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=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>

        **User role permission required:** `assets_docs: read`
      operationId: generateCertificationDocumentBySlugGet
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathDocumentSlugLegacy"
        - in: query
          name: version
          description: Document version. If not provided, defaults to the latest version.
          required: false
          schema:
            type: string
        - in: query
          name: page
          description: Page of items in the document
          required: false
          schema:
            type: integer
        - in: query
          name: limit
          description: Limit of items per page
          required: false
          schema:
            type: integer
      responses:
        "200":
          description: Generated document
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: "#/components/schemas/schema-service-documentContent"
                  schema:
                    $ref: "#/components/schemas/schema-service-DocumentSchema"
                  slug:
                    $ref: "#/components/schemas/schema-service-DocumentSlug"
                  uuid:
                    type: string
                    format: uuid
                    description: Document UUID. The UUID is the same for all versions of a document.
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Documents-(legacy)/operation/generateCertificationDocumentBySlugGet
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/schema-service/document/certification/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=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/document/certification/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=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/document/certification/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=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/document/certification/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=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/document/certification/%7Bslug%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'version' => 'SOME_STRING_VALUE',
              'page' => 'SOME_INTEGER_VALUE',
              'limit' => '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/document/certification/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/document/slug/{slug}:
    post:
      deprecated: true
      tags:
        - Documents (legacy)
      summary: Generate processed document
      description: |
        Retrieve a generated document. Inserts are processed.

        ---

        **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=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>

        **User role permission required:** `assets_docs: read`
      operationId: generateDocumentPost
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathDocumentSlugLegacy"
        - in: query
          name: version
          description: Document version. If not provided, defaults to the latest version.
          required: false
          schema:
            type: string
        - in: query
          name: page
          description: Page of items in the document
          required: false
          schema:
            type: integer
        - in: query
          name: limit
          description: Limit of items per page
          required: false
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties:
                type: string
      responses:
        "200":
          description: Generated document
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: "#/components/schemas/schema-service-documentContent"
                  schema:
                    $ref: "#/components/schemas/schema-service-DocumentSchema"
                  slug:
                    $ref: "#/components/schemas/schema-service-DocumentSlug"
                  uuid:
                    type: string
                    format: uuid
                    description: Document UUID. The UUID is the same for all versions of a document.
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Documents-(legacy)/operation/generateDocumentPost
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api.synerise.com/schema-service/document/slug/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE' \
              --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/document/slug/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE", 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/document/slug/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE");
            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/document/slug/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE",
              "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/document/slug/%7Bslug%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setQueryData([
              'version' => 'SOME_STRING_VALUE',
              'page' => 'SOME_INTEGER_VALUE',
              'limit' => 'SOME_INTEGER_VALUE'
            ]);

            $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/document/slug/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"property1\":\"string\",\"property2\":\"string\"}")
              .asString();
    get:
      deprecated: true
      tags:
        - Documents (legacy)
      summary: Generate processed document
      description: |
        Retrieve a generated document. Inserts are processed.

        ---

        **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=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>

        **User role permission required:** `assets_docs: read`
      operationId: generateDocumentGet
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathDocumentSlugLegacy"
        - in: query
          name: version
          description: Document version. If not provided, defaults to the latest version.
          required: false
          schema:
            type: string
        - in: query
          name: page
          description: Page of items in the document
          required: false
          schema:
            type: integer
        - in: query
          name: limit
          description: Limit of items per page
          required: false
          schema:
            type: integer
      responses:
        "200":
          description: Generated document
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: "#/components/schemas/schema-service-documentContent"
                  schema:
                    $ref: "#/components/schemas/schema-service-DocumentSchema"
                  slug:
                    $ref: "#/components/schemas/schema-service-DocumentSlug"
                  uuid:
                    type: string
                    format: uuid
                    description: Document UUID. The UUID is the same for all versions of a document.
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Documents-(legacy)/operation/generateDocumentGet
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/schema-service/document/slug/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=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/document/slug/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=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/document/slug/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=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/document/slug/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=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/document/slug/%7Bslug%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'version' => 'SOME_STRING_VALUE',
              'page' => 'SOME_INTEGER_VALUE',
              'limit' => '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/document/slug/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/document/by-schema/{schema}:
    get:
      deprecated: true
      tags:
        - Documents (legacy)
      summary: Generate documents by schema
      description: |
        Generate all documents assigned to a schema. The content is processed.

        ---

        **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=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>

        **User role permission required:** `assets_docs: read`
      operationId: documentsBySchemaGet
      security:
        - JWT: []
      parameters:
        - in: path
          name: schema
          description: Schema name
          required: true
          schema:
            type: string
        - in: query
          name: version
          description: Document version. If not defined, all document versions are generated.
          required: false
          schema:
            type: string
        - in: query
          name: page
          description: Page of items in the document
          required: false
          schema:
            type: integer
        - in: query
          name: limit
          description: Limit of items per page
          required: false
          schema:
            type: integer
      responses:
        "200":
          description: Generated documents
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    content:
                      $ref: "#/components/schemas/schema-service-documentContent"
                    schema:
                      $ref: "#/components/schemas/schema-service-DocumentSchema"
                    slug:
                      $ref: "#/components/schemas/schema-service-DocumentSlug"
                    uuid:
                      type: string
                      format: uuid
                      description: Document UUID. The UUID is the same for all versions of a document.
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Documents-(legacy)/operation/documentsBySchemaGet
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/schema-service/document/by-schema/%7Bschema%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=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/document/by-schema/%7Bschema%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=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/document/by-schema/%7Bschema%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=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/document/by-schema/%7Bschema%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=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/document/by-schema/%7Bschema%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'version' => 'SOME_STRING_VALUE',
              'page' => 'SOME_INTEGER_VALUE',
              'limit' => '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/document/by-schema/%7Bschema%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/document:
    post:
      deprecated: true
      tags:
        - Documents (legacy)
      summary: Create document
      description: |
        Create a new document.

        ---

        **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: createDocumentPostOld
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-createDocumentReq"
      responses:
        "200":
          description: Document data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-documentView"
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Documents-(legacy)/operation/createDocumentPostOld
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/document \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"slug":"basket","schema":"containers","name":"string","description":"string","content":{},"version":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"slug\":\"basket\",\"schema\":\"containers\",\"name\":\"string\",\"description\":\"string\",\"content\":{},\"version\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/schema-service/document", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "slug": "basket",
              "schema": "containers",
              "name": "string",
              "description": "string",
              "content": {},
              "version": "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/document");
            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/document",
              "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: 'basket',
              schema: 'containers',
              name: 'string',
              description: 'string',
              content: {},
              version: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/document');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"slug":"basket","schema":"containers","name":"string","description":"string","content":{},"version":"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/document")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"slug\":\"basket\",\"schema\":\"containers\",\"name\":\"string\",\"description\":\"string\",\"content\":{},\"version\":\"string\"}")
              .asString();
    get:
      deprecated: true
      tags:
        - Documents (legacy)
      summary: List documents
      description: |
        List all documents in the workspace. You can sort and filter the results. The content is raw.

        ---

        **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: listDocumentsGet
      security:
        - JWT: []
      parameters:
        - in: query
          name: search
          description: "Search term. The following fields are searched: `name`, `description`, `version`, `slug`."
          required: false
          schema:
            type: string
        - in: query
          name: sortBy
          description: Parameter to sort by
          required: false
          schema:
            type: string
            enum:
              - slug:asc
              - slug:desc
              - name:asc
              - name:desc
              - version:asc
              - version:desc
              - id:asc
              - id:desc
        - in: query
          name: limit
          description: The maximum number of items to retrieve for pagination
          required: false
          schema:
            type: string
        - in: query
          name: offset
          description: Offset for pagination. The first item of the first page has the offset of `0`.
          required: false
          schema:
            type: string
      responses:
        "200":
          description: List of documents
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-documentsResponse"
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Documents-(legacy)/operation/listDocumentsGet
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/schema-service/document?search=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&limit=SOME_STRING_VALUE&offset=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/document?search=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&limit=SOME_STRING_VALUE&offset=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/document?search=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&limit=SOME_STRING_VALUE&offset=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/document?search=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&limit=SOME_STRING_VALUE&offset=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/document');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'search' => 'SOME_STRING_VALUE',
              'sortBy' => 'SOME_STRING_VALUE',
              'limit' => 'SOME_STRING_VALUE',
              'offset' => '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/document?search=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    delete:
      deprecated: true
      tags:
        - Documents (legacy)
      summary: Delete documents
      description: |
        You can delete one or more documents. 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: documentsDelete
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              title: delete documents
              type: array
              items:
                type: string
                description: Document UUID
        required: true
      responses:
        "200":
          description: Deletion status
          content:
            application/json:
              schema:
                type: boolean
                description: "`true` when successful"
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Documents-(legacy)/operation/documentsDelete
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/schema-service/document \
              --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("DELETE", "/schema-service/document", 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("DELETE", "https://api.synerise.com/schema-service/document");
            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": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/document",
              "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/document');
            $request->setMethod(HTTP_METH_DELETE);

            $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.delete("https://api.synerise.com/schema-service/document")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[\"string\"]")
              .asString();
  /schema-service/document/{uuid}/versions:
    get:
      deprecated: true
      tags:
        - Documents (legacy)
      summary: Get document versions
      description: |
        Retrieve all versions of a document. The content is raw.

        ---

        **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: documentVersionsGet
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathDocumentUuidLegacy"
      responses:
        "200":
          description: List of document versions
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/schema-service-documentView"
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Documents-(legacy)/operation/documentVersionsGet
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/document/%7Buuid%7D/versions \
              --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/document/%7Buuid%7D/versions", 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/document/%7Buuid%7D/versions");
            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/document/%7Buuid%7D/versions",
              "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/document/%7Buuid%7D/versions');
            $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/document/%7Buuid%7D/versions")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/document/{uuid}/publish:
    post:
      deprecated: true
      tags:
        - Documents (legacy)
      summary: Publish document
      description: |
        Publish a document. You must provide a version in the request body.

        ---

        **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: update`
      operationId: documentPublishPost
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathDocumentUuidLegacy"
      requestBody:
        content:
          application/json:
            schema:
              title: publish document
              type: string
              description: Version of the document
              example: 1.0.5
        required: true
      responses:
        "200":
          description: Publishing status
          content:
            application/json:
              schema:
                type: boolean
                description: "`true` when the document is published"
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Documents-(legacy)/operation/documentPublishPost
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/document/%7Buuid%7D/publish \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '"1.0.5"'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "\"1.0.5\""

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/schema-service/document/%7Buuid%7D/publish", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify("1.0.5");

            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/document/%7Buuid%7D/publish");
            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/document/%7Buuid%7D/publish",
              "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('1.0.5'));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/document/%7Buuid%7D/publish');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('"1.0.5"');

            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/document/%7Buuid%7D/publish")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("\"1.0.5\"")
              .asString();
  /schema-service/document/slug/{slug}/check:
    get:
      deprecated: true
      tags:
        - Documents (legacy)
      summary: Check if slug is correct
      description: |
        Check if the provided slug exists.

        ---

        **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: slugCheckGet
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathDocumentSlugLegacy"
      responses:
        "200":
          description: True or False
          content:
            application/json:
              schema:
                type: boolean
                description: "`true` if the slug is correct"
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Documents-(legacy)/operation/slugCheckGet
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/document/slug/%7Bslug%7D/check \
              --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/document/slug/%7Bslug%7D/check", 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/document/slug/%7Bslug%7D/check");
            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/document/slug/%7Bslug%7D/check",
              "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/document/slug/%7Bslug%7D/check');
            $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/document/slug/%7Bslug%7D/check")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/indices/{indexId}/synonyms:
    get:
      summary: Get synonyms
      description: |
        Retrieve a list of synonyms.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SYNONYMS_SEARCH_READ`

        **User role permission required:** `assets_search: read`
      operationId: GetSynonymsV2
      tags:
        - Synonyms
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/synonyms-crud-inPathIndexId"
        - $ref: "#/components/parameters/synonyms-crud-paginationPage"
        - $ref: "#/components/parameters/synonyms-crud-paginationLimit"
        - $ref: "#/components/parameters/synonyms-crud-paginationSortBy"
        - $ref: "#/components/parameters/synonyms-crud-paginationOrdering"
        - $ref: "#/components/parameters/synonyms-crud-paginationIncludeMeta"
        - $ref: "#/components/parameters/synonyms-crud-source"
        - $ref: "#/components/parameters/synonyms-crud-state"
        - $ref: "#/components/parameters/synonyms-crud-synonymType"
        - $ref: "#/components/parameters/synonyms-crud-search"
        - $ref: "#/components/parameters/synonyms-crud-confidence"
      responses:
        "200":
          description: List of synonyms returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/synonyms-crud-PaginatedSynonyms"
        "500":
          description: Some error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/synonyms-crud-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Synonyms/operation/GetSynonymsV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms?page=4&limit=100&sortBy=confidence%3Aasc&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&source=SOME_STRING_VALUE&state=SOME_STRING_VALUE&type=SOME_STRING_VALUE&search=SOME_STRING_VALUE&confidence=SOME_NUMBER_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/synonyms?page=4&limit=100&sortBy=confidence%3Aasc&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&source=SOME_STRING_VALUE&state=SOME_STRING_VALUE&type=SOME_STRING_VALUE&search=SOME_STRING_VALUE&confidence=SOME_NUMBER_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms?page=4&limit=100&sortBy=confidence%3Aasc&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&source=SOME_STRING_VALUE&state=SOME_STRING_VALUE&type=SOME_STRING_VALUE&search=SOME_STRING_VALUE&confidence=SOME_NUMBER_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/synonyms?page=4&limit=100&sortBy=confidence%3Aasc&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&source=SOME_STRING_VALUE&state=SOME_STRING_VALUE&type=SOME_STRING_VALUE&search=SOME_STRING_VALUE&confidence=SOME_NUMBER_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => '4',
              'limit' => '100',
              'sortBy' => 'confidence:asc',
              'ordering' => 'SOME_STRING_VALUE',
              'includeMeta' => 'SOME_BOOLEAN_VALUE',
              'source' => 'SOME_STRING_VALUE',
              'state' => 'SOME_STRING_VALUE',
              'type' => 'SOME_STRING_VALUE',
              'search' => 'SOME_STRING_VALUE',
              'confidence' => 'SOME_NUMBER_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms?page=4&limit=100&sortBy=confidence%3Aasc&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&source=SOME_STRING_VALUE&state=SOME_STRING_VALUE&type=SOME_STRING_VALUE&search=SOME_STRING_VALUE&confidence=SOME_NUMBER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Create synonym
      description: |
        Creates a new synonym.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SYNONYMS_SEARCH_CREATE`

        **User role permission required:** `assets_search: create`
      operationId: PostSynonymV2
      tags:
        - Synonyms
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/synonyms-crud-inPathIndexId"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  $ref: "#/components/schemas/synonyms-crud-Type"
                word:
                  $ref: "#/components/schemas/synonyms-crud-Word"
                synonyms:
                  $ref: "#/components/schemas/synonyms-crud-Synonyms"
                confidence:
                  $ref: "#/components/schemas/synonyms-crud-Confidence"
                reason:
                  $ref: "#/components/schemas/synonyms-crud-Reason"
                source:
                  $ref: "#/components/schemas/synonyms-crud-SynonymSource"
                state:
                  $ref: "#/components/schemas/synonyms-crud-SynonymState"
              required:
                - synonyms
        description: Request for creating new synonym
        required: true
      responses:
        "200":
          description: Id of created synonym returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/synonyms-crud-SingleSynonym"
        "500":
          description: Some error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/synonyms-crud-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Synonyms/operation/PostSynonymV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"type":"oneway","word":"string","synonyms":["string"],"confidence":1,"reason":"string","source":"User","state":"New"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"type\":\"oneway\",\"word\":\"string\",\"synonyms\":[\"string\"],\"confidence\":1,\"reason\":\"string\",\"source\":\"User\",\"state\":\"New\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/synonyms", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "type": "oneway",
              "word": "string",
              "synonyms": [
                "string"
              ],
              "confidence": 1,
              "reason": "string",
              "source": "User",
              "state": "New"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/synonyms",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              type: 'oneway',
              word: 'string',
              synonyms: ['string'],
              confidence: 1,
              reason: 'string',
              source: 'User',
              state: 'New'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"type":"oneway","word":"string","synonyms":["string"],"confidence":1,"reason":"string","source":"User","state":"New"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"type\":\"oneway\",\"word\":\"string\",\"synonyms\":[\"string\"],\"confidence\":1,\"reason\":\"string\",\"source\":\"User\",\"state\":\"New\"}")
              .asString();
  /search/v2/indices/{indexId}/synonyms/batch:
    post:
      summary: Batch insert synonyms
      description: |
        Insert multiple synonyms into an index at once.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SYNONYMS_SEARCH_CREATE`

        **User role permission required:** `assets_search: create`
      operationId: BatchSynonyms
      tags:
        - Synonyms
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/synonyms-crud-sourceForImport"
        - $ref: "#/components/parameters/synonyms-crud-inPathIndexId"
      requestBody:
        $ref: "#/components/requestBodies/synonyms-crud-CsvBody"
      responses:
        "200":
          description: Summary of batch insertion
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/synonyms-crud-BatchResponse"
        "500":
          description: Some error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/synonyms-crud-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Synonyms/operation/BatchSynonyms
  /search/v2/indices/{indexId}/synonyms/replace-all:
    post:
      summary: Replace all synonyms
      description: |
        <span style="color:red"><strong>Deletes all existing synonyms</strong></span> from an index and then inserts multiple new synonyms at once.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SYNONYMS_SEARCH_UPDATE`

        **User role permission required:** `assets_search: update`
      operationId: ReplaceAllSynonyms
      tags:
        - Synonyms
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/synonyms-crud-inPathIndexId"
        - $ref: "#/components/parameters/synonyms-crud-sourceForImport"
      requestBody:
        $ref: "#/components/requestBodies/synonyms-crud-CsvBody"
      responses:
        "204":
          description: All synonyms replaced
        "500":
          description: Some error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/synonyms-crud-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Synonyms/operation/ReplaceAllSynonyms
  /search/v2/indices/{indexId}/synonyms/{synonymId}:
    get:
      summary: Get synonym
      description: |
        Retrieves a synonym.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SYNONYMS_SEARCH_READ`

        **User role permission required:** `assets_search: read`
      operationId: GetSynonymV2
      tags:
        - Synonyms
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/synonyms-crud-inPathSynonymId"
        - $ref: "#/components/parameters/synonyms-crud-inPathIndexId"
      responses:
        "200":
          description: Synonym returned.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/synonyms-crud-SingleSynonym"
        "500":
          description: Some error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/synonyms-crud-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Synonyms/operation/GetSynonymV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    put:
      summary: Update synonym
      description: |
        Updates a synonym identified by `id`.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SYNONYMS_SEARCH_UPDATE`

        **User role permission required:** `assets_search: update`
      operationId: PutSynonym
      tags:
        - Synonyms
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/synonyms-crud-inPathSynonymId"
        - $ref: "#/components/parameters/synonyms-crud-inPathIndexId"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  $ref: "#/components/schemas/synonyms-crud-Type"
                word:
                  $ref: "#/components/schemas/synonyms-crud-Word"
                synonyms:
                  $ref: "#/components/schemas/synonyms-crud-Synonyms"
                confidence:
                  $ref: "#/components/schemas/synonyms-crud-Confidence"
                reason:
                  $ref: "#/components/schemas/synonyms-crud-Reason"
                source:
                  $ref: "#/components/schemas/synonyms-crud-SynonymSource"
                state:
                  $ref: "#/components/schemas/synonyms-crud-SynonymState"
              required:
                - synonyms
        description: Request for creating new synonym
        required: true
      responses:
        "200":
          description: Updated synonym returned.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/synonyms-crud-SingleSynonym"
        "500":
          description: Some error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/synonyms-crud-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Synonyms/operation/PutSynonym
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"type":"oneway","word":"string","synonyms":["string"],"confidence":1,"reason":"string","source":"User","state":"New"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"type\":\"oneway\",\"word\":\"string\",\"synonyms\":[\"string\"],\"confidence\":1,\"reason\":\"string\",\"source\":\"User\",\"state\":\"New\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("PUT", "/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "type": "oneway",
              "word": "string",
              "synonyms": [
                "string"
              ],
              "confidence": 1,
              "reason": "string",
              "source": "User",
              "state": "New"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("PUT", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              type: 'oneway',
              word: 'string',
              synonyms: ['string'],
              confidence: 1,
              reason: 'string',
              source: 'User',
              state: 'New'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"type":"oneway","word":"string","synonyms":["string"],"confidence":1,"reason":"string","source":"User","state":"New"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.put("https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"type\":\"oneway\",\"word\":\"string\",\"synonyms\":[\"string\"],\"confidence\":1,\"reason\":\"string\",\"source\":\"User\",\"state\":\"New\"}")
              .asString();
    delete:
      summary: Delete synonym
      description: |
        Deletes a synonym with given id.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SYNONYMS_SEARCH_DELETE`

        **User role permission required:** `assets_search: delete`
      operationId: DeleteSynonymV2
      tags:
        - Synonyms
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/synonyms-crud-inPathSynonymId"
        - $ref: "#/components/parameters/synonyms-crud-inPathIndexId"
      responses:
        "204":
          description: Synonym deleted
        "500":
          description: Some error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/synonyms-crud-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Synonyms/operation/DeleteSynonymV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("DELETE", "/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("DELETE", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /tags-collector/directories:
    get:
      tags:
        - Asset tags
      summary: Get all directories
      description: |
        Gets all tag directories from 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=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `TAGS_COLLECTOR_DIRECTORY_READ`

        **User role permission required:** `assets_tags: read`
      operationId: getTagDirectories
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/tags-collector-DirectoryDto-collector"
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Asset-tags/operation/getTagDirectories
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/tags-collector/directories
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            conn.request("GET", "/tags-collector/directories")

            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/tags-collector/directories");

            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": "/tags-collector/directories",
              "headers": {}
            };

            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/tags-collector/directories');
            $request->setMethod(HTTP_METH_GET);

            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/tags-collector/directories")
              .asString();
    post:
      tags:
        - Asset tags
      summary: Create directory
      description: |
        Creates a directory.

        ---

        **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=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `TAGS_COLLECTOR_DIRECTORY_CREATE`

        **User role permission required:** `assets_tags: create`
      operationId: createDirectory
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/tags-collector-DirectoryCreateRequest-collector"
        required: true
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/tags-collector-DirectoryDto-collector"
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Asset-tags/operation/createDirectory
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/tags-collector/directories \
              --header 'content-type: application/json' \
              --data '{"name":"string","params":{"property1":"string","property2":"string"},"type":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"name\":\"string\",\"params\":{\"property1\":\"string\",\"property2\":\"string\"},\"type\":\"string\"}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/tags-collector/directories", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "name": "string",
              "params": {
                "property1": "string",
                "property2": "string"
              },
              "type": "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/tags-collector/directories");
            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": "/tags-collector/directories",
              "headers": {
                "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',
              params: {property1: 'string', property2: 'string'},
              type: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/tags-collector/directories');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"name":"string","params":{"property1":"string","property2":"string"},"type":"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/tags-collector/directories")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\",\"params\":{\"property1\":\"string\",\"property2\":\"string\"},\"type\":\"string\"}")
              .asString();
  /tags-collector/directories/types:
    get:
      tags:
        - Asset tags
      summary: Get directory types
      description: |
        Gets all directory types.

        ---

        **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=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `TAGS_COLLECTOR_DIRECTORY_READ`

        **User role permission required:** `assets_tags: read`
      operationId: getDirectoryTypes
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/tags-collector-DirectoryTypeDto-collector"
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Asset-tags/operation/getDirectoryTypes
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/tags-collector/directories/types
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            conn.request("GET", "/tags-collector/directories/types")

            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/tags-collector/directories/types");

            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": "/tags-collector/directories/types",
              "headers": {}
            };

            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/tags-collector/directories/types');
            $request->setMethod(HTTP_METH_GET);

            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/tags-collector/directories/types")
              .asString();
    post:
      tags:
        - Asset tags
      summary: Create directory type
      description: |
        Creates a directory type.

        ---

        **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=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `TAGS_COLLECTOR_DIRECTORY_UPDATE`

        **User role permission required:** `assets_tags: update`
      operationId: createDirectoryType
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/tags-collector-DirectoryTypeCreateRequest-collector"
        description: ""
        required: true
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/tags-collector-DirectoryTypeDto-collector"
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Asset-tags/operation/createDirectoryType
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/tags-collector/directories/types \
              --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 = { 'content-type': "application/json" }

            conn.request("POST", "/tags-collector/directories/types", 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/tags-collector/directories/types");
            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": "/tags-collector/directories/types",
              "headers": {
                "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/tags-collector/directories/types');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              '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/tags-collector/directories/types")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\"}")
              .asString();
  /tags-collector/directories/{directoryHash}:
    delete:
      tags:
        - Asset tags
      summary: Delete directory
      description: |
        Deletes a directory.

        ---

        **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=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `TAGS_COLLECTOR_DIRECTORY_DELETE`

        **User role permission required:** `assets_tags: delete`
      operationId: deleteDirectory
      parameters:
        - $ref: "#/components/parameters/tags-collector-DirectoryHash-collector"
      responses:
        "200":
          description: OK
        "204":
          description: No Content
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Asset-tags/operation/deleteDirectory
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            conn.request("DELETE", "/tags-collector/directories/%7BdirectoryHash%7D")

            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/tags-collector/directories/%7BdirectoryHash%7D");

            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": "/tags-collector/directories/%7BdirectoryHash%7D",
              "headers": {}
            };

            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/tags-collector/directories/%7BdirectoryHash%7D');
            $request->setMethod(HTTP_METH_DELETE);

            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/tags-collector/directories/%7BdirectoryHash%7D")
              .asString();
    patch:
      tags:
        - Asset tags
      summary: Update directory
      description: |
        Updates a directory.

        ---

        **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=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `TAGS_COLLECTOR_DIRECTORY_UPDATE`

        **User role permission required:** `assets_tags: update`
      operationId: updateDirectory
      parameters:
        - $ref: "#/components/parameters/tags-collector-DirectoryHash-collector"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/tags-collector-DirectoryUpdateRequest-collector"
        description: ""
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/tags-collector-DirectoryDto-collector"
        "204":
          description: No Content
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Asset-tags/operation/updateDirectory
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PATCH \
              --url https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D \
              --header 'content-type: application/json' \
              --data '{"name":"string","params":{"property1":"string","property2":"string"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"name\":\"string\",\"params\":{\"property1\":\"string\",\"property2\":\"string\"}}"

            headers = { 'content-type': "application/json" }

            conn.request("PATCH", "/tags-collector/directories/%7BdirectoryHash%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",
              "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("PATCH", "https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D");
            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": "/tags-collector/directories/%7BdirectoryHash%7D",
              "headers": {
                "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', params: {property1: 'string', property2: 'string'}}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            HttpRequest::methodRegister('PATCH');
            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D');
            $request->setMethod(HttpRequest::HTTP_METH_PATCH);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"name":"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.patch("https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\",\"params\":{\"property1\":\"string\",\"property2\":\"string\"}}")
              .asString();
  /tags-collector/directories/{directoryHash}/tags:
    get:
      tags:
        - Asset tags
      summary: Get tags from directory
      description: |
        Retrieve tags from a directory.

        ---

        **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=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `TAGS_COLLECTOR_DIRECTORY_READ`

        **User role permission required:** `assets_tags: read`
      operationId: getTagsUsingGET
      parameters:
        - $ref: "#/components/parameters/tags-collector-DirectoryHash-collector"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/tags-collector-TagDto-collector"
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Asset-tags/operation/getTagsUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D/tags
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            conn.request("GET", "/tags-collector/directories/%7BdirectoryHash%7D/tags")

            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/tags-collector/directories/%7BdirectoryHash%7D/tags");

            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": "/tags-collector/directories/%7BdirectoryHash%7D/tags",
              "headers": {}
            };

            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/tags-collector/directories/%7BdirectoryHash%7D/tags');
            $request->setMethod(HTTP_METH_GET);

            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/tags-collector/directories/%7BdirectoryHash%7D/tags")
              .asString();
    post:
      tags:
        - Asset tags
      summary: Assign tags to directory
      description: |
        Assign tags to a directory.

        ---

        **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=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `TAGS_COLLECTOR_DIRECTORY_UPDATE`

        **User role permission required:** `assets_tags: update`
      operationId: assignTagsUsingPOST
      parameters:
        - $ref: "#/components/parameters/tags-collector-DirectoryHash-collector"
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
                description: Hash ID of a tag
        required: true
      responses:
        "200":
          description: OK
        "201":
          description: Created
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Asset-tags/operation/assignTagsUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D/tags \
              --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 = { 'content-type': "application/json" }

            conn.request("POST", "/tags-collector/directories/%7BdirectoryHash%7D/tags", 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/tags-collector/directories/%7BdirectoryHash%7D/tags");
            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": "/tags-collector/directories/%7BdirectoryHash%7D/tags",
              "headers": {
                "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/tags-collector/directories/%7BdirectoryHash%7D/tags');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              '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/tags-collector/directories/%7BdirectoryHash%7D/tags")
              .header("content-type", "application/json")
              .body("[\"string\"]")
              .asString();
    delete:
      tags:
        - Asset tags
      summary: Unassign tags from directory
      description: |
        Unassign tags from a directory. This does not delete the tags or the directory.

        ---

        **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=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `TAGS_COLLECTOR_DIRECTORY_DELETE`

        **User role permission required:** `assets_tags: delete`
      operationId: unassignTagUsingDELETE
      parameters:
        - $ref: "#/components/parameters/tags-collector-DirectoryHash-collector"
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
                description: Hash ID of a tag
        required: true
      responses:
        "200":
          description: OK
        "204":
          description: No Content
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Asset-tags/operation/unassignTagUsingDELETE
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D/tags \
              --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 = { 'content-type': "application/json" }

            conn.request("DELETE", "/tags-collector/directories/%7BdirectoryHash%7D/tags", 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("DELETE", "https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D/tags");
            xhr.setRequestHeader("content-type", "application/json");

            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": "/tags-collector/directories/%7BdirectoryHash%7D/tags",
              "headers": {
                "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/tags-collector/directories/%7BdirectoryHash%7D/tags');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              '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.delete("https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D/tags")
              .header("content-type", "application/json")
              .body("[\"string\"]")
              .asString();
  /tags-collector/directories/{directoryHash}/types:
    put:
      tags:
        - Asset tags
      summary: Update directory type
      description: |
        Update the type of a directory.

        ---

        **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=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `TAGS_COLLECTOR_DIRECTORY_UPDATE`

        **User role permission required:** `assets_tags: update`
      operationId: updateTypeUsingPUT
      parameters:
        - $ref: "#/components/parameters/tags-collector-DirectoryHash-collector"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/tags-collector-DirectoryTypeUpdateRequest-collector"
        description: ""
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/tags-collector-DirectoryDto-collector"
        "201":
          description: Created
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Asset-tags/operation/updateTypeUsingPUT
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D/types \
              --header 'content-type: application/json' \
              --data '{"directoryTypeHash":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"directoryTypeHash\":\"string\"}"

            headers = { 'content-type': "application/json" }

            conn.request("PUT", "/tags-collector/directories/%7BdirectoryHash%7D/types", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "directoryTypeHash": "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/tags-collector/directories/%7BdirectoryHash%7D/types");
            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": "/tags-collector/directories/%7BdirectoryHash%7D/types",
              "headers": {
                "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({directoryTypeHash: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D/types');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"directoryTypeHash":"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/tags-collector/directories/%7BdirectoryHash%7D/types")
              .header("content-type", "application/json")
              .body("{\"directoryTypeHash\":\"string\"}")
              .asString();
  /tags-collector/tags:
    get:
      tags:
        - Asset tags
      summary: Get tag list
      description: |
        Gets a paginated list of tags that can be assigned to assets, for example promotions.

        ---

        **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=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `TAGS_COLLECTOR_TAG_READ`

        **User role permission required:** `assets_tags: read`
      operationId: getTagList
      parameters:
        - in: query
          name: page
          description: Page to retrieve
          required: false
          schema:
            type: integer
            default: 0
        - in: query
          name: size
          description: Limit of items per page
          required: false
          schema:
            type: integer
            default: 10
        - in: query
          name: directoryType
          description: Directory type
          required: false
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/tags-collector-PaginationResponse_PaginatedTagDto_"
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Asset-tags/operation/getTagList
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/tags-collector/tags?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&directoryType=SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            conn.request("GET", "/tags-collector/tags?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&directoryType=SOME_STRING_VALUE")

            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/tags-collector/tags?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&directoryType=SOME_STRING_VALUE");

            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": "/tags-collector/tags?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&directoryType=SOME_STRING_VALUE",
              "headers": {}
            };

            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/tags-collector/tags');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_INTEGER_VALUE',
              'size' => 'SOME_INTEGER_VALUE',
              'directoryType' => 'SOME_STRING_VALUE'
            ]);

            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/tags-collector/tags?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&directoryType=SOME_STRING_VALUE")
              .asString();
    post:
      tags:
        - Asset tags
      summary: Create tag
      description: |
        Creates a tag that can be assigned to assets, for example promotions.

        ---

        **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=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `TAGS_COLLECTOR_TAG_CREATE`

        **User role permission required:** `assets_tags: create`
      operationId: createTag
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/tags-collector-TagCreateRequest-collector"
        description: ""
        required: true
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/tags-collector-TagDto-collector"
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Asset-tags/operation/createTag
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/tags-collector/tags \
              --header 'content-type: application/json' \
              --data '{"color":"string","description":"string","directory":"string","icon":"string","priority":0,"value":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"color\":\"string\",\"description\":\"string\",\"directory\":\"string\",\"icon\":\"string\",\"priority\":0,\"value\":\"string\"}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/tags-collector/tags", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "color": "string",
              "description": "string",
              "directory": "string",
              "icon": "string",
              "priority": 0,
              "value": "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/tags-collector/tags");
            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": "/tags-collector/tags",
              "headers": {
                "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({
              color: 'string',
              description: 'string',
              directory: 'string',
              icon: 'string',
              priority: 0,
              value: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/tags-collector/tags');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"color":"string","description":"string","directory":"string","icon":"string","priority":0,"value":"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/tags-collector/tags")
              .header("content-type", "application/json")
              .body("{\"color\":\"string\",\"description\":\"string\",\"directory\":\"string\",\"icon\":\"string\",\"priority\":0,\"value\":\"string\"}")
              .asString();
  /tags-collector/tags/{tagHash}:
    patch:
      tags:
        - Asset tags
      summary: Update tag
      description: |
        Updates a tag definition.

        ---

        **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=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `TAGS_COLLECTOR_TAG_UPDATE`

        **User role permission required:** `assets_tags: update`
      operationId: updateTag
      parameters:
        - $ref: "#/components/parameters/tags-collector-TagHash-collector"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/tags-collector-TagUpdateRequest-collector"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/tags-collector-TagDto-collector"
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Asset-tags/operation/updateTag
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PATCH \
              --url https://api.synerise.com/tags-collector/tags/%7BtagHash%7D \
              --header 'content-type: application/json' \
              --data '{"color":"string","description":"string","directory":"string","icon":"string","priority":0,"value":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"color\":\"string\",\"description\":\"string\",\"directory\":\"string\",\"icon\":\"string\",\"priority\":0,\"value\":\"string\"}"

            headers = { 'content-type': "application/json" }

            conn.request("PATCH", "/tags-collector/tags/%7BtagHash%7D", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "color": "string",
              "description": "string",
              "directory": "string",
              "icon": "string",
              "priority": 0,
              "value": "string"
            });

            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/tags-collector/tags/%7BtagHash%7D");
            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": "/tags-collector/tags/%7BtagHash%7D",
              "headers": {
                "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({
              color: 'string',
              description: 'string',
              directory: 'string',
              icon: 'string',
              priority: 0,
              value: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            HttpRequest::methodRegister('PATCH');
            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/tags-collector/tags/%7BtagHash%7D');
            $request->setMethod(HttpRequest::HTTP_METH_PATCH);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"color":"string","description":"string","directory":"string","icon":"string","priority":0,"value":"string"}');

            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/tags-collector/tags/%7BtagHash%7D")
              .header("content-type", "application/json")
              .body("{\"color\":\"string\",\"description\":\"string\",\"directory\":\"string\",\"icon\":\"string\",\"priority\":0,\"value\":\"string\"}")
              .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();
  /uauth/auth/login/user:
    post:
      tags:
        - Authorization
      summary: Log in as User
      description: |
        Authenticate as a User.

        **Note:** To perform operations within a Workspace, you must [select a Workspace](#operation/userProfileLoginUsingPOST).

        ---

        **Authentication:** Not required
      operationId: userLogin
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/uauth-UserAuthenticationRequest"
        required: true
      responses:
        "200":
          description: Login details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uauth-AuthenticationResponse"
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      x-snr-doc-urls:
        - /api-reference/authorization#tag/Authorization/operation/userLogin
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uauth/auth/login/user \
              --header 'content-type: application/json' \
              --data '{"username":"string","password":"string","deviceId":"string","externalProviderToken":"string","externalProviderType":"GOOGLE","organizationName":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"username\":\"string\",\"password\":\"string\",\"deviceId\":\"string\",\"externalProviderToken\":\"string\",\"externalProviderType\":\"GOOGLE\",\"organizationName\":\"string\"}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/uauth/auth/login/user", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "username": "string",
              "password": "string",
              "deviceId": "string",
              "externalProviderToken": "string",
              "externalProviderType": "GOOGLE",
              "organizationName": "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/uauth/auth/login/user");
            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": "/uauth/auth/login/user",
              "headers": {
                "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({
              username: 'string',
              password: 'string',
              deviceId: 'string',
              externalProviderToken: 'string',
              externalProviderType: 'GOOGLE',
              organizationName: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uauth/auth/login/user');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"username":"string","password":"string","deviceId":"string","externalProviderToken":"string","externalProviderType":"GOOGLE","organizationName":"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/uauth/auth/login/user")
              .header("content-type", "application/json")
              .body("{\"username\":\"string\",\"password\":\"string\",\"deviceId\":\"string\",\"externalProviderToken\":\"string\",\"externalProviderType\":\"GOOGLE\",\"organizationName\":\"string\"}")
              .asString();
  /uauth/auth/login/user/mfa/verification:
    post:
      tags:
        - Authorization
      summary: Verify User multi-factor authentication
      description: |
        Authenticate as a User with multi-factor authentication.

        **Note:** To perform operations within a Workspace, you must [select a Workspace](#operation/userProfileLoginUsingPOST).

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>
      operationId: userMfaLogin
      parameters:
        - $ref: "#/components/parameters/uauth-mfaType"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/uauth-MultiFactorAuthVerificationRequest"
        required: true
      responses:
        "200":
          description: Login details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uauth-AuthenticationResponse"
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/authorization#tag/Authorization/operation/userMfaLogin
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api.synerise.com/uauth/auth/login/user/mfa/verification?mfaType=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"verificationCode":"string","deviceId":"string","externalProviderToken":"string","externalProviderType":"GOOGLE","organizationName":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"verificationCode\":\"string\",\"deviceId\":\"string\",\"externalProviderToken\":\"string\",\"externalProviderType\":\"GOOGLE\",\"organizationName\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/uauth/auth/login/user/mfa/verification?mfaType=SOME_STRING_VALUE", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "verificationCode": "string",
              "deviceId": "string",
              "externalProviderToken": "string",
              "externalProviderType": "GOOGLE",
              "organizationName": "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/uauth/auth/login/user/mfa/verification?mfaType=SOME_STRING_VALUE");
            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": "/uauth/auth/login/user/mfa/verification?mfaType=SOME_STRING_VALUE",
              "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({
              verificationCode: 'string',
              deviceId: 'string',
              externalProviderToken: 'string',
              externalProviderType: 'GOOGLE',
              organizationName: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uauth/auth/login/user/mfa/verification');
            $request->setMethod(HTTP_METH_POST);

            $request->setQueryData([
              'mfaType' => 'SOME_STRING_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"verificationCode":"string","deviceId":"string","externalProviderToken":"string","externalProviderType":"GOOGLE","organizationName":"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/uauth/auth/login/user/mfa/verification?mfaType=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"verificationCode\":\"string\",\"deviceId\":\"string\",\"externalProviderToken\":\"string\",\"externalProviderType\":\"GOOGLE\",\"organizationName\":\"string\"}")
              .asString();
  /uauth/auth/login/user/profile/{businessProfileUUID}:
    post:
      tags:
        - Authorization
      summary: Select Workspace
      description: |
        After logging in as a User, select a Workspace where you want to perform operations.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>
      operationId: userProfileLoginUsingPOST
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/uauth-businessProfileId"
      responses:
        "200":
          description: Login details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uauth-AuthenticationResponse"
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
        "423":
          $ref: "#/components/responses/uauth-423"
      x-snr-doc-urls:
        - /api-reference/authorization#tag/Authorization/operation/userProfileLoginUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uauth/auth/login/user/profile/%7BbusinessProfileUUID%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", "/uauth/auth/login/user/profile/%7BbusinessProfileUUID%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/uauth/auth/login/user/profile/%7BbusinessProfileUUID%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": "/uauth/auth/login/user/profile/%7BbusinessProfileUUID%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/uauth/auth/login/user/profile/%7BbusinessProfileUUID%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/uauth/auth/login/user/profile/%7BbusinessProfileUUID%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /uauth/business-profile/:
    get:
      tags:
        - Authorization
      summary: Get Workspaces
      description: |
        Retrieve a list of Workspaces available to the user.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>
      operationId: getBusinessProfilesUsingGET
      parameters:
        - name: page
          in: query
          description: Page number
          required: false
          schema:
            type: integer
            format: int32
            default: 0
        - name: size
          in: query
          description: Page size
          required: false
          schema:
            type: integer
            format: int32
            default: 5000
        - name: query
          in: query
          description: Search query
          required: false
          schema:
            type: string
            default: ""
        - name: sort
          in: query
          description: Sort field
          required: false
          schema:
            type: string
            default: ""
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/uauth-BusinessProfileResponse"
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/authorization#tag/Authorization/operation/getBusinessProfilesUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/uauth/business-profile/?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&query=SOME_STRING_VALUE&sort=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", "/uauth/business-profile/?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&query=SOME_STRING_VALUE&sort=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/uauth/business-profile/?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&query=SOME_STRING_VALUE&sort=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": "/uauth/business-profile/?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&query=SOME_STRING_VALUE&sort=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/uauth/business-profile/');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_INTEGER_VALUE',
              'size' => 'SOME_INTEGER_VALUE',
              'query' => 'SOME_STRING_VALUE',
              'sort' => '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/uauth/business-profile/?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&query=SOME_STRING_VALUE&sort=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /uauth/business-profile/ids:
    get:
      tags:
        - Authorization
      summary: Get Workspaces ids with user-specific data
      description: |
        Retrieve a list of workspace ids available to the user, with added user-specific data

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>
      operationId: getBusinessProfilesIdsUsingGET
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/uauth-BusinessProfileUserSpecific"
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/authorization#tag/Authorization/operation/getBusinessProfilesIdsUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/uauth/business-profile/ids \
              --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", "/uauth/business-profile/ids", 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/uauth/business-profile/ids");
            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": "/uauth/business-profile/ids",
              "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/uauth/business-profile/ids');
            $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/uauth/business-profile/ids")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /uauth/business-profile/mark-favorite:
    post:
      tags:
        - Settings
      summary: Add or remove business profile to favorites
      description: |
        Business profile can be added or removed from favorites using this endpoint

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>
      operationId: postBPFavorite
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/uauth-MarkUserFavoriteBusinessProfile"
      responses:
        "200":
          description: OK
        "400":
          description: Bad Request
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Settings/operation/postBPFavorite
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uauth/business-profile/mark-favorite \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"businessProfileGuid":"string","favorite":true}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"businessProfileGuid\":\"string\",\"favorite\":true}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/uauth/business-profile/mark-favorite", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "businessProfileGuid": "string",
              "favorite": 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/uauth/business-profile/mark-favorite");
            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": "/uauth/business-profile/mark-favorite",
              "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({businessProfileGuid: 'string', favorite: true}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uauth/business-profile/mark-favorite');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"businessProfileGuid":"string","favorite":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/uauth/business-profile/mark-favorite")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"businessProfileGuid\":\"string\",\"favorite\":true}")
              .asString();
  /uauth/business-profile/current:
    get:
      tags:
        - Authorization
      summary: Get current Workspace
      description: |
        Retrieve information about the currently selected workspace.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>
      operationId: getCurrentBusinessProfileUsingGET
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uauth-CurrentBusinessProfileResponse"
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/authorization#tag/Authorization/operation/getCurrentBusinessProfileUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/uauth/business-profile/current \
              --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", "/uauth/business-profile/current", 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/uauth/business-profile/current");
            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": "/uauth/business-profile/current",
              "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/uauth/business-profile/current');
            $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/uauth/business-profile/current")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /uauth/business-profile/mfa/requirements:
    post:
      tags:
        - Access control
      summary: Enable MFA requirement for workspace
      description: |
        This request enables multi-factor authentication requirement for the currently selected workspace. After enabling this setting, only users with MFA can access the workspace.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>
      operationId: setMfaRequirementForBusinessProfileUsingPOST
      responses:
        "200":
          description: OK
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Access-control/operation/setMfaRequirementForBusinessProfileUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uauth/business-profile/mfa/requirements \
              --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", "/uauth/business-profile/mfa/requirements", 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/uauth/business-profile/mfa/requirements");
            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": "/uauth/business-profile/mfa/requirements",
              "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/uauth/business-profile/mfa/requirements');
            $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/uauth/business-profile/mfa/requirements")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    delete:
      tags:
        - Access control
      summary: Disable MFA requirement for workspace
      description: |
        This request disables multi-factor authentication requirement for the currently selected workspace. After disabling this setting, users without MFA can access the workspace.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>
      operationId: removeMfaRequirementFromBusinessProfileUsingDELETE
      responses:
        "200":
          description: OK
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Access-control/operation/removeMfaRequirementFromBusinessProfileUsingDELETE
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/uauth/business-profile/mfa/requirements \
              --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", "/uauth/business-profile/mfa/requirements", 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/uauth/business-profile/mfa/requirements");
            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": "/uauth/business-profile/mfa/requirements",
              "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/uauth/business-profile/mfa/requirements');
            $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/uauth/business-profile/mfa/requirements")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /uauth/change-password:
    post:
      tags:
        - User account management
      summary: Change user password
      description: |
        Change a user's password.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>
      operationId: changePasswordUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/uauth-ChangePasswordRequest"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uauth-ChangePasswordResponse"
        "201":
          description: Created
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/User-account-management/operation/changePasswordUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uauth/change-password \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"currentPassword":"string","newPassword":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"currentPassword\":\"string\",\"newPassword\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/uauth/change-password", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "currentPassword": "string",
              "newPassword": "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/uauth/change-password");
            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": "/uauth/change-password",
              "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({currentPassword: 'string', newPassword: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uauth/change-password');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"currentPassword":"string","newPassword":"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/uauth/change-password")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"currentPassword\":\"string\",\"newPassword\":\"string\"}")
              .asString();
  /uauth/permissions/group/role/{roleId}:
    get:
      tags:
        - Access groups
      summary: List grouped permissions
      description: |
        List all permissions for a role, including information about permission grouping.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_users: read`
      operationId: listPermissionGroupUsingGET
      parameters:
        - $ref: "#/components/parameters/uauth-roleId"
      responses:
        "200":
          description: "This schema is **recursive**: the `children` array can include more groups, which include more groups, etc."
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/uauth-PermissionGroupDetailsDTO"
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Access-groups/operation/listPermissionGroupUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/uauth/permissions/group/role/%7BroleId%7D
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            conn.request("GET", "/uauth/permissions/group/role/%7BroleId%7D")

            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/uauth/permissions/group/role/%7BroleId%7D");

            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": "/uauth/permissions/group/role/%7BroleId%7D",
              "headers": {}
            };

            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/uauth/permissions/group/role/%7BroleId%7D');
            $request->setMethod(HTTP_METH_GET);

            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/uauth/permissions/group/role/%7BroleId%7D")
              .asString();
  /uauth/password-reset/request:
    post:
      tags:
        - User account management
      summary: Request user password reset
      description: |
        The user can request a password reset token sent by email.

        ---

        **Authentication:** Not required
      operationId: requestPasswordResetUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/uauth-PasswordResetRequest"
      responses:
        "200":
          description: OK
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/User-account-management/operation/requestPasswordResetUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uauth/password-reset/request \
              --header 'content-type: application/json' \
              --data '{"email":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"email\":\"string\"}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/uauth/password-reset/request", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "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/uauth/password-reset/request");
            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": "/uauth/password-reset/request",
              "headers": {
                "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({email: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uauth/password-reset/request');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"email":"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/uauth/password-reset/request")
              .header("content-type", "application/json")
              .body("{\"email\":\"string\"}")
              .asString();
  /uauth/password-reset/confirmation:
    post:
      tags:
        - User account management
      summary: Confirm user password reset
      description: |
        Confirm user password reset using the token received by email.

        ---

        **Authentication:** Not required
      operationId: confirmPasswordResetUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/uauth-PasswordResetConfirmation"
      responses:
        "200":
          description: OK
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/User-account-management/operation/confirmPasswordResetUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uauth/password-reset/confirmation \
              --header 'content-type: application/json' \
              --data '{"token":"string","password":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"token\":\"string\",\"password\":\"string\"}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/uauth/password-reset/confirmation", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "token": "string",
              "password": "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/uauth/password-reset/confirmation");
            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": "/uauth/password-reset/confirmation",
              "headers": {
                "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({token: 'string', password: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uauth/password-reset/confirmation');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"token":"string","password":"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/uauth/password-reset/confirmation")
              .header("content-type", "application/json")
              .body("{\"token\":\"string\",\"password\":\"string\"}")
              .asString();
  /uauth/roles/listing:
    get:
      tags:
        - Access groups
      summary: Get role groups
      description: |
        Retrieve a list of user role groups.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_users: read`
      operationId: getRoleGroupsUsingGET
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/uauth-RoleGroupResponse"
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Access-groups/operation/getRoleGroupsUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/uauth/roles/listing \
              --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", "/uauth/roles/listing", 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/uauth/roles/listing");
            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": "/uauth/roles/listing",
              "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/uauth/roles/listing');
            $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/uauth/roles/listing")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /uauth/roles/role-group:
    post:
      tags:
        - Access groups
      summary: Create role group
      description: |
        Create a new role group. A new group does not include any roles. To add a role to a group, [update the role](#operation/updateRoleUsingPOST).

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_users: create`
      operationId: createRoleGroupUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/uauth-RoleGroupDataRequest"
        required: true
      responses:
        "200":
          description: New group created; response includes all existing groups
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/uauth-RoleGroupResponse"
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Access-groups/operation/createRoleGroupUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uauth/roles/role-group \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"string","description":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"name\":\"string\",\"description\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/uauth/roles/role-group", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "name": "string",
              "description": "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/uauth/roles/role-group");
            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": "/uauth/roles/role-group",
              "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', description: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uauth/roles/role-group');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"name":"string","description":"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/uauth/roles/role-group")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\",\"description\":\"string\"}")
              .asString();
  /uauth/roles/role-group/{groupId}:
    post:
      tags:
        - Access groups
      summary: Update role group
      description: |
        Update a group. To add a role to a group, [update the role](#operation/updateRoleUsingPOST).

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_users: update`
      operationId: updateRoleGroupUsingPOST
      parameters:
        - $ref: "#/components/parameters/uauth-roleGroupId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/uauth-RoleGroupDataRequest"
        required: true
      responses:
        "200":
          description: Group updated; response includes all existing groups
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/uauth-RoleGroupResponse"
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Access-groups/operation/updateRoleGroupUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uauth/roles/role-group/%7BgroupId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"string","description":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"name\":\"string\",\"description\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/uauth/roles/role-group/%7BgroupId%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",
              "description": "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/uauth/roles/role-group/%7BgroupId%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": "/uauth/roles/role-group/%7BgroupId%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', description: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uauth/roles/role-group/%7BgroupId%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"name":"string","description":"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/uauth/roles/role-group/%7BgroupId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\",\"description\":\"string\"}")
              .asString();
    delete:
      tags:
        - Access groups
      summary: Delete role group
      description: |
        Delete a role group permanently.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_users: delete`
      operationId: deleteRoleGroupUsingDELETE
      parameters:
        - $ref: "#/components/parameters/uauth-roleGroupId"
      responses:
        "200":
          description: Group deleted; response includes all existing groups
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/uauth-RoleGroupResponse"
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Access-groups/operation/deleteRoleGroupUsingDELETE
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/uauth/roles/role-group/%7BgroupId%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", "/uauth/roles/role-group/%7BgroupId%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/uauth/roles/role-group/%7BgroupId%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": "/uauth/roles/role-group/%7BgroupId%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/uauth/roles/role-group/%7BgroupId%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/uauth/roles/role-group/%7BgroupId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /uauth/roles/role:
    post:
      tags:
        - Access groups
      summary: Create role
      description: |
        Create a new user role.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_users: update`
      operationId: createRoleUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/uauth-RoleDataRequest"
        required: true
      responses:
        "200":
          description: Role created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uauth-RoleFullResponse"
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Access-groups/operation/createRoleUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uauth/roles/role \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"group":0,"name":"string","description":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"group\":0,\"name\":\"string\",\"description\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/uauth/roles/role", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "group": 0,
              "name": "string",
              "description": "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/uauth/roles/role");
            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": "/uauth/roles/role",
              "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({group: 0, name: 'string', description: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uauth/roles/role');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"group":0,"name":"string","description":"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/uauth/roles/role")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"group\":0,\"name\":\"string\",\"description\":\"string\"}")
              .asString();
  /uauth/roles/{roleId}:
    get:
      tags:
        - Access groups
      summary: Get role
      description: |
        Retrieve the details of a user role

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_users: read`
      operationId: getRoleUsingGET
      parameters:
        - $ref: "#/components/parameters/uauth-roleId"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uauth-RoleFullResponse"
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Access-groups/operation/getRoleUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/uauth/roles/%7BroleId%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", "/uauth/roles/%7BroleId%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/uauth/roles/%7BroleId%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": "/uauth/roles/%7BroleId%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/uauth/roles/%7BroleId%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/uauth/roles/%7BroleId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /uauth/roles/role/{roleId}:
    post:
      tags:
        - Access groups
      summary: Update role
      description: |
        Update a user role.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_users: update`
      operationId: updateRoleUsingPOST
      parameters:
        - $ref: "#/components/parameters/uauth-roleId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/uauth-RoleDataRequest"
        required: true
      responses:
        "200":
          description: Role updated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uauth-RoleFullResponse"
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Access-groups/operation/updateRoleUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uauth/roles/role/%7BroleId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"group":0,"name":"string","description":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"group\":0,\"name\":\"string\",\"description\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/uauth/roles/role/%7BroleId%7D", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "group": 0,
              "name": "string",
              "description": "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/uauth/roles/role/%7BroleId%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": "/uauth/roles/role/%7BroleId%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({group: 0, name: 'string', description: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uauth/roles/role/%7BroleId%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"group":0,"name":"string","description":"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/uauth/roles/role/%7BroleId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"group\":0,\"name\":\"string\",\"description\":\"string\"}")
              .asString();
    delete:
      tags:
        - Access groups
      summary: Delete role
      description: |
        Delete a user role permanently.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_users: delete`
      operationId: deleteRoleUsingDELETE_1
      parameters:
        - $ref: "#/components/parameters/uauth-roleId"
      responses:
        "200":
          description: Role deleted, response includes all existing groups
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/uauth-RoleGroupResponse"
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Access-groups/operation/deleteRoleUsingDELETE_1
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/uauth/roles/role/%7BroleId%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", "/uauth/roles/role/%7BroleId%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/uauth/roles/role/%7BroleId%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": "/uauth/roles/role/%7BroleId%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/uauth/roles/role/%7BroleId%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/uauth/roles/role/%7BroleId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /uauth/user/confirmation/{confirmationToken}:
    get:
      tags:
        - User account management
      summary: Confirm user registration
      description: |
        Confirm user registration. The token is sent by email.

        ---

        **Authentication:** Not required
      operationId: confirmUserUsingGET
      parameters:
        - name: confirmationToken
          in: path
          required: true
          description: Confirmation token
          schema:
            type: string
      responses:
        "200":
          description: OK
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/User-account-management/operation/confirmUserUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/uauth/user/confirmation/%7BconfirmationToken%7D
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            conn.request("GET", "/uauth/user/confirmation/%7BconfirmationToken%7D")

            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/uauth/user/confirmation/%7BconfirmationToken%7D");

            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": "/uauth/user/confirmation/%7BconfirmationToken%7D",
              "headers": {}
            };

            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/uauth/user/confirmation/%7BconfirmationToken%7D');
            $request->setMethod(HTTP_METH_GET);

            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/uauth/user/confirmation/%7BconfirmationToken%7D")
              .asString();
  /uauth/user/register:
    post:
      tags:
        - User account management
      summary: Register user
      description: |
        Register a new user. Before the new account can be used, it must be [confirmed](#operation/confirmUserUsingGET).

        ---

        **Authentication:** Not required
      operationId: registerUserUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/uauth-UserRegistrationRequest"
        required: true
      responses:
        "200":
          description: OK
          content: {}
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
        "409":
          description: User already registered
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/User-account-management/operation/registerUserUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uauth/user/register \
              --header 'content-type: application/json' \
              --data '{"email":"string","password":"string","invitationToken":"string","externalProviderToken":"string","externalProviderType":"GOOGLE"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"email\":\"string\",\"password\":\"string\",\"invitationToken\":\"string\",\"externalProviderToken\":\"string\",\"externalProviderType\":\"GOOGLE\"}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/uauth/user/register", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "string",
              "password": "string",
              "invitationToken": "string",
              "externalProviderToken": "string",
              "externalProviderType": "GOOGLE"
            });

            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/uauth/user/register");
            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": "/uauth/user/register",
              "headers": {
                "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({
              email: 'string',
              password: 'string',
              invitationToken: 'string',
              externalProviderToken: 'string',
              externalProviderType: 'GOOGLE'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uauth/user/register');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"email":"string","password":"string","invitationToken":"string","externalProviderToken":"string","externalProviderType":"GOOGLE"}');

            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/uauth/user/register")
              .header("content-type", "application/json")
              .body("{\"email\":\"string\",\"password\":\"string\",\"invitationToken\":\"string\",\"externalProviderToken\":\"string\",\"externalProviderType\":\"GOOGLE\"}")
              .asString();
  /uauth/user/register/invitation/{invitationToken}:
    get:
      tags:
        - User management
      summary: Find user by invitation token
      description: |
        You can retrieve the details of an account by providing the invitation token generated for that account.

        ---

        **Authentication:** Not required
      operationId: findByInvitationTokenGET
      parameters:
        - name: invitationToken
          in: path
          required: true
          description: Invitation token
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uauth-InvitationResponse"
        "201":
          description: Created
          content: {}
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/User-management/operation/findByInvitationTokenGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/uauth/user/register/invitation/%7BinvitationToken%7D
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            conn.request("GET", "/uauth/user/register/invitation/%7BinvitationToken%7D")

            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/uauth/user/register/invitation/%7BinvitationToken%7D");

            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": "/uauth/user/register/invitation/%7BinvitationToken%7D",
              "headers": {}
            };

            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/uauth/user/register/invitation/%7BinvitationToken%7D');
            $request->setMethod(HTTP_METH_GET);

            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/uauth/user/register/invitation/%7BinvitationToken%7D")
              .asString();
  /uauth/user/register/resend-confirmation:
    post:
      tags:
        - User account management
      summary: Re-send user confirmation token
      description: |
        If the confirmation token does not reach the user's inbox, you can send a new one.

        ---

        **Authentication:** Not required
      operationId: resendConfirmationUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/uauth-ResendConfirmationPayload"
      responses:
        "200":
          description: OK
        "201":
          description: Created
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/User-account-management/operation/resendConfirmationUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uauth/user/register/resend-confirmation \
              --header 'content-type: application/json' \
              --data '{"email":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"email\":\"string\"}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/uauth/user/register/resend-confirmation", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "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/uauth/user/register/resend-confirmation");
            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": "/uauth/user/register/resend-confirmation",
              "headers": {
                "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({email: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uauth/user/register/resend-confirmation');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"email":"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/uauth/user/register/resend-confirmation")
              .header("content-type", "application/json")
              .body("{\"email\":\"string\"}")
              .asString();
  /uauth/users/available-roles:
    get:
      tags:
        - Access groups
      summary: Get available roles
      description: |
        Retrieve a list of user roles available in the business profile.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **Authentication:** Not required
      operationId: getAvailableRolesUsingGET
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/uauth-RoleResponse"
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Access-groups/operation/getAvailableRolesUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/uauth/users/available-roles
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            conn.request("GET", "/uauth/users/available-roles")

            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/uauth/users/available-roles");

            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": "/uauth/users/available-roles",
              "headers": {}
            };

            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/uauth/users/available-roles');
            $request->setMethod(HTTP_METH_GET);

            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/uauth/users/available-roles")
              .asString();
  /uauth/users/invitations/invite:
    post:
      tags:
        - User management
      summary: Invite user
      description: |
        Invite a user to join a workspace. The user receives an email with an invitation token.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_users: create`
      operationId: inviteUserUsingPOST
      requestBody:
        description: All the data sent in this request applies to the user being invited.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/uauth-BusinessProfileInvitationRequest"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uauth-BusinessProfileInvitationResponse"
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/User-management/operation/inviteUserUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uauth/users/invitations/invite \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"email":"string","firstName":"string","lastName":"string","roles":[0]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"email\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"roles\":[0]}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/uauth/users/invitations/invite", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "string",
              "firstName": "string",
              "lastName": "string",
              "roles": [
                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/uauth/users/invitations/invite");
            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": "/uauth/users/invitations/invite",
              "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({email: 'string', firstName: 'string', lastName: 'string', roles: [0]}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uauth/users/invitations/invite');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"email":"string","firstName":"string","lastName":"string","roles":[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/uauth/users/invitations/invite")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"email\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"roles\":[0]}")
              .asString();
  /uauth/users/invitations/invite-bulk:
    post:
      tags:
        - User management
      summary: Invite many users
      description: |
        Invite a number of users to the workspace at once. The users receive emails with invitation tokens.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_users: create`
      operationId: bulkInviteUsersUsingPOST
      requestBody:
        description: All the data sent in this request refers to the users being invited.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/uauth-BusinessProfileBulkInvitationRequest"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uauth-BusinessProfileInvitationResponse"
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/User-management/operation/bulkInviteUsersUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uauth/users/invitations/invite-bulk \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"invitations":[{"email":"string","firstName":"string","lastName":"string","roles":[0]}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"invitations\":[{\"email\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"roles\":[0]}]}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/uauth/users/invitations/invite-bulk", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "invitations": [
                {
                  "email": "string",
                  "firstName": "string",
                  "lastName": "string",
                  "roles": [
                    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/uauth/users/invitations/invite-bulk");
            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": "/uauth/users/invitations/invite-bulk",
              "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({
              invitations: [{email: 'string', firstName: 'string', lastName: 'string', roles: [0]}]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uauth/users/invitations/invite-bulk');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"invitations":[{"email":"string","firstName":"string","lastName":"string","roles":[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/uauth/users/invitations/invite-bulk")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"invitations\":[{\"email\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"roles\":[0]}]}")
              .asString();
  /uauth/users/invitations/{invitationIds}:
    delete:
      tags:
        - User management
      summary: Delete invitations
      description: |
        Delete invitations that were not yet accepted.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_users: delete`
      operationId: deleteInvitationUsingDELETE
      parameters:
        - $ref: "#/components/parameters/uauth-InvitationIds"
      responses:
        "200":
          description: OK
          content: {}
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/User-management/operation/deleteInvitationUsingDELETE
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/uauth/users/invitations/%7BinvitationIds%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", "/uauth/users/invitations/%7BinvitationIds%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/uauth/users/invitations/%7BinvitationIds%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": "/uauth/users/invitations/%7BinvitationIds%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/uauth/users/invitations/%7BinvitationIds%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/uauth/users/invitations/%7BinvitationIds%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /uauth/users/invitations/{invitationId}:
    post:
      tags:
        - User management
      summary: Update invitation
      description: |
        Update the details of an invitation.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_users: update`
      operationId: updateInvitationUsingPOST
      parameters:
        - name: invitationId
          in: path
          description: To obtain the invitation ID, check the [list of users with PENDING status](#/operation/UsersListingUsingGET). The invitation ID for a user is the same as the ID of that user.
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        description: All the data sent in this request refers to the user being invited.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/uauth-InvitationUpdateRequest"
        required: true
      responses:
        "200":
          description: OK
          content: {}
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/User-management/operation/updateInvitationUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uauth/users/invitations/%7BinvitationId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"firstName":"string","lastName":"string","roles":[0]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"firstName\":\"string\",\"lastName\":\"string\",\"roles\":[0]}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/uauth/users/invitations/%7BinvitationId%7D", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "firstName": "string",
              "lastName": "string",
              "roles": [
                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/uauth/users/invitations/%7BinvitationId%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": "/uauth/users/invitations/%7BinvitationId%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({firstName: 'string', lastName: 'string', roles: [0]}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uauth/users/invitations/%7BinvitationId%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"firstName":"string","lastName":"string","roles":[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/uauth/users/invitations/%7BinvitationId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"firstName\":\"string\",\"lastName\":\"string\",\"roles\":[0]}")
              .asString();
  /uauth/users/my-account/strongest-password-settings:
    get:
      tags:
        - Access control
      operationId: getStrongestPasswordSettings
      summary: Get own strongest password policy
      description: |
        If a user has access to more than one workspace, you can use this endpoint to find the strictest password policy of all the policies in these workspaces. The user's password must meet the requirements of that strictest policy.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>
      responses:
        "200":
          description: OK
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/uauth-BusinessProfilePasswordSettingsData"
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Access-control/operation/getStrongestPasswordSettings
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/uauth/users/my-account/strongest-password-settings
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            conn.request("GET", "/uauth/users/my-account/strongest-password-settings")

            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/uauth/users/my-account/strongest-password-settings");

            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": "/uauth/users/my-account/strongest-password-settings",
              "headers": {}
            };

            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/uauth/users/my-account/strongest-password-settings');
            $request->setMethod(HTTP_METH_GET);

            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/uauth/users/my-account/strongest-password-settings")
              .asString();
  /uauth/users/listing:
    get:
      tags:
        - User management
      summary: List users
      description: |
        List users from the current workspace

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_users: read`
      operationId: listUsersUsingGET
      parameters:
        - $ref: "#/components/parameters/uauth-PaginationPage"
        - $ref: "#/components/parameters/uauth-PaginationSize"
        - name: status
          in: query
          description: Filters the results by status of the users
          required: true
          schema:
            type: string
            enum:
              - ALL
              - ACTIVE
              - PENDING
              - EXPIRED
              - GUEST
              - MANAGED
        - name: search
          in: query
          required: true
          description: String to search for in the first names, surnames, and email addresses
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uauth-ReactUsersListing"
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/User-management/operation/listUsersUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/uauth/users/listing?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&status=SOME_STRING_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", "/uauth/users/listing?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&status=SOME_STRING_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/uauth/users/listing?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&status=SOME_STRING_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": "/uauth/users/listing?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&status=SOME_STRING_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/uauth/users/listing');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_INTEGER_VALUE',
              'size' => 'SOME_INTEGER_VALUE',
              'status' => 'SOME_STRING_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/uauth/users/listing?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&status=SOME_STRING_VALUE&search=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /uauth/users/listing/autocomplete:
    get:
      tags:
        - User management
      summary: Autocomplete user search result
      description: |
        You can use this endpoint to obtain data for search autocomplete.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required (at least one):** `settings_users: read`, `analytics: read`
      operationId: getListingAutocomplete
      parameters:
        - name: email
          in: query
          description: User's email address
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/uauth-UserAutoCompleteResponse"
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/User-management/operation/getListingAutocomplete
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/uauth/users/listing/autocomplete?email=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", "/uauth/users/listing/autocomplete?email=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/uauth/users/listing/autocomplete?email=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": "/uauth/users/listing/autocomplete?email=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/uauth/users/listing/autocomplete');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'email' => '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/uauth/users/listing/autocomplete?email=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /uauth/users/profile-association/{ids}:
    delete:
      tags:
        - User management
      summary: Remove users from workspace
      description: |
        Delete user associations from a workspace. This does not delete the user accounts.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_users: delete`
      operationId: deleteUsersUsingDELETE
      parameters:
        - $ref: "#/components/parameters/uauth-UserIds"
      responses:
        "200":
          description: OK
          content: {}
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/User-management/operation/deleteUsersUsingDELETE
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url 'https://api.synerise.com/uauth/users/profile-association/11405,11406,11407' \
              --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", "/uauth/users/profile-association/11405,11406,11407", 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/uauth/users/profile-association/11405,11406,11407");
            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": "/uauth/users/profile-association/11405,11406,11407",
              "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/uauth/users/profile-association/11405,11406,11407');
            $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/uauth/users/profile-association/11405,11406,11407")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /uauth/users/my-account:
    get:
      tags:
        - User account management
      summary: Get user's own data
      description: |
        A user can retrieve their account data.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>
      operationId: getUserOwnDataUsingGET
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uauth-MyAccountUserResponse"
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/User-account-management/operation/getUserOwnDataUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/uauth/users/my-account \
              --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", "/uauth/users/my-account", 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/uauth/users/my-account");
            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": "/uauth/users/my-account",
              "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/uauth/users/my-account');
            $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/uauth/users/my-account")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - User account management
      summary: Update user's own data
      description: |
        A user can update their own details.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>
      operationId: updateUsersOwnDataUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/uauth-ReactUserEditRequest"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uauth-MyAccountUserResponse"
        "201":
          description: Created
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/User-account-management/operation/updateUsersOwnDataUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uauth/users/my-account \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"firstName":"string","lastName":"string","avatar":"string","phone":"string","language":"pl","organizationRole":"string","introduction":"string","confirmed":true,"mailAccountId":0,"description":"string","dateFormatNotation":"US","timeFormatNotation":"US","numberFormatNotation":"US"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"firstName\":\"string\",\"lastName\":\"string\",\"avatar\":\"string\",\"phone\":\"string\",\"language\":\"pl\",\"organizationRole\":\"string\",\"introduction\":\"string\",\"confirmed\":true,\"mailAccountId\":0,\"description\":\"string\",\"dateFormatNotation\":\"US\",\"timeFormatNotation\":\"US\",\"numberFormatNotation\":\"US\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/uauth/users/my-account", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "firstName": "string",
              "lastName": "string",
              "avatar": "string",
              "phone": "string",
              "language": "pl",
              "organizationRole": "string",
              "introduction": "string",
              "confirmed": true,
              "mailAccountId": 0,
              "description": "string",
              "dateFormatNotation": "US",
              "timeFormatNotation": "US",
              "numberFormatNotation": "US"
            });

            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/uauth/users/my-account");
            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": "/uauth/users/my-account",
              "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({
              firstName: 'string',
              lastName: 'string',
              avatar: 'string',
              phone: 'string',
              language: 'pl',
              organizationRole: 'string',
              introduction: 'string',
              confirmed: true,
              mailAccountId: 0,
              description: 'string',
              dateFormatNotation: 'US',
              timeFormatNotation: 'US',
              numberFormatNotation: 'US'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uauth/users/my-account');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"firstName":"string","lastName":"string","avatar":"string","phone":"string","language":"pl","organizationRole":"string","introduction":"string","confirmed":true,"mailAccountId":0,"description":"string","dateFormatNotation":"US","timeFormatNotation":"US","numberFormatNotation":"US"}');

            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/uauth/users/my-account")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"firstName\":\"string\",\"lastName\":\"string\",\"avatar\":\"string\",\"phone\":\"string\",\"language\":\"pl\",\"organizationRole\":\"string\",\"introduction\":\"string\",\"confirmed\":true,\"mailAccountId\":0,\"description\":\"string\",\"dateFormatNotation\":\"US\",\"timeFormatNotation\":\"US\",\"numberFormatNotation\":\"US\"}")
              .asString();
    delete:
      tags:
        - User account management
      summary: Delete user's own account
      description: |
        A user can delete their own account.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>
      operationId: deleteUserUsingDELETE
      responses:
        "200":
          description: OK
          content: {}
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/User-account-management/operation/deleteUserUsingDELETE
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/uauth/users/my-account \
              --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", "/uauth/users/my-account", 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/uauth/users/my-account");
            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": "/uauth/users/my-account",
              "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/uauth/users/my-account');
            $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/uauth/users/my-account")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /uauth/v2/auth/login/profile:
    post:
      summary: Log in as Workspace
      description: |
        Obtain a new Workspace JWT Token.

        ---

        **Authentication:** Not required
      tags:
        - Authorization
      operationId: profileLogin
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/uauth-BusinessProfileAuthenticationRequest"
        required: true
      responses:
        "200":
          description: New JWT token for Workspace authentication
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uauth-TokenResponse"
        "400":
          description: Request malformed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uauth-Error"
        "401":
          description: Unauthorized, API key does not exist
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uauth-Error"
      x-snr-doc-urls:
        - /api-reference/authorization#tag/Authorization/operation/profileLogin
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uauth/v2/auth/login/profile \
              --header 'content-type: application/json' \
              --data '{"apiKey":"64c09614-1b2a-42f7-804d-f647243eb1ab"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"apiKey\":\"64c09614-1b2a-42f7-804d-f647243eb1ab\"}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/uauth/v2/auth/login/profile", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "apiKey": "64c09614-1b2a-42f7-804d-f647243eb1ab"
            });

            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/uauth/v2/auth/login/profile");
            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": "/uauth/v2/auth/login/profile",
              "headers": {
                "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({apiKey: '64c09614-1b2a-42f7-804d-f647243eb1ab'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uauth/v2/auth/login/profile');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"apiKey":"64c09614-1b2a-42f7-804d-f647243eb1ab"}');

            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/uauth/v2/auth/login/profile")
              .header("content-type", "application/json")
              .body("{\"apiKey\":\"64c09614-1b2a-42f7-804d-f647243eb1ab\"}")
              .asString();
  /uauth/users/{userId}:
    get:
      tags:
        - User management
      summary: Get user data
      operationId: getUserDataUsingGET
      parameters:
        - $ref: "#/components/parameters/uauth-UserId"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uauth-ReactUserResponse"
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/User-management/operation/getUserDataUsingGET
      description: |
        

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/uauth/users/%7BuserId%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", "/uauth/users/%7BuserId%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/uauth/users/%7BuserId%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": "/uauth/users/%7BuserId%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/uauth/users/%7BuserId%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/uauth/users/%7BuserId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - User management
      summary: Update user data
      operationId: updateUserDataUsingPOST
      parameters:
        - $ref: "#/components/parameters/uauth-UserId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/uauth-ReactOtherUserEditRequest"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uauth-ReactUserResponse"
        "201":
          description: Created
          content: {}
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/User-management/operation/updateUserDataUsingPOST
      description: |
        

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uauth/users/%7BuserId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"firstName":"string","lastName":"string","avatar":"string","phone":"string","language":"pl","organizationRole":"string","introduction":"string","confirmed":true,"mailAccountId":0,"description":"string","dateFormatNotation":"US","timeFormatNotation":"US","numberFormatNotation":"US","roles":[0]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"firstName\":\"string\",\"lastName\":\"string\",\"avatar\":\"string\",\"phone\":\"string\",\"language\":\"pl\",\"organizationRole\":\"string\",\"introduction\":\"string\",\"confirmed\":true,\"mailAccountId\":0,\"description\":\"string\",\"dateFormatNotation\":\"US\",\"timeFormatNotation\":\"US\",\"numberFormatNotation\":\"US\",\"roles\":[0]}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/uauth/users/%7BuserId%7D", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "firstName": "string",
              "lastName": "string",
              "avatar": "string",
              "phone": "string",
              "language": "pl",
              "organizationRole": "string",
              "introduction": "string",
              "confirmed": true,
              "mailAccountId": 0,
              "description": "string",
              "dateFormatNotation": "US",
              "timeFormatNotation": "US",
              "numberFormatNotation": "US",
              "roles": [
                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/uauth/users/%7BuserId%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": "/uauth/users/%7BuserId%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({
              firstName: 'string',
              lastName: 'string',
              avatar: 'string',
              phone: 'string',
              language: 'pl',
              organizationRole: 'string',
              introduction: 'string',
              confirmed: true,
              mailAccountId: 0,
              description: 'string',
              dateFormatNotation: 'US',
              timeFormatNotation: 'US',
              numberFormatNotation: 'US',
              roles: [0]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uauth/users/%7BuserId%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"firstName":"string","lastName":"string","avatar":"string","phone":"string","language":"pl","organizationRole":"string","introduction":"string","confirmed":true,"mailAccountId":0,"description":"string","dateFormatNotation":"US","timeFormatNotation":"US","numberFormatNotation":"US","roles":[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/uauth/users/%7BuserId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"firstName\":\"string\",\"lastName\":\"string\",\"avatar\":\"string\",\"phone\":\"string\",\"language\":\"pl\",\"organizationRole\":\"string\",\"introduction\":\"string\",\"confirmed\":true,\"mailAccountId\":0,\"description\":\"string\",\"dateFormatNotation\":\"US\",\"timeFormatNotation\":\"US\",\"numberFormatNotation\":\"US\",\"roles\":[0]}")
              .asString();
  /uauth/users/activate:
    post:
      tags:
        - User management
      summary: Activate users
      description: |
        Activate access to the workspace for a number of users

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_users: delete`
      operationId: activateUsersUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/uauth-ActivationRequest"
      responses:
        "200":
          description: OK
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/User-management/operation/activateUsersUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uauth/users/activate \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"ids":[0]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"ids\":[0]}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/uauth/users/activate", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "ids": [
                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/uauth/users/activate");
            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": "/uauth/users/activate",
              "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({ids: [0]}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uauth/users/activate');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"ids":[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/uauth/users/activate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"ids\":[0]}")
              .asString();
  /uauth/users/deactivate:
    post:
      tags:
        - User management
      summary: De-activate users
      description: |
        De-activate access to the workspace for a number of users

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_users: update`
      operationId: deactivateUsersUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/uauth-ActivationRequest"
      responses:
        "200":
          description: OK
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/User-management/operation/deactivateUsersUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uauth/users/deactivate \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"ids":[0]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"ids\":[0]}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/uauth/users/deactivate", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "ids": [
                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/uauth/users/deactivate");
            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": "/uauth/users/deactivate",
              "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({ids: [0]}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uauth/users/deactivate');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"ids":[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/uauth/users/deactivate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"ids\":[0]}")
              .asString();
  /uauth/users/{userId}/access-time:
    put:
      tags:
        - User management
      summary: Change access expiration time
      description: |
        Change the date when a user's access to the workspace is cancelled.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_users: update`
      operationId: changeUserAccessExpirationDateUsingPut
      parameters:
        - $ref: "#/components/parameters/uauth-UserId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/uauth-ReactUserProlongAccessRequest"
        required: true
      responses:
        "200":
          description: OK
          content: {}
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/User-management/operation/changeUserAccessExpirationDateUsingPut
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/uauth/users/%7BuserId%7D/access-time \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"expirationDate":"2019-08-24T14:15:22Z"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"expirationDate\":\"2019-08-24T14:15:22Z\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("PUT", "/uauth/users/%7BuserId%7D/access-time", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "expirationDate": "2019-08-24T14:15:22Z"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("PUT", "https://api.synerise.com/uauth/users/%7BuserId%7D/access-time");
            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": "/uauth/users/%7BuserId%7D/access-time",
              "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({expirationDate: '2019-08-24T14:15:22Z'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uauth/users/%7BuserId%7D/access-time');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"expirationDate":"2019-08-24T14:15:22Z"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.put("https://api.synerise.com/uauth/users/%7BuserId%7D/access-time")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"expirationDate\":\"2019-08-24T14:15:22Z\"}")
              .asString();
  /uauth/users/{userId}/password-reset:
    post:
      tags:
        - User management
      summary: Reset another user's password
      description: |
        Request a password reset for another user. That user receives an email with a password reset token. Their account is locked until the new password is set.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_users: update`
      operationId: resetPasswordUsingPOST
      parameters:
        - $ref: "#/components/parameters/uauth-UserId"
      responses:
        "200":
          description: OK
          content: {}
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/User-management/operation/resetPasswordUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uauth/users/%7BuserId%7D/password-reset
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            conn.request("POST", "/uauth/users/%7BuserId%7D/password-reset")

            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/uauth/users/%7BuserId%7D/password-reset");

            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": "/uauth/users/%7BuserId%7D/password-reset",
              "headers": {}
            };

            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/uauth/users/%7BuserId%7D/password-reset');
            $request->setMethod(HTTP_METH_POST);

            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/uauth/users/%7BuserId%7D/password-reset")
              .asString();
  /uauth/users/{userId}/mfa-reset:
    put:
      tags:
        - User management
      summary: Reset another user's multi-factor authentication
      description: |
        You can reset the settings of another user's multi-factor authentication. This can be used, for example, if the user has lost both their device with the MFA application and the recovery code.
        The user will need to re-enable MFA in the same way as when setting it up for the first time.


        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_users: update`
      operationId: resetMFAUsingPUT
      parameters:
        - $ref: "#/components/parameters/uauth-UserId"
      responses:
        "200":
          description: OK
          content: {}
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/User-management/operation/resetMFAUsingPUT
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/uauth/users/%7BuserId%7D/mfa-reset
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            conn.request("PUT", "/uauth/users/%7BuserId%7D/mfa-reset")

            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("PUT", "https://api.synerise.com/uauth/users/%7BuserId%7D/mfa-reset");

            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": "/uauth/users/%7BuserId%7D/mfa-reset",
              "headers": {}
            };

            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/uauth/users/%7BuserId%7D/mfa-reset');
            $request->setMethod(HTTP_METH_PUT);

            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/uauth/users/%7BuserId%7D/mfa-reset")
              .asString();
  /uauth/users/{ids}:
    delete:
      tags:
        - User management
      summary: Delete user account
      description: |
        Permanently deletes a user account.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_users: delete`
      operationId: deleteManagedUserUsingDELETE
      parameters:
        - $ref: "#/components/parameters/uauth-UserIds"
      responses:
        "200":
          description: OK
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/User-management/operation/deleteManagedUserUsingDELETE
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url 'https://api.synerise.com/uauth/users/11405,11406,11407' \
              --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", "/uauth/users/11405,11406,11407", 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/uauth/users/11405,11406,11407");
            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": "/uauth/users/11405,11406,11407",
              "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/uauth/users/11405,11406,11407');
            $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/uauth/users/11405,11406,11407")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /uauth/settings/user-bp-ip-policy:
    get:
      tags:
        - Access control
      summary: Get IP allowlist policy
      operationId: getUserBpIpPolicyUsingGET
      description: |
        Retrieve the details of IP allowlisting policy of 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:** `settings_users_am_ip_access_restriction: read`
      responses:
        "200":
          description: IP policy details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uauth-IpPolicySettings"
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Access-control/operation/getUserBpIpPolicyUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/uauth/settings/user-bp-ip-policy \
              --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", "/uauth/settings/user-bp-ip-policy", 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/uauth/settings/user-bp-ip-policy");
            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": "/uauth/settings/user-bp-ip-policy",
              "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/uauth/settings/user-bp-ip-policy');
            $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/uauth/settings/user-bp-ip-policy")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - Access control
      summary: Update IP allowlist policy
      operationId: updateUserBpIpPolicyUsingPOST
      description: |
        Update the details of IP allowlisting policy of 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:** `settings_users_am_ip_access_restriction: update`
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/uauth-IpPolicySettings"
        required: true
      responses:
        "200":
          description: Updated IP policy
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uauth-IpPolicySettings"
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Access-control/operation/updateUserBpIpPolicyUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uauth/settings/user-bp-ip-policy \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"enabled":true,"enableSupportSubnets":true,"ipPolicy":["string"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"enabled\":true,\"enableSupportSubnets\":true,\"ipPolicy\":[\"string\"]}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/uauth/settings/user-bp-ip-policy", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "enabled": true,
              "enableSupportSubnets": true,
              "ipPolicy": [
                "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/uauth/settings/user-bp-ip-policy");
            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": "/uauth/settings/user-bp-ip-policy",
              "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({enabled: true, enableSupportSubnets: true, ipPolicy: ['string']}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uauth/settings/user-bp-ip-policy');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"enabled":true,"enableSupportSubnets":true,"ipPolicy":["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/uauth/settings/user-bp-ip-policy")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"enabled\":true,\"enableSupportSubnets\":true,\"ipPolicy\":[\"string\"]}")
              .asString();
  /uauth/strongest-password-settings-by-email/{email}:
    get:
      tags:
        - Access control
      summary: Get strongest password policy of a User
      description: |
        If a user has access to more than one workspace, you can use this endpoint to find the strictest password policy of all the policies in these workspaces. The user's password must meet the requirements of that strictest policy.

        ---

        **Authentication:** Not required
      operationId: getStrongestPasswordSettingsUsingGET
      parameters:
        - name: email
          in: path
          description: User's email address
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uauth-BusinessProfilePasswordSettingsData"
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Access-control/operation/getStrongestPasswordSettingsUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/uauth/strongest-password-settings-by-email/%7Bemail%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", "/uauth/strongest-password-settings-by-email/%7Bemail%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/uauth/strongest-password-settings-by-email/%7Bemail%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": "/uauth/strongest-password-settings-by-email/%7Bemail%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/uauth/strongest-password-settings-by-email/%7Bemail%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/uauth/strongest-password-settings-by-email/%7Bemail%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /uauth/users/mfa/initialization:
    post:
      tags:
        - Access control
      summary: Initiate multi-factor authentication for user
      description: |
        Begins the process of enabling multi-factor authentication for a user by initiating it.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>
      operationId: initiateUserMfaUsingPOST
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/uauth-mfaType"
      responses:
        "200":
          description: Secret and QR code URL
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uauth-MultiFactorAuthInitResponse"
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Access-control/operation/initiateUserMfaUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api.synerise.com/uauth/users/mfa/initialization?mfaType=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("POST", "/uauth/users/mfa/initialization?mfaType=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("POST", "https://api.synerise.com/uauth/users/mfa/initialization?mfaType=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": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/uauth/users/mfa/initialization?mfaType=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/uauth/users/mfa/initialization');
            $request->setMethod(HTTP_METH_POST);

            $request->setQueryData([
              'mfaType' => '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.post("https://api.synerise.com/uauth/users/mfa/initialization?mfaType=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /uauth/users/mfa/confirmation:
    post:
      tags:
        - Access control
      summary: Confirm multi-factor authentication for user
      description: |
        Continues the process of enabling multi-factor authentication for a user by confirming it.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>
      operationId: confirmUserMfaUsingPOST
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/uauth-mfaType"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/uauth-MultiFactorAuthConfirmRequest"
        required: true
      responses:
        "200":
          description: User's backup code
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uauth-MultiFactorAuthConfirmResponse"
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Access-control/operation/confirmUserMfaUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api.synerise.com/uauth/users/mfa/confirmation?mfaType=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"verificationCode":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"verificationCode\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/uauth/users/mfa/confirmation?mfaType=SOME_STRING_VALUE", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "verificationCode": "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/uauth/users/mfa/confirmation?mfaType=SOME_STRING_VALUE");
            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": "/uauth/users/mfa/confirmation?mfaType=SOME_STRING_VALUE",
              "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({verificationCode: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uauth/users/mfa/confirmation');
            $request->setMethod(HTTP_METH_POST);

            $request->setQueryData([
              'mfaType' => 'SOME_STRING_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"verificationCode":"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/uauth/users/mfa/confirmation?mfaType=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"verificationCode\":\"string\"}")
              .asString();
  /uauth/users/mfa:
    delete:
      tags:
        - Access control
      summary: Remove multi-factor authentication for user
      description: |
        Removes user multi-factor authentication.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>
      operationId: removesUserMfaUsingPOST
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/uauth-mfaType"
        - name: backupCode
          in: query
          description: User's backup code
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Access-control/operation/removesUserMfaUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url 'https://api.synerise.com/uauth/users/mfa?mfaType=SOME_STRING_VALUE&backupCode=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("DELETE", "/uauth/users/mfa?mfaType=SOME_STRING_VALUE&backupCode=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("DELETE", "https://api.synerise.com/uauth/users/mfa?mfaType=SOME_STRING_VALUE&backupCode=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": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/uauth/users/mfa?mfaType=SOME_STRING_VALUE&backupCode=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/uauth/users/mfa');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setQueryData([
              'mfaType' => 'SOME_STRING_VALUE',
              'backupCode' => '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.delete("https://api.synerise.com/uauth/users/mfa?mfaType=SOME_STRING_VALUE&backupCode=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /uauth/settings/password-policy:
    get:
      tags:
        - Access control
      summary: Get user password policy
      description: |
        Retrieve the user password policy of 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:** `settings_users_am_password_policy: read`
      operationId: getPasswordSettingsUsingGET
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uauth-PasswordSettingsData"
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Access-control/operation/getPasswordSettingsUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/uauth/settings/password-policy \
              --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", "/uauth/settings/password-policy", 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/uauth/settings/password-policy");
            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": "/uauth/settings/password-policy",
              "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/uauth/settings/password-policy');
            $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/uauth/settings/password-policy")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - Access control
      summary: Update user password policy
      description: |
        Update the user password policy. Entering `0` as the value disables a requirement.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_users_am_password_policy: update`
      operationId: updateSettingsUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/uauth-PasswordSettingsData"
      responses:
        "200":
          description: New password policy
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uauth-PasswordSettingsData"
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Access-control/operation/updateSettingsUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uauth/settings/password-policy \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"attempts":0,"block":0,"different":0,"digits":0,"expiration":0,"lowerLetters":0,"maxIdleTime":0,"maxLength":0,"minLength":0,"nextChange":0,"specialChars":0,"upperLetters":0}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"attempts\":0,\"block\":0,\"different\":0,\"digits\":0,\"expiration\":0,\"lowerLetters\":0,\"maxIdleTime\":0,\"maxLength\":0,\"minLength\":0,\"nextChange\":0,\"specialChars\":0,\"upperLetters\":0}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/uauth/settings/password-policy", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "attempts": 0,
              "block": 0,
              "different": 0,
              "digits": 0,
              "expiration": 0,
              "lowerLetters": 0,
              "maxIdleTime": 0,
              "maxLength": 0,
              "minLength": 0,
              "nextChange": 0,
              "specialChars": 0,
              "upperLetters": 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/uauth/settings/password-policy");
            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": "/uauth/settings/password-policy",
              "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({
              attempts: 0,
              block: 0,
              different: 0,
              digits: 0,
              expiration: 0,
              lowerLetters: 0,
              maxIdleTime: 0,
              maxLength: 0,
              minLength: 0,
              nextChange: 0,
              specialChars: 0,
              upperLetters: 0
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uauth/settings/password-policy');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"attempts":0,"block":0,"different":0,"digits":0,"expiration":0,"lowerLetters":0,"maxIdleTime":0,"maxLength":0,"minLength":0,"nextChange":0,"specialChars":0,"upperLetters":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/uauth/settings/password-policy")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"attempts\":0,\"block\":0,\"different\":0,\"digits\":0,\"expiration\":0,\"lowerLetters\":0,\"maxIdleTime\":0,\"maxLength\":0,\"minLength\":0,\"nextChange\":0,\"specialChars\":0,\"upperLetters\":0}")
              .asString();
  /uauth/managed-domains:
    get:
      tags:
        - Directory
      summary: List managed domains
      description: |
        Retrieve a list of all domains managed by 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:** `managed_domains: read`
      operationId: getManagedDomainListUsingGET
      parameters:
        - name: page
          in: query
          description: Page number (first page is 1)
          required: false
          schema:
            type: integer
            format: int32
            default: 1
        - name: size
          in: query
          description: The number of entries on a page
          required: false
          schema:
            type: integer
            format: int32
            default: 20
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uauth-ManagedDomainListing"
        "201":
          description: Created
          content: {}
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Directory/operation/getManagedDomainListUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/uauth/managed-domains?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            conn.request("GET", "/uauth/managed-domains?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE")

            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/uauth/managed-domains?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE");

            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": "/uauth/managed-domains?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE",
              "headers": {}
            };

            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/uauth/managed-domains');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_INTEGER_VALUE',
              'size' => 'SOME_INTEGER_VALUE'
            ]);

            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/uauth/managed-domains?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE")
              .asString();
    delete:
      tags:
        - Directory
      summary: Delete managed domain
      description: |
        Remove management settings for a domain.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `managed_domains: delete`
      operationId: deleteManagedDomainUsingDELETE
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/uauth-ManagedDomainRequest"
      responses:
        "201":
          description: Created
          content: {}
        "204":
          description: No Content
          content: {}
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Directory/operation/deleteManagedDomainUsingDELETE
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/uauth/managed-domains \
              --header 'content-type: application/json' \
              --data '{"domain":"synerise.com"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"domain\":\"synerise.com\"}"

            headers = { 'content-type': "application/json" }

            conn.request("DELETE", "/uauth/managed-domains", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "domain": "synerise.com"
            });

            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/uauth/managed-domains");
            xhr.setRequestHeader("content-type", "application/json");

            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": "/uauth/managed-domains",
              "headers": {
                "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({domain: 'synerise.com'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uauth/managed-domains');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"domain":"synerise.com"}');

            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/uauth/managed-domains")
              .header("content-type", "application/json")
              .body("{\"domain\":\"synerise.com\"}")
              .asString();
  /uauth/managed-domains/initialize-code:
    get:
      tags:
        - Directory
      summary: Initialize managed domain
      description: |
        Generate a verification string for a domain. This string is then used in [this endpoint](#operation/verifyManagedDomainUsingPOST). The verification string for a particular workspace is always the same.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `managed_domains: create`
      operationId: initializeManagedDomainUsingPOST
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uauth-ManagedDomainCodeResponse"
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Directory/operation/initializeManagedDomainUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/uauth/managed-domains/initialize-code
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            conn.request("GET", "/uauth/managed-domains/initialize-code")

            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/uauth/managed-domains/initialize-code");

            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": "/uauth/managed-domains/initialize-code",
              "headers": {}
            };

            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/uauth/managed-domains/initialize-code');
            $request->setMethod(HTTP_METH_GET);

            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/uauth/managed-domains/initialize-code")
              .asString();
  /uauth/managed-domains/verification:
    post:
      tags:
        - Directory
      summary: Verify managed domain
      description: |
        Verify a managed domain to assign it to a workspace. All users who belong to the domain are managed by that workspace.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `managed_domains: create`
      operationId: verifyManagedDomainUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/uauth-ManagedDomainVerificationRequest"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uauth-ManagedDomainResponse"
        "201":
          description: Created
          content: {}
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Directory/operation/verifyManagedDomainUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uauth/managed-domains/verification \
              --header 'content-type: application/json' \
              --data '{"domain":"synerise.com","verificationMethod":"TXT_RECORD"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"domain\":\"synerise.com\",\"verificationMethod\":\"TXT_RECORD\"}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/uauth/managed-domains/verification", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "domain": "synerise.com",
              "verificationMethod": "TXT_RECORD"
            });

            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/uauth/managed-domains/verification");
            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": "/uauth/managed-domains/verification",
              "headers": {
                "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({domain: 'synerise.com', verificationMethod: 'TXT_RECORD'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uauth/managed-domains/verification');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"domain":"synerise.com","verificationMethod":"TXT_RECORD"}');

            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/uauth/managed-domains/verification")
              .header("content-type", "application/json")
              .body("{\"domain\":\"synerise.com\",\"verificationMethod\":\"TXT_RECORD\"}")
              .asString();
  /uploader-service/clients/files/by/{identifierType}:
    post:
      tags:
        - Uploader
      summary: Add files for dynamic attachments
      description: |
        Add base64 encoded files to the storage for use in [dynamic attachments](https://help.synerise.com/docs/automation/actions/send-email/#dynamic-attachments). You can send up to 5 files in one request. An `attachment.upload` event is generated when you use the endpoint.

        ---

        **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:** `UPLOADER_SERVICE_STORAGE_CREATE`

        **User role permission required:** `assets_explorer: create`
      operationId: addClientFiles
      parameters:
        - $ref: "#/components/parameters/uploader-service-pathIdentifierType"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/uploader-service-AddFile"
      responses:
        "200":
          description: File or files uploaded successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uploader-service-FileRequest"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Uploader/operation/addClientFiles
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uploader-service/clients/files/by/%7BidentifierType%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"files":[{"content":"77u/dGhpcyBpcyBqdXN0IGFuIGV4YW1wbGUgZmlsZQ==","mimetype":"text/csv","filename":"myexamplefile","extension":"csv"}],"ttlInMinutes":0,"identifierValue":"1234","parameters":{}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"files\":[{\"content\":\"77u/dGhpcyBpcyBqdXN0IGFuIGV4YW1wbGUgZmlsZQ==\",\"mimetype\":\"text/csv\",\"filename\":\"myexamplefile\",\"extension\":\"csv\"}],\"ttlInMinutes\":0,\"identifierValue\":\"1234\",\"parameters\":{}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/uploader-service/clients/files/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({
              "files": [
                {
                  "content": "77u/dGhpcyBpcyBqdXN0IGFuIGV4YW1wbGUgZmlsZQ==",
                  "mimetype": "text/csv",
                  "filename": "myexamplefile",
                  "extension": "csv"
                }
              ],
              "ttlInMinutes": 0,
              "identifierValue": "1234",
              "parameters": {}
            });

            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/uploader-service/clients/files/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": "/uploader-service/clients/files/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({
              files: [
                {
                  content: '77u/dGhpcyBpcyBqdXN0IGFuIGV4YW1wbGUgZmlsZQ==',
                  mimetype: 'text/csv',
                  filename: 'myexamplefile',
                  extension: 'csv'
                }
              ],
              ttlInMinutes: 0,
              identifierValue: '1234',
              parameters: {}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uploader-service/clients/files/by/%7BidentifierType%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"files":[{"content":"77u/dGhpcyBpcyBqdXN0IGFuIGV4YW1wbGUgZmlsZQ==","mimetype":"text/csv","filename":"myexamplefile","extension":"csv"}],"ttlInMinutes":0,"identifierValue":"1234","parameters":{}}');

            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/uploader-service/clients/files/by/%7BidentifierType%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"files\":[{\"content\":\"77u/dGhpcyBpcyBqdXN0IGFuIGV4YW1wbGUgZmlsZQ==\",\"mimetype\":\"text/csv\",\"filename\":\"myexamplefile\",\"extension\":\"csv\"}],\"ttlInMinutes\":0,\"identifierValue\":\"1234\",\"parameters\":{}}")
              .asString();
  /uploader-service/storages/{container}/upload:
    post:
      tags:
        - Uploader
      summary: Upload file
      description: |
        
        Upload a new file to Synerise.

        <strong><span style="color:red">IMPORTANT:</span></strong> Due to technical limitations, the code examples on the right don't include the form data. If you use the examples, remember to add it.

        Example correct cURL request:
        <pre>
        curl --location 'https://api.synerise.com/uploader-service/storages/default/upload' \
        --header 'Authorization: Bearer YOUR_TOKEN' \
        --form 'uploads=@"/Users/currentuser/Downloads/image.png"'
        </pre>


        ---

        **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:** `UPLOADER_SERVICE_STORAGE_CREATE`

        **User role permission required:** `assets_explorer: create`
      operationId: uploadFile
      parameters:
        - in: path
          name: container
          description: Name of the container in which the file will be stored
          required: true
          schema:
            type: string
            example: default
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - uploads
              properties:
                uploads:
                  description: File to upload, binary
                  type: string
                  format: binary
            example: form
      responses:
        "200":
          description: File description
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/uploader-service-UploadResult"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Uploader/operation/uploadFile
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uploader-service/storages/default/upload \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: multipart/form-data' \
              --form uploads=string
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"uploads\"\r\n\r\nstring\r\n-----011000010111000001101001--\r\n"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "multipart/form-data"
                }

            conn.request("POST", "/uploader-service/storages/default/upload", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = new FormData();
            data.append("uploads", "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/uploader-service/storages/default/upload");
            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": "/uploader-service/storages/default/upload",
              "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=\"uploads\"\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/uploader-service/storages/default/upload');

            $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=\"uploads\"\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/uploader-service/storages/default/upload")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"uploads\"\r\n\r\nstring\r\n-----011000010111000001101001--\r\n")
              .asString();
  /uploader-service/storage-files/list:
    get:
      tags:
        - Uploader
      summary: List files from workspace
      description: |
        Retrieve a list of all files 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_explorer: read`
      operationId: getFiles
      responses:
        "200":
          description: Files
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/uploader-service-FileInfo"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Uploader/operation/getFiles
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/uploader-service/storage-files/list \
              --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", "/uploader-service/storage-files/list", 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/uploader-service/storage-files/list");
            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": "/uploader-service/storage-files/list",
              "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/uploader-service/storage-files/list');
            $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/uploader-service/storage-files/list")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /uploader-service/v2/list:
    get:
      tags:
        - Uploader
      summary: List files from workspace
      description: |
        Retrieve a list of all files 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_explorer: read`
      operationId: getFilesV2
      parameters:
        - name: page
          in: query
          required: false
          description: page number
          schema:
            type: integer
            minimum: 0
            default: 0
        - name: limit
          in: query
          required: false
          description: number of elements in a page
          schema:
            type: integer
            minimum: 0
            default: 50
        - name: sortBy
          in: query
          required: false
          description: field to sort by and order
          schema:
            type: string
            pattern: ^(updatedYear|createdAt):(asc|desc)$
            example: createdAt:asc
            default: updatedYear:desc
        - name: mediatype
          in: query
          required: false
          description: filter by media type
          schema:
            type: string
            example: image/jpeg
        - name: extensions
          in: query
          required: false
          description: filter by extension files
          schema:
            type: string
            example: pdf,jpeg
        - name: search
          in: query
          required: false
          description: file id or substring of file name
          schema:
            type: string
      responses:
        "200":
          description: Files
          content:
            application/json:
              schema:
                type: object
                required:
                  - meta
                  - data
                properties:
                  meta:
                    type: object
                    description: Pagination metadata
                    properties:
                      links:
                        type: array
                        description: Links to the neighboring pages and the first page
                        items:
                          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
                      limit:
                        type: integer
                        format: int32
                        description: Limit of items per page
                      count:
                        type: integer
                        nullable: true
                        description: Currently unused
                  data:
                    type: array
                    description: Array of external sources
                    items:
                      $ref: "#/components/schemas/uploader-service-FileDataV2"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Uploader/operation/getFilesV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/uploader-service/v2/list?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&sortBy=createdAt%3Aasc&mediatype=image%2Fjpeg&extensions=pdf%2Cjpeg&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", "/uploader-service/v2/list?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&sortBy=createdAt%3Aasc&mediatype=image%2Fjpeg&extensions=pdf%2Cjpeg&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/uploader-service/v2/list?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&sortBy=createdAt%3Aasc&mediatype=image%2Fjpeg&extensions=pdf%2Cjpeg&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": "/uploader-service/v2/list?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&sortBy=createdAt%3Aasc&mediatype=image%2Fjpeg&extensions=pdf%2Cjpeg&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/uploader-service/v2/list');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_INTEGER_VALUE',
              'limit' => 'SOME_INTEGER_VALUE',
              'sortBy' => 'createdAt:asc',
              'mediatype' => 'image/jpeg',
              'extensions' => 'pdf,jpeg',
              '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/uploader-service/v2/list?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&sortBy=createdAt%3Aasc&mediatype=image%2Fjpeg&extensions=pdf%2Cjpeg&search=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /uploader-service/storage-files/delete-by-uuid:
    post:
      tags:
        - Uploader
      summary: Remove files
      description: |
        Delete one or more files.

        <strong><span style="color:red">IMPORTANT:</span></strong> Due to technical limitations, the code examples on the right don't include the form data. If you use the examples, remember to add it.

        Example correct cURL request:
        <pre>
        curl --location 'https://api.synerise.com/uploader-service/storage-files/delete-by-uuid' \
        --header 'Authorization: Bearer YOUR_TOKEN' \
        --form 'uuids="[\"0ac106beb55c401bac8bc8244e367512\",\"03dc506041e24c3cae284fd3f6611082\"]"'
        </pre>


        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_explorer: delete`
      operationId: removeFiles
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                uuids:
                  $ref: "#/components/schemas/uploader-service-FileUuids"
              required:
                - uuids
      responses:
        "200":
          description: Results of the operation
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: boolean
                  description: Each key in this object is the UUID of a file. If the file was deleted successfully, the value is `true`.
                example:
                  0ac106beb55c401bac8bc8244e367512: true
                  03dc506041e24c3cae284fd3f6611082: true
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Uploader/operation/removeFiles
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uploader-service/storage-files/delete-by-uuid \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: multipart/form-data' \
              --form uuids=string
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"uuids\"\r\n\r\nstring\r\n-----011000010111000001101001--\r\n"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "multipart/form-data"
                }

            conn.request("POST", "/uploader-service/storage-files/delete-by-uuid", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = new FormData();
            data.append("uuids", "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/uploader-service/storage-files/delete-by-uuid");
            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": "/uploader-service/storage-files/delete-by-uuid",
              "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=\"uuids\"\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/uploader-service/storage-files/delete-by-uuid');

            $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=\"uuids\"\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/uploader-service/storage-files/delete-by-uuid")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"uuids\"\r\n\r\nstring\r\n-----011000010111000001101001--\r\n")
              .asString();
  /uploader-service/storage-files/add-star-by-uuid:
    post:
      tags:
        - Uploader
      summary: Add stars
      description: |
        Add a star to one or more files. Stars are used to mark files as favorite and make them easier to find.

        <strong><span style="color:red">IMPORTANT:</span></strong> Due to technical limitations, the code examples on the right don't include the form data. If you use the examples, remember to add it.

        Example correct cURL request:
        <pre>
        curl --location 'https://api.synerise.com/uploader-service/storage-files/add-star-by-uuid' \
        --header 'Authorization: Bearer YOUR_TOKEN' \
        --form 'uuids="[\"0ac106beb55c401bac8bc8244e367512\",\"03dc506041e24c3cae284fd3f6611082\"]"'
        </pre>


        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_explorer: update`
      operationId: addStarByUUID
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                uuids:
                  $ref: "#/components/schemas/uploader-service-FileUuids"
              required:
                - uuids
      responses:
        "200":
          description: Results of the operation
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: boolean
                  description: Each key in this object is the UUID of a file. If the file was starred successfully or was already starred before, the value is `true`. If a file doesn't exist, the result is `false`.
                example:
                  0ac106beb55c401bac8bc8244e367512: false
                  03dc506041e24c3cae284fd3f6611082: true
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Uploader/operation/addStarByUUID
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uploader-service/storage-files/add-star-by-uuid \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: multipart/form-data' \
              --form uuids=string
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"uuids\"\r\n\r\nstring\r\n-----011000010111000001101001--\r\n"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "multipart/form-data"
                }

            conn.request("POST", "/uploader-service/storage-files/add-star-by-uuid", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = new FormData();
            data.append("uuids", "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/uploader-service/storage-files/add-star-by-uuid");
            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": "/uploader-service/storage-files/add-star-by-uuid",
              "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=\"uuids\"\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/uploader-service/storage-files/add-star-by-uuid');

            $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=\"uuids\"\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/uploader-service/storage-files/add-star-by-uuid")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"uuids\"\r\n\r\nstring\r\n-----011000010111000001101001--\r\n")
              .asString();
  /uploader-service/storage-files/remove-star-by-uuid:
    post:
      tags:
        - Uploader
      summary: Remove stars
      description: |
        Remove stars from one or more files.

        <strong><span style="color:red">IMPORTANT:</span></strong> Due to technical limitations, the code examples on the right don't include the form data. If you use the examples, remember to add it.

        Example correct cURL request:
        <pre>
        curl --location 'https://api.synerise.com/uploader-service/storage-files/remove-star-by-uuid' \
        --header 'Authorization: Bearer YOUR_TOKEN' \
        --form 'uuids="[\"0ac106beb55c401bac8bc8244e367512\",\"03dc506041e24c3cae284fd3f6611082\"]"'
        </pre>


        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_explorer: update`
      operationId: removeStarByUUID
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                uuids:
                  $ref: "#/components/schemas/uploader-service-FileUuids"
              required:
                - uuids
      responses:
        "200":
          description: Results of the operation
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: boolean
                  description: Each key in this object is the UUID of a file. If the file was unstarred successfully or was already unstarred before, the value is `true`. If a file doesn't exist, the result is `false`.
                example:
                  0ac106beb55c401bac8bc8244e367512: false
                  03dc506041e24c3cae284fd3f6611082: true
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Uploader/operation/removeStarByUUID
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uploader-service/storage-files/remove-star-by-uuid \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: multipart/form-data' \
              --form uuids=string
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"uuids\"\r\n\r\nstring\r\n-----011000010111000001101001--\r\n"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "multipart/form-data"
                }

            conn.request("POST", "/uploader-service/storage-files/remove-star-by-uuid", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = new FormData();
            data.append("uuids", "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/uploader-service/storage-files/remove-star-by-uuid");
            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": "/uploader-service/storage-files/remove-star-by-uuid",
              "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=\"uuids\"\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/uploader-service/storage-files/remove-star-by-uuid');

            $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=\"uuids\"\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/uploader-service/storage-files/remove-star-by-uuid")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"uuids\"\r\n\r\nstring\r\n-----011000010111000001101001--\r\n")
              .asString();
  /v4/vouchers/item/assign:
    post:
      tags:
        - Vouchers
      summary: Assign a voucher from a pool to Profile
      description: |
        Assign a voucher code from an existing pool to a Profile.

        ---

        **API consumers:** <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>

        **User role permission required:** `assets_code_pool: create`
      operationId: AssignAVoucherFromAPoolToAClient
      parameters:
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/vouchers-voucherActionRequestAsClientReq"
        required: true
      responses:
        "201":
          description: Code assigned
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    default: Code assigned with success
                  data:
                    $ref: "#/components/schemas/vouchers-data"
        "416":
          description: Range Not Satisfiable
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-voucherResponseMessage"
              example:
                message: Out of scope. Pool is empty.
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/AssignAVoucherFromAPoolToAClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/vouchers/item/assign \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE' \
              --header 'content-type: application/json' \
              --data '{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientUuid":"17243772-008a-42e1-ba37-c3807cebde8f"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"17243772-008a-42e1-ba37-c3807cebde8f\"}"

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/vouchers/item/assign", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "poolUuid": "faec32b0-c343-4362-ba32-c6148c649da4",
              "clientUuid": "17243772-008a-42e1-ba37-c3807cebde8f"
            });

            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/v4/vouchers/item/assign");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/vouchers/item/assign",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              poolUuid: 'faec32b0-c343-4362-ba32-c6148c649da4',
              clientUuid: '17243772-008a-42e1-ba37-c3807cebde8f'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item/assign');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientUuid":"17243772-008a-42e1-ba37-c3807cebde8f"}');

            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/v4/vouchers/item/assign")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"17243772-008a-42e1-ba37-c3807cebde8f\"}")
              .asString();
  /v4/vouchers/item/get-assigned:
    get:
      tags:
        - Vouchers
      summary: Get assigned vouchers
      description: |
        Retrieve all vouchers assigned to a Profile.

        ---

        **API consumers:** <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>

        **User role permission required:** `assets_code_pool: read`
      operationId: GetAssignedVouchers
      parameters:
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      responses:
        "200":
          description: An array of vouchers
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-vouchersDataList"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/GetAssignedVouchers
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/vouchers/item/get-assigned \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/vouchers/item/get-assigned", 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/v4/vouchers/item/get-assigned");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "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": "/v4/vouchers/item/get-assigned",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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/v4/vouchers/item/get-assigned');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              '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/v4/vouchers/item/get-assigned")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/vouchers/item/get-or-assign:
    post:
      tags:
        - Vouchers
      summary: Get or assign and get voucher as Profile
      description: |
        Retrieve the code assigned to a Profile. If no code was assigned earlier, the method assigns one.


        For each Profile, the same code is retrieved every time. This can be used, for example, to retrieve unique codes used to identify a Profile.

        ---

        **API consumers:** <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>

        **User role permission required:** `assets_code_pool: read`
      operationId: GetOrAssignAndGetVoucherAsClient
      parameters:
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/vouchers-voucherActionRequestAsClientReq"
        required: true
      responses:
        "200":
          description: Details of the code
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    default: Code found with success
                  data:
                    $ref: "#/components/schemas/vouchers-getOrAssignAndGetVoucherDataRes"
        "416":
          description: Range Not Satisfiable
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-voucherResponseMessage"
              example:
                message: Out of scope. Pool is empty.
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/GetOrAssignAndGetVoucherAsClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/vouchers/item/get-or-assign \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE' \
              --header 'content-type: application/json' \
              --data '{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientUuid":"17243772-008a-42e1-ba37-c3807cebde8f"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"17243772-008a-42e1-ba37-c3807cebde8f\"}"

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/vouchers/item/get-or-assign", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "poolUuid": "faec32b0-c343-4362-ba32-c6148c649da4",
              "clientUuid": "17243772-008a-42e1-ba37-c3807cebde8f"
            });

            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/v4/vouchers/item/get-or-assign");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/vouchers/item/get-or-assign",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              poolUuid: 'faec32b0-c343-4362-ba32-c6148c649da4',
              clientUuid: '17243772-008a-42e1-ba37-c3807cebde8f'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item/get-or-assign');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientUuid":"17243772-008a-42e1-ba37-c3807cebde8f"}');

            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/v4/vouchers/item/get-or-assign")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"17243772-008a-42e1-ba37-c3807cebde8f\"}")
              .asString();
  /v4/vouchers/item:
    post:
      tags:
        - Vouchers
      summary: Create a voucher
      description: |
        Create a single code and store it in a pool.

        ---

        **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:** `VOUCHERS_ITEM_CREATE`

        **User role permission required:** `assets_code_pool: create`
      operationId: CreateAVoucher
      parameters:
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/vouchers-voucherData"
        required: true
      responses:
        "201":
          description: Voucher created
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    default: Create object with success
                  data:
                    $ref: "#/components/schemas/vouchers-data"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/CreateAVoucher
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/vouchers/item \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE' \
              --header 'content-type: application/json' \
              --data '{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientUuid":"07243772-008a-42e1-ba37-c3807cebde8f","clientId":0,"code":"code123","expireIn":"2019-08-24T14:15:22Z","redeemAt":"2019-08-24T14:15:22Z","assignedAt":"2019-08-24T14:15:22Z","status":"ASSIGNED","createdAt":"2019-08-24T14:15:22Z","updatedAt":"2019-08-24T14:15:22Z"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"clientId\":0,\"code\":\"code123\",\"expireIn\":\"2019-08-24T14:15:22Z\",\"redeemAt\":\"2019-08-24T14:15:22Z\",\"assignedAt\":\"2019-08-24T14:15:22Z\",\"status\":\"ASSIGNED\",\"createdAt\":\"2019-08-24T14:15:22Z\",\"updatedAt\":\"2019-08-24T14:15:22Z\"}"

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/vouchers/item", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "poolUuid": "faec32b0-c343-4362-ba32-c6148c649da4",
              "clientUuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "clientId": 0,
              "code": "code123",
              "expireIn": "2019-08-24T14:15:22Z",
              "redeemAt": "2019-08-24T14:15:22Z",
              "assignedAt": "2019-08-24T14:15:22Z",
              "status": "ASSIGNED",
              "createdAt": "2019-08-24T14:15:22Z",
              "updatedAt": "2019-08-24T14:15:22Z"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/v4/vouchers/item");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/vouchers/item",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              poolUuid: 'faec32b0-c343-4362-ba32-c6148c649da4',
              clientUuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              clientId: 0,
              code: 'code123',
              expireIn: '2019-08-24T14:15:22Z',
              redeemAt: '2019-08-24T14:15:22Z',
              assignedAt: '2019-08-24T14:15:22Z',
              status: 'ASSIGNED',
              createdAt: '2019-08-24T14:15:22Z',
              updatedAt: '2019-08-24T14:15:22Z'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientUuid":"07243772-008a-42e1-ba37-c3807cebde8f","clientId":0,"code":"code123","expireIn":"2019-08-24T14:15:22Z","redeemAt":"2019-08-24T14:15:22Z","assignedAt":"2019-08-24T14:15:22Z","status":"ASSIGNED","createdAt":"2019-08-24T14:15:22Z","updatedAt":"2019-08-24T14:15:22Z"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/vouchers/item")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"clientId\":0,\"code\":\"code123\",\"expireIn\":\"2019-08-24T14:15:22Z\",\"redeemAt\":\"2019-08-24T14:15:22Z\",\"assignedAt\":\"2019-08-24T14:15:22Z\",\"status\":\"ASSIGNED\",\"createdAt\":\"2019-08-24T14:15:22Z\",\"updatedAt\":\"2019-08-24T14:15:22Z\"}")
              .asString();
  /v4/vouchers/item/bulk-create:
    post:
      tags:
        - Vouchers
      summary: Bulk create vouchers
      description: |
        Create a number of codes and add them to a pool.

        <span style="color:red"><strong>WARNING:</strong></span> The request body cannot contain more than 10 000 items or exceed 10 MB in size.

        ---

        **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:** `VOUCHERS_ITEM_BULK_CREATE`

        **User role permission required:** `assets_code_pool: create`
      operationId: BulkCreateVouchers
      parameters:
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/vouchers-bulkCreateVouchersReq"
      responses:
        "201":
          description: Vouchers created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/vouchers-bulkCreateResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-voucher-HTTP400Res"
              example:
                message: Data format is not valid
                error:
                  - field: code
                    message: code must be unique
                    validatorKey: not_unique
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/BulkCreateVouchers
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/vouchers/item/bulk-create \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE' \
              --header 'content-type: application/json' \
              --data '{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","codeList":"3845734682364756454534;384574634564545456;567868678345234346748"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"codeList\":\"3845734682364756454534;384574634564545456;567868678345234346748\"}"

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/vouchers/item/bulk-create", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "poolUuid": "faec32b0-c343-4362-ba32-c6148c649da4",
              "codeList": "3845734682364756454534;384574634564545456;567868678345234346748"
            });

            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/v4/vouchers/item/bulk-create");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/vouchers/item/bulk-create",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              poolUuid: 'faec32b0-c343-4362-ba32-c6148c649da4',
              codeList: '3845734682364756454534;384574634564545456;567868678345234346748'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item/bulk-create');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","codeList":"3845734682364756454534;384574634564545456;567868678345234346748"}');

            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/v4/vouchers/item/bulk-create")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"codeList\":\"3845734682364756454534;384574634564545456;567868678345234346748\"}")
              .asString();
  /v4/vouchers/item/list:
    get:
      tags:
        - Vouchers
      summary: List all vouchers
      description: |
        Retrieve all vouchers for a Workspace. You can customize the search.

        ---

        **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:** `VOUCHERS_ITEM_LIST_READ`

        **User role permission required:** `assets_code_pool: read`
      operationId: ListVouchers
      parameters:
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
        - $ref: "#/components/parameters/vouchers-queryLimit"
        - $ref: "#/components/parameters/vouchers-queryPage"
        - $ref: "#/components/parameters/vouchers-queryIncludeMeta"
      responses:
        "200":
          description: An array of vouchers
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-listVouchersSuccessRes"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/ListVouchers
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/vouchers/item/list?limit=100&page=4&includeMeta=false' \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/vouchers/item/list?limit=100&page=4&includeMeta=false", 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/v4/vouchers/item/list?limit=100&page=4&includeMeta=false");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "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": "/v4/vouchers/item/list?limit=100&page=4&includeMeta=false",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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/v4/vouchers/item/list');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'limit' => '100',
              'page' => '4',
              'includeMeta' => 'false'
            ]);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              '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/v4/vouchers/item/list?limit=100&page=4&includeMeta=false")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/vouchers/item/{voucherUuid}:
    get:
      tags:
        - Vouchers
      summary: View voucher details
      description: |
        Retrieve all details of a single code.

        ---

        **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:** `VOUCHERS_ITEM_READ`

        **User role permission required:** `assets_code_pool: read`
      operationId: ViewVoucherDetails
      parameters:
        - $ref: "#/components/parameters/vouchers-pathVoucherUuid"
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      responses:
        "200":
          description: Details of a voucher
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/vouchers-voucherData"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/ViewVoucherDetails
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173 \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173", 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/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "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": "/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              '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/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    put:
      tags:
        - Vouchers
      summary: Update a voucher
      description: |
        Update an existing code.


        If you don't want to change a field, omit it entirely. Sending a null-value field replaces an existing value.

        ---

        **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:** `VOUCHERS_ITEM_UPDATE`

        **User role permission required:** `assets_code_pool: update`
      operationId: UpdateAVoucher
      parameters:
        - $ref: "#/components/parameters/vouchers-pathVoucherUuid"
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/vouchers-voucherData"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    default: Update object with success
                  data:
                    $ref: "#/components/schemas/vouchers-data"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-voucher-HTTP400Res"
              example:
                message: Data format is not valid
                error:
                  - field: status
                    message: Validation isIn on status failed
                    validatorKey: isIn
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/UpdateAVoucher
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173 \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE' \
              --header 'content-type: application/json' \
              --data '{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientUuid":"07243772-008a-42e1-ba37-c3807cebde8f","clientId":0,"code":"code123","expireIn":"2019-08-24T14:15:22Z","redeemAt":"2019-08-24T14:15:22Z","assignedAt":"2019-08-24T14:15:22Z","status":"ASSIGNED","createdAt":"2019-08-24T14:15:22Z","updatedAt":"2019-08-24T14:15:22Z"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"clientId\":0,\"code\":\"code123\",\"expireIn\":\"2019-08-24T14:15:22Z\",\"redeemAt\":\"2019-08-24T14:15:22Z\",\"assignedAt\":\"2019-08-24T14:15:22Z\",\"status\":\"ASSIGNED\",\"createdAt\":\"2019-08-24T14:15:22Z\",\"updatedAt\":\"2019-08-24T14:15:22Z\"}"

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("PUT", "/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "poolUuid": "faec32b0-c343-4362-ba32-c6148c649da4",
              "clientUuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "clientId": 0,
              "code": "code123",
              "expireIn": "2019-08-24T14:15:22Z",
              "redeemAt": "2019-08-24T14:15:22Z",
              "assignedAt": "2019-08-24T14:15:22Z",
              "status": "ASSIGNED",
              "createdAt": "2019-08-24T14:15:22Z",
              "updatedAt": "2019-08-24T14:15:22Z"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("PUT", "https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              poolUuid: 'faec32b0-c343-4362-ba32-c6148c649da4',
              clientUuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              clientId: 0,
              code: 'code123',
              expireIn: '2019-08-24T14:15:22Z',
              redeemAt: '2019-08-24T14:15:22Z',
              assignedAt: '2019-08-24T14:15:22Z',
              status: 'ASSIGNED',
              createdAt: '2019-08-24T14:15:22Z',
              updatedAt: '2019-08-24T14:15:22Z'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientUuid":"07243772-008a-42e1-ba37-c3807cebde8f","clientId":0,"code":"code123","expireIn":"2019-08-24T14:15:22Z","redeemAt":"2019-08-24T14:15:22Z","assignedAt":"2019-08-24T14:15:22Z","status":"ASSIGNED","createdAt":"2019-08-24T14:15:22Z","updatedAt":"2019-08-24T14:15:22Z"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.put("https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"clientId\":0,\"code\":\"code123\",\"expireIn\":\"2019-08-24T14:15:22Z\",\"redeemAt\":\"2019-08-24T14:15:22Z\",\"assignedAt\":\"2019-08-24T14:15:22Z\",\"status\":\"ASSIGNED\",\"createdAt\":\"2019-08-24T14:15:22Z\",\"updatedAt\":\"2019-08-24T14:15:22Z\"}")
              .asString();
    delete:
      tags:
        - Vouchers
      summary: Delete a voucher
      description: |
        Delete an existing code.

        ---

        **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:** `VOUCHERS_ITEM_DELETE`

        **User role permission required:** `assets_code_pool: delete`
      operationId: DeleteAVoucher
      parameters:
        - $ref: "#/components/parameters/vouchers-pathVoucherUuid"
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      responses:
        "200":
          description: Voucher deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    default: Delete object with success
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/DeleteAVoucher
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173 \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("DELETE", "/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173", 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/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "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": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              '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/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/vouchers/item/{searchKey}/{searchValue}:
    get:
      tags:
        - Vouchers
      summary: View voucher details by search key
      description: |
        Retrieve all details of a single voucher. As the key (identifier), you can use the promotion's code or UUID.

        ---

        **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:** `VOUCHERS_ITEM_BY_SEARCH_KEY_READ`

        **User role permission required:** `assets_code_pool: read`
      operationId: ViewVoucherDetailsBySearchKey
      parameters:
        - $ref: "#/components/parameters/vouchers-pathVoucherSearchKey"
        - $ref: "#/components/parameters/vouchers-pathVoucherSearchValue"
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      responses:
        "200":
          description: Details of a voucher
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/vouchers-voucherData"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/ViewVoucherDetailsBySearchKey
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/vouchers/item/code/29392878-d43f-402e-8297-f63d465cf173 \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/vouchers/item/code/29392878-d43f-402e-8297-f63d465cf173", 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/v4/vouchers/item/code/29392878-d43f-402e-8297-f63d465cf173");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "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": "/v4/vouchers/item/code/29392878-d43f-402e-8297-f63d465cf173",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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/v4/vouchers/item/code/29392878-d43f-402e-8297-f63d465cf173');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              '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/v4/vouchers/item/code/29392878-d43f-402e-8297-f63d465cf173")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/vouchers/item/assign-for-client:
    post:
      tags:
        - Vouchers
      summary: Assign a voucher to a Profile
      description: |
        Assign a code to a Profile and retrieve it. Every time this method is used, a different code is assigned.

        ---

        **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:** `VOUCHERS_ITEM_ASSIGN_FOR_CLIENT_CREATE`

        **User role permission required:** `assets_code_pool: create`
      operationId: AssignAVoucherToAClient
      parameters:
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/vouchers-voucherActionRequestAsProfileReq"
        required: true
      responses:
        "201":
          description: Voucher assigned
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    default: Code assigned with success
                  data:
                    $ref: "#/components/schemas/vouchers-getOrAssignAndGetVoucherDataRes"
        "416":
          description: Pool empty, expired, not found, or Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-voucher-HTTP400Res"
              example:
                message: Pool does not exist or expired
                error:
                  message: Pool does not exist or expired
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/AssignAVoucherToAClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/vouchers/item/assign-for-client \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE' \
              --header 'content-type: application/json' \
              --data '{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientUuid":"07243772-008a-42e1-ba37-c3807cebde8f"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}"

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/vouchers/item/assign-for-client", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "poolUuid": "faec32b0-c343-4362-ba32-c6148c649da4",
              "clientUuid": "07243772-008a-42e1-ba37-c3807cebde8f"
            });

            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/v4/vouchers/item/assign-for-client");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/vouchers/item/assign-for-client",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              poolUuid: 'faec32b0-c343-4362-ba32-c6148c649da4',
              clientUuid: '07243772-008a-42e1-ba37-c3807cebde8f'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item/assign-for-client');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientUuid":"07243772-008a-42e1-ba37-c3807cebde8f"}');

            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/v4/vouchers/item/assign-for-client")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}")
              .asString();
  /v4/vouchers/item/get-assigned-for-client/{clientUuid}:
    get:
      deprecated: true
      tags:
        - Vouchers
      summary: Get vouchers assigned to a Profile
      description: |
        Get all codes assigned to a Profile.

        ---

        **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:** `VOUCHERS_ITEM_ASSIGN_FOR_CLIENT_READ`

        **User role permission required:** `assets_code_pool: read`
      operationId: GetVouchersAssignedToAClient
      parameters:
        - $ref: "#/components/parameters/vouchers-pathClientUuid"
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      responses:
        "200":
          description: An array of vouchers
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-vouchersDataList"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/GetVouchersAssignedToAClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/vouchers/item/get-assigned-for-client/e9e6840b-b9d4-4c7b-8191-9c4f9e751c76 \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/vouchers/item/get-assigned-for-client/e9e6840b-b9d4-4c7b-8191-9c4f9e751c76", 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/v4/vouchers/item/get-assigned-for-client/e9e6840b-b9d4-4c7b-8191-9c4f9e751c76");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "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": "/v4/vouchers/item/get-assigned-for-client/e9e6840b-b9d4-4c7b-8191-9c4f9e751c76",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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/v4/vouchers/item/get-assigned-for-client/e9e6840b-b9d4-4c7b-8191-9c4f9e751c76');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              '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/v4/vouchers/item/get-assigned-for-client/e9e6840b-b9d4-4c7b-8191-9c4f9e751c76")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/vouchers/item/get-or-assign-for-client:
    post:
      deprecated: true
      tags:
        - Vouchers
      summary: Get or assign and get voucher as Workspace
      description: |
        Retrieve the code assigned to a profile. If no code was assigned earlier, the method assigns one.


        For each profile, the same code is retrieved every time. This can be used, for example, to retrieve unique codes used to identify a profile.

        ---

        **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:** `VOUCHERS_ITEM_ASSIGN_FOR_CLIENT_CREATE`

        **User role permission required:** `assets_code_pool: create`
      operationId: GetOrAssignAndGetVoucherAsBusinessProfile
      parameters:
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/vouchers-voucherActionRequestAsProfileReq"
        required: true
      responses:
        "200":
          description: Details of a voucher
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/vouchers-getOrAssignAndGetVoucherDataRes"
        "416":
          description: Pool empty, expired, not found, or Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-voucher-HTTP400Res"
              example:
                message: Pool does not exist or expired
                error:
                  message: Pool does not exist or expired
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/GetOrAssignAndGetVoucherAsBusinessProfile
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/vouchers/item/get-or-assign-for-client \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE' \
              --header 'content-type: application/json' \
              --data '{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientUuid":"07243772-008a-42e1-ba37-c3807cebde8f"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}"

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/vouchers/item/get-or-assign-for-client", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "poolUuid": "faec32b0-c343-4362-ba32-c6148c649da4",
              "clientUuid": "07243772-008a-42e1-ba37-c3807cebde8f"
            });

            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/v4/vouchers/item/get-or-assign-for-client");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/vouchers/item/get-or-assign-for-client",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              poolUuid: 'faec32b0-c343-4362-ba32-c6148c649da4',
              clientUuid: '07243772-008a-42e1-ba37-c3807cebde8f'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item/get-or-assign-for-client');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientUuid":"07243772-008a-42e1-ba37-c3807cebde8f"}');

            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/v4/vouchers/item/get-or-assign-for-client")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}")
              .asString();
  /v4/vouchers/item/get-assigned-for-client/by-identifier:
    get:
      tags:
        - Vouchers
      summary: Get vouchers assigned to a Profile by identifier
      description: |
        Get all codes assigned to a Profile.

        ---

        **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:** `VOUCHERS_ITEM_ASSIGN_FOR_CLIENT_READ`

        **User role permission required:** `assets_code_pool: read`
      operationId: GetVouchersAssignedToAClientByIdentifier
      parameters:
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
        - $ref: "#/components/parameters/vouchers-queryClientIdentifierName"
        - $ref: "#/components/parameters/vouchers-queryClientIdentifierValue"
      responses:
        "200":
          description: An array of vouchers
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-vouchersDataList"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-voucher-HTTP400Res"
              example:
                message: Query params are not valid
        "416":
          description: Invalid parameter
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-voucher-HTTP400Res"
              example:
                message: Invalid parameter
                error:
                  message: Invalid parameter
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/GetVouchersAssignedToAClientByIdentifier
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/vouchers/item/get-assigned-for-client/by-identifier?clientIdentifierName=custom_identify&clientIdentifierValue=custom_identify_123456' \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/vouchers/item/get-assigned-for-client/by-identifier?clientIdentifierName=custom_identify&clientIdentifierValue=custom_identify_123456", 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/v4/vouchers/item/get-assigned-for-client/by-identifier?clientIdentifierName=custom_identify&clientIdentifierValue=custom_identify_123456");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "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": "/v4/vouchers/item/get-assigned-for-client/by-identifier?clientIdentifierName=custom_identify&clientIdentifierValue=custom_identify_123456",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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/v4/vouchers/item/get-assigned-for-client/by-identifier');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'clientIdentifierName' => 'custom_identify',
              'clientIdentifierValue' => 'custom_identify_123456'
            ]);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              '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/v4/vouchers/item/get-assigned-for-client/by-identifier?clientIdentifierName=custom_identify&clientIdentifierValue=custom_identify_123456")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/vouchers/item/get-or-assign-for-client/by-identifier:
    post:
      tags:
        - Vouchers
      summary: Get or assign and get voucher as Workspace
      description: |
        Retrieve the code assigned to a profile. If no code was assigned earlier, the method assigns one (it uses the provided profile identifier).

        For each profile, the same code is retrieved every time. This can be used, for example, to retrieve unique codes used to identify a profile.

        ---

        **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:** `VOUCHERS_ITEM_ASSIGN_FOR_CLIENT_CREATE`

        **User role permission required:** `assets_code_pool: create`
      operationId: GetOrAssignAndGetVoucherByIdentifierAsBusinessProfile
      parameters:
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
        - $ref: "#/components/parameters/vouchers-queryClientIdentifierName"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/vouchers-voucherActionRequestByClientIdentifierAsProfileReq"
        required: true
      responses:
        "200":
          description: Details of a voucher
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/vouchers-getOrAssignAndGetVoucherDataRes"
        "416":
          description: Pool empty, expired, not found, or Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-voucher-HTTP400Res"
              example:
                message: Pool does not exist or expired
                error:
                  message: Pool does not exist or expired
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/GetOrAssignAndGetVoucherByIdentifierAsBusinessProfile
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api.synerise.com/v4/vouchers/item/get-or-assign-for-client/by-identifier?clientIdentifierName=custom_identify' \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE' \
              --header 'content-type: application/json' \
              --data '{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientIdentifierValue":"custom_identify_1234"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientIdentifierValue\":\"custom_identify_1234\"}"

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/vouchers/item/get-or-assign-for-client/by-identifier?clientIdentifierName=custom_identify", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "poolUuid": "faec32b0-c343-4362-ba32-c6148c649da4",
              "clientIdentifierValue": "custom_identify_1234"
            });

            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/v4/vouchers/item/get-or-assign-for-client/by-identifier?clientIdentifierName=custom_identify");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/vouchers/item/get-or-assign-for-client/by-identifier?clientIdentifierName=custom_identify",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              poolUuid: 'faec32b0-c343-4362-ba32-c6148c649da4',
              clientIdentifierValue: 'custom_identify_1234'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item/get-or-assign-for-client/by-identifier');
            $request->setMethod(HTTP_METH_POST);

            $request->setQueryData([
              'clientIdentifierName' => 'custom_identify'
            ]);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientIdentifierValue":"custom_identify_1234"}');

            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/v4/vouchers/item/get-or-assign-for-client/by-identifier?clientIdentifierName=custom_identify")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientIdentifierValue\":\"custom_identify_1234\"}")
              .asString();
  /v4/vouchers/item/assign-for-client/by-identifier:
    post:
      tags:
        - Vouchers
      summary: Assign and get voucher as Workspace
      description: |
        Assign a code to a profile and retrieve it. Every time this method is used, a different code is assigned.

        ---

        **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:** `VOUCHERS_ITEM_ASSIGN_FOR_CLIENT_CREATE`

        **User role permission required:** `assets_code_pool: create`
      operationId: AssignAndGetVoucherByIdentifierAsBusinessProfile
      parameters:
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
        - $ref: "#/components/parameters/vouchers-queryClientIdentifierName"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/vouchers-voucherActionRequestByClientIdentifierAsProfileReq"
        required: true
      responses:
        "201":
          description: Voucher assigned
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/vouchers-getOrAssignAndGetVoucherDataRes"
        "416":
          description: Pool empty, expired, not found, or Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-voucher-HTTP400Res"
              example:
                message: Pool does not exist or expired
                error:
                  message: Pool does not exist or expired
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/AssignAndGetVoucherByIdentifierAsBusinessProfile
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api.synerise.com/v4/vouchers/item/assign-for-client/by-identifier?clientIdentifierName=custom_identify' \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE' \
              --header 'content-type: application/json' \
              --data '{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientIdentifierValue":"custom_identify_1234"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientIdentifierValue\":\"custom_identify_1234\"}"

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/vouchers/item/assign-for-client/by-identifier?clientIdentifierName=custom_identify", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "poolUuid": "faec32b0-c343-4362-ba32-c6148c649da4",
              "clientIdentifierValue": "custom_identify_1234"
            });

            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/v4/vouchers/item/assign-for-client/by-identifier?clientIdentifierName=custom_identify");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/vouchers/item/assign-for-client/by-identifier?clientIdentifierName=custom_identify",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              poolUuid: 'faec32b0-c343-4362-ba32-c6148c649da4',
              clientIdentifierValue: 'custom_identify_1234'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item/assign-for-client/by-identifier');
            $request->setMethod(HTTP_METH_POST);

            $request->setQueryData([
              'clientIdentifierName' => 'custom_identify'
            ]);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientIdentifierValue":"custom_identify_1234"}');

            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/v4/vouchers/item/assign-for-client/by-identifier?clientIdentifierName=custom_identify")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientIdentifierValue\":\"custom_identify_1234\"}")
              .asString();
  /v4/vouchers/item/redeem:
    post:
      tags:
        - Vouchers
      summary: Redeem a voucher
      description: |
        Redeem a code.

        ---

        **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:** `VOUCHERS_ITEM_REDEEM_CREATE`

        **User role permission required:** `assets_code_pool: create`
      operationId: RedeemAVoucher
      parameters:
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/vouchers-voucherRedeemReq"
        required: true
      responses:
        "200":
          description: Voucher redeemed
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    default: Code redeemed with success
                  data:
                    $ref: "#/components/schemas/vouchers-voucherDataRedeemed"
        "400":
          description: Data format is not valid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Param code is required
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/RedeemAVoucher
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/vouchers/item/redeem \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE' \
              --header 'content-type: application/json' \
              --data '{"code":"code123"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"code\":\"code123\"}"

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/vouchers/item/redeem", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "code": "code123"
            });

            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/v4/vouchers/item/redeem");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/vouchers/item/redeem",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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({code: 'code123'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item/redeem');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"code":"code123"}');

            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/v4/vouchers/item/redeem")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"code\":\"code123\"}")
              .asString();
  /v4/vouchers/pool/list:
    get:
      tags:
        - Vouchers
      summary: List pools
      description: |
        Retrieve a list of voucher pools.

        ---

        **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:** `VOUCHERS_POOL_LIST_READ`

        **User role permission required:** `assets_code_pool: read`
      operationId: ListPools
      parameters:
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
        - $ref: "#/components/parameters/vouchers-queryIncludeMeta"
        - $ref: "#/components/parameters/vouchers-querySortFieldName"
        - $ref: "#/components/parameters/vouchers-querySortingOrder"
        - $ref: "#/components/parameters/vouchers-queryFilter"
        - $ref: "#/components/parameters/vouchers-queryLimit"
        - $ref: "#/components/parameters/vouchers-queryPage"
      responses:
        "200":
          description: An array of voucher pools
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/vouchers-poolData"
                    description: An array of voucher pools
                  meta:
                    $ref: "#/components/schemas/vouchers-paginationMeta"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/ListPools
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/vouchers/pool/list?includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&limit=100&page=4' \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/vouchers/pool/list?includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&limit=100&page=4", 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/v4/vouchers/pool/list?includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&limit=100&page=4");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "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": "/v4/vouchers/pool/list?includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&limit=100&page=4",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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/v4/vouchers/pool/list');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'includeMeta' => 'false',
              'orderFieldName' => 'SOME_STRING_VALUE',
              'order' => 'SOME_STRING_VALUE',
              'query' => 'SOME_STRING_VALUE',
              'limit' => '100',
              'page' => '4'
            ]);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              '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/v4/vouchers/pool/list?includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&limit=100&page=4")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/vouchers/pool:
    post:
      tags:
        - Vouchers
      summary: Create a voucher pool
      description: |
        Create a pool for voucher storage.

        ---

        **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:** `VOUCHERS_POOL_CREATE`

        **User role permission required:** `assets_code_pool: create`
      operationId: CreateAVoucherPool
      parameters:
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/vouchers-createAVoucherPoolReq"
        required: true
      responses:
        "201":
          description: Pool created
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    default: Create object with success
                  data:
                    $ref: "#/components/schemas/vouchers-poolData"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/CreateAVoucherPool
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/vouchers/pool \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE' \
              --header 'content-type: application/json' \
              --data '{"name":"string","barcodeType":"NONE","description":"string","voucherPrefix":"0","poolLimit":0,"redeemedLimitPerClient":0,"startAt":"2019-08-24T14:15:22Z"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"name\":\"string\",\"barcodeType\":\"NONE\",\"description\":\"string\",\"voucherPrefix\":\"0\",\"poolLimit\":0,\"redeemedLimitPerClient\":0,\"startAt\":\"2019-08-24T14:15:22Z\"}"

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/vouchers/pool", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "name": "string",
              "barcodeType": "NONE",
              "description": "string",
              "voucherPrefix": "0",
              "poolLimit": 0,
              "redeemedLimitPerClient": 0,
              "startAt": "2019-08-24T14:15:22Z"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/v4/vouchers/pool");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/vouchers/pool",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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',
              barcodeType: 'NONE',
              description: 'string',
              voucherPrefix: '0',
              poolLimit: 0,
              redeemedLimitPerClient: 0,
              startAt: '2019-08-24T14:15:22Z'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/pool');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"name":"string","barcodeType":"NONE","description":"string","voucherPrefix":"0","poolLimit":0,"redeemedLimitPerClient":0,"startAt":"2019-08-24T14:15:22Z"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/vouchers/pool")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\",\"barcodeType\":\"NONE\",\"description\":\"string\",\"voucherPrefix\":\"0\",\"poolLimit\":0,\"redeemedLimitPerClient\":0,\"startAt\":\"2019-08-24T14:15:22Z\"}")
              .asString();
  /v4/vouchers/pool/{poolUuid}:
    get:
      tags:
        - Vouchers
      summary: Get pool details
      description: |
        Retrieve the details of a single voucher pool.

        ---

        **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:** `VOUCHERS_POOL_READ`

        **User role permission required:** `assets_code_pool: read`
      operationId: GetPoolDetails
      parameters:
        - $ref: "#/components/parameters/vouchers-pathPoolUuid"
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      responses:
        "200":
          description: Details of a voucher pool
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/vouchers-poolDataRes"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/GetPoolDetails
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115 \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115", 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/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "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": "/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              '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/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    put:
      tags:
        - Vouchers
      summary: Update a voucher pool
      description: |
        Update an existing pool of vouchers. If you don't want to change a parameter, omit it entirely.

        ---

        **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:** `VOUCHERS_POOL_UPDATE`

        **User role permission required:** `assets_code_pool: update`
      operationId: UpdateAVoucherPool
      parameters:
        - $ref: "#/components/parameters/vouchers-pathPoolUuid"
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/vouchers-createAVoucherPoolReq"
        required: true
      responses:
        "200":
          description: Voucher pool
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    default: Update object with success
                  data:
                    $ref: "#/components/schemas/vouchers-poolDataRes"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/UpdateAVoucherPool
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115 \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE' \
              --header 'content-type: application/json' \
              --data '{"name":"string","barcodeType":"NONE","description":"string","voucherPrefix":"0","poolLimit":0,"redeemedLimitPerClient":0,"startAt":"2019-08-24T14:15:22Z"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"name\":\"string\",\"barcodeType\":\"NONE\",\"description\":\"string\",\"voucherPrefix\":\"0\",\"poolLimit\":0,\"redeemedLimitPerClient\":0,\"startAt\":\"2019-08-24T14:15:22Z\"}"

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("PUT", "/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "name": "string",
              "barcodeType": "NONE",
              "description": "string",
              "voucherPrefix": "0",
              "poolLimit": 0,
              "redeemedLimitPerClient": 0,
              "startAt": "2019-08-24T14:15:22Z"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("PUT", "https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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',
              barcodeType: 'NONE',
              description: 'string',
              voucherPrefix: '0',
              poolLimit: 0,
              redeemedLimitPerClient: 0,
              startAt: '2019-08-24T14:15:22Z'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"name":"string","barcodeType":"NONE","description":"string","voucherPrefix":"0","poolLimit":0,"redeemedLimitPerClient":0,"startAt":"2019-08-24T14:15:22Z"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.put("https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\",\"barcodeType\":\"NONE\",\"description\":\"string\",\"voucherPrefix\":\"0\",\"poolLimit\":0,\"redeemedLimitPerClient\":0,\"startAt\":\"2019-08-24T14:15:22Z\"}")
              .asString();
    delete:
      tags:
        - Vouchers
      summary: Delete a voucher pool
      description: |
        Delete an existing pool of vouchers.

        ---

        **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:** `VOUCHERS_POOL_DELETE`

        **User role permission required:** `assets_code_pool: delete`
      operationId: DeleteAVoucherPool
      parameters:
        - $ref: "#/components/parameters/vouchers-pathPoolUuid"
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      responses:
        "200":
          description: Voucher pool deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    default: Delete object with success
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/DeleteAVoucherPool
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115 \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("DELETE", "/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115", 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/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "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": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              '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/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/vouchers/item/list/{poolUuid}:
    get:
      tags:
        - Vouchers
      summary: List vouchers from a pool
      description: |
        Retrieve vouchers from a single pool.

        ---

        **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:** `VOUCHERS_ITEM_LIST_BY_POOL_READ`

        **User role permission required:** `assets_code_pool: read`
      operationId: ListVouchersFromPool
      parameters:
        - $ref: "#/components/parameters/vouchers-pathPoolUuid"
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
        - $ref: "#/components/parameters/vouchers-queryLimit"
        - $ref: "#/components/parameters/vouchers-queryPage"
        - $ref: "#/components/parameters/vouchers-queryIncludeMeta"
      responses:
        "200":
          description: An array of vouchers in the pool
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-listVouchersSuccessRes"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/ListVouchersFromPool
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115?limit=100&page=4&includeMeta=false' \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115?limit=100&page=4&includeMeta=false", 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/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115?limit=100&page=4&includeMeta=false");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "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": "/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115?limit=100&page=4&includeMeta=false",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'limit' => '100',
              'page' => '4',
              'includeMeta' => 'false'
            ]);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              '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/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115?limit=100&page=4&includeMeta=false")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    delete:
      tags:
        - Vouchers
      summary: Delete vouchers by poolUuid
      description: |
        Delete vouchers assigned to pool.

        ---

        **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:** `VOUCHERS_ITEM_BY_POOL_DELETE`

        **User role permission required:** `assets_code_pool: delete`
      operationId: DeleteVouchersByPoolUuid
      parameters:
        - $ref: "#/components/parameters/vouchers-pathPoolUuid"
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      responses:
        "200":
          description: Vouchers deleted
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-voucherResponseMessage"
              example:
                message: Delete object with success
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/DeleteVouchersByPoolUuid
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115 \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("DELETE", "/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115", 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/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "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": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              '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/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/vouchers/item/count/{poolUuid}:
    post:
      tags:
        - Vouchers
      summary: Count vouchers
      description: |
        Count (re-calculate) vouchers in a pool, group the results by status.

        ---

        **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:** `VOUCHERS_ITEM_LIST_BY_POOL_READ`

        **User role permission required:** `assets_code_pool: read`
      operationId: getVouchersCount
      parameters:
        - $ref: "#/components/parameters/vouchers-pathPoolUuid"
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      responses:
        "200":
          description: Set of counters
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-getVouchersCountRes"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/getVouchersCount
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/vouchers/item/count/8465c240-d38e-42f8-af29-b9fa1ed05115 \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("POST", "/v4/vouchers/item/count/8465c240-d38e-42f8-af29-b9fa1ed05115", 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/v4/vouchers/item/count/8465c240-d38e-42f8-af29-b9fa1ed05115");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "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": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/vouchers/item/count/8465c240-d38e-42f8-af29-b9fa1ed05115",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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/v4/vouchers/item/count/8465c240-d38e-42f8-af29-b9fa1ed05115');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              '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/v4/vouchers/item/count/8465c240-d38e-42f8-af29-b9fa1ed05115")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
components:
  securitySchemes:
    JWT:
      type: http
      scheme: bearer
      description: |-
        JWT Bearer token. The header looks like this: `Bearer {JWT}`

        Remember to include the space between 'Bearer' and the token.

        Generate a token via the **Authorization** endpoints.
    TrackerKey:
      type: apiKey
      name: token
      in: query
      description: Authorization by tracker key sent as a query parameter. This is the same key as used in the website tracking code.
  parameters:
    activities-api-pathIdentifierType:
      in: path
      name: identifierType
      description: Profile identifier type
      required: true
      schema:
        type: string
        enum:
          - id
          - uuid
          - email
          - custom_identify
    activities-api-queryToken:
      in: query
      name: pageToken
      description: The token of the page to retrieve. You can check the tokens of the next/previous page in the response to this endpoint. If not provided, the first page is retrieved.
      required: false
      schema:
        type: string
    activities-api-queryActions:
      in: query
      name: actions
      required: false
      description: A comma-separated list of actions (or a single action) that will be included in the response
      schema:
        type: string
      example: page.visit
    activities-api-queryDateFrom:
      in: query
      name: dateFrom
      description: Lower value of the time range, as a Unix timestamp in milliseconds. Defaults to current time minus 2 hours.
      required: false
      schema:
        type: number
    activities-api-queryDateTo:
      in: query
      name: dateTo
      description: Upper limit of the time range to fetch, as a Unix timestamp in milliseconds. Defaults to current time.
      required: false
      schema:
        type: number
    activities-api-queryDateFromV2:
      in: query
      name: dateFrom
      description: Lower value of the time range, as a Unix timestamp in milliseconds.
      required: false
      schema:
        type: number
    activities-api-queryDateToV2:
      in: query
      name: dateTo
      description: Upper limit of the time range to fetch, as a Unix timestamp in milliseconds.
      required: false
      schema:
        type: number
    activities-api-queryFormat:
      in: query
      name: format
      description: The format of the retrieved data
      required: false
      schema:
        enum:
          - json
          - csv
        type: string
        default: json
    activities-api-queryLimit:
      in: query
      name: limit
      description: The maximum number of events to retrieve
      required: false
      schema:
        type: number
        minimum: 1
        maximum: 1000
    activities-api-queryRaw:
      in: query
      name: raw
      description: 'When `true`, the response returns raw data. If raw data is not available, processed data from event storage (like from `"raw": false`) is returned instead.'
      required: false
      schema:
        type: boolean
        default: false
    activities-api-querySortBy:
      in: query
      name: sortBy
      required: false
      description: Sorting order. `time:desc` (default) returns newest events first.
      schema:
        type: string
        default: time:desc
        enum:
          - time:desc
          - time:asc
    ai-stats-indexId:
      name: indexId
      in: path
      required: true
      description: ID of the index for which the stats are requested
      schema:
        type: string
        example: 4add1a1fa877c1651906bb22c9dfd37a1618852272
    ai-stats-query:
      name: query
      in: query
      required: false
      description: Query for which stats will be returned. If not provided, the results are returned for the most popular queries.
      schema:
        type: string
    ai-stats-dateFrom:
      name: dateFrom
      in: query
      required: false
      description: |
        Upper bound of the interval for which the statistics will be retrieved.  
        Must be provided with `to`, otherwise the filter is treated as unspecified.  
        If not specified, the interval is last 7 days.
      schema:
        type: string
        format: date
    ai-stats-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-dateTo:
      name: dateTo
      in: query
      required: false
      description: |
        Lower bound of the interval for which the statistics will be retrieved.
        If not specified, the interval is last 7 days.
      schema:
        type: string
        format: date
    ai-stats-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-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
    ai-stats-searchType:
      name: searchType
      in: query
      required: false
      description: Search type for which stats will be retrieved.
      schema:
        type: string
        default: all
        enum:
          - fullTextSearch
          - autocomplete
          - listing
          - visual
          - all
    ai-stats-queryFilter:
      name: queryFilter
      in: query
      required: false
      description: Queries for which stats will be retrieved.
      schema:
        type: string
        default: queries
        enum:
          - queries
          - queriesWithNoResults
          - queriesWithUsedSuggestions
    ai-stats-searchGroupBy:
      name: groupBy
      in: query
      required: false
      description: Attribute for which retrieved stats will be grouped.
      schema:
        type: string
        enum:
          - date
    ai-stats-searchSortBy:
      name: SortBy
      in: query
      required: false
      description: Field by which results should be sorted.
      schema:
        type: string
        default: count
        enum:
          - count
          - clicks
          - conversions
          - clickThroughRate
          - revenue
          - conversionRate
    ai-stats-searchOrdering:
      name: ordering
      in: query
      required: false
      description: Sort order direction.
      schema:
        type: string
        default: desc
        enum:
          - asc
          - desc
    ai-stats-filterName:
      name: filterName
      in: query
      required: false
      description: Name of the filterable attribute. If present top values of this filter are returned.
      schema:
        type: string
        example: brand
    ai-stats-withFilters:
      name: withFilters
      in: query
      required: false
      description: Switch to display search statistics with enabled filters or without filters.
      schema:
        type: string
        enum:
          - true
          - false
    ai-stats-indexIdArray:
      name: indexId
      in: query
      required: true
      description: List of indices ids for which the stats are requested.
      schema:
        type: array
        items:
          type: string
    ai-stats-campaignIdPath:
      name: campaignId
      in: path
      required: true
      description: ID of the recommendation campaign
      schema:
        type: string
        example: 50NCGoRK0VRb
    ai-stats-timeZone:
      name: timeZone
      in: query
      required: false
      description: Time zone identifier.
      schema:
        type: string
        default: UTC
      example: Europe/Warsaw
    analytics-aggregateIdAsPathParam:
      name: aggregateId
      in: path
      description: Aggregate ID
      required: true
      style: simple
      explode: false
      schema:
        type: string
        format: uuid
    analytics-pathNamespace:
      name: namespace
      in: path
      description: Namespace. Currently, only `profiles` is available.
      required: true
      style: simple
      explode: false
      schema:
        type: string
        enum:
          - profiles
    analytics-isMultiMetric:
      name: isMultiMetric
      in: query
      description: Filter reports by whether they have more than one metric.
      required: false
      style: form
      explode: true
      schema:
        type: boolean
    analytics-aggregateType:
      name: aggregateType
      in: query
      description: Filter by aggregate type
      required: false
      schema:
        type: string
        enum:
          - AGGREGATE
          - RUNNING_AGGREGATE
    analytics-directoryId:
      name: directoryId
      description: Unique ID of the directory to retrieve analyses from
      in: query
      required: false
      schema:
        type: string
        format: uuid
    analytics-histogramIdAsPathParam:
      name: histogramId
      in: path
      description: Histogram ID
      required: true
      style: simple
      explode: false
      schema:
        type: string
        format: uuid
    analytics-reportIdAsPathParam:
      name: reportId
      in: path
      description: Report ID
      required: true
      style: simple
      explode: false
      schema:
        type: string
        format: uuid
    analytics-funnelIdAsPathParam:
      name: funnelId
      in: path
      description: Funnel UUID
      required: true
      style: simple
      explode: false
      schema:
        type: string
        format: uuid
    analytics-trendIdAsPathParam:
      name: trendId
      in: path
      description: Trend UUID
      required: true
      style: simple
      explode: false
      schema:
        type: string
        format: uuid
    analytics-metricIdAsPathParam:
      name: metricId
      in: path
      description: Metric UUID
      required: true
      style: simple
      explode: false
      schema:
        type: string
        format: uuid
    analytics-limit:
      name: limit
      in: query
      description: Limit of items per page
      required: false
      style: form
      explode: true
      schema:
        type: integer
        format: int32
        default: 50
    analytics-segmentationIdAsPathParam:
      name: segmentationId
      in: path
      description: Segmentation UUID
      required: true
      style: simple
      explode: false
      schema:
        type: string
        format: uuid
    analytics-clientIdAsPathParameter:
      name: clientId
      in: path
      description: Client ID
      required: true
      style: simple
      explode: false
      schema:
        type: integer
        format: int64
    analytics-pathIdentifierType:
      name: identifierType
      in: path
      description: Profile identifier type
      required: true
      style: simple
      explode: false
      schema:
        type: string
        enum:
          - id
          - uuid
          - email
          - custom_identify
    analytics-page:
      name: page
      description: The number of the page to retrieve
      in: query
      required: false
      style: form
      explode: true
      schema:
        type: integer
        format: int32
        default: 1
        minimum: 1
    analytics-sortBy:
      name: sortBy
      description: |
        You can sort the results. The sorting direction is selected by adding `asc` or `desc`, for example `sortBy=name:desc`.
      in: query
      required: false
      style: form
      explode: true
      schema:
        type: string
        example: name:asc
        default: updatedAt:desc
        enum:
          - name:asc
          - name:desc
          - author:asc
          - author:desc
          - updatedAt:asc
          - updatedAt:desc
          - createdAt:asc
          - createdAt:desc
          - id:asc
          - id:desc
          - directoryId:asc
          - directoryId:desc
    analytics-expressionIdAsPathParam:
      name: expressionId
      in: path
      description: Expression ID
      required: true
      style: simple
      explode: false
      schema:
        type: string
        format: uuid
    analytics-ids:
      name: ids
      in: query
      description: Comma-separated list of IDs (in UUID format) to filter results through
      required: false
      style: form
      explode: false
      schema:
        type: string
    analytics-sankeyIdAsPathParam:
      name: sankeyId
      in: path
      description: Sankey UUID
      required: true
      style: simple
      explode: false
      schema:
        type: string
        format: uuid
    analytics-search:
      name: search
      description: A string to search for in analyses' titles
      in: query
      required: false
      schema:
        type: string
    analytics-shareType:
      name: shareType
      description: Type of sharing process
      in: query
      required: false
      schema:
        type: string
        enum:
          - CROSSWORKSPACE
          - INTERNAL
    api-service-pathIdentifierValue-apiv4:
      name: identifierValue
      in: path
      description: The value of the selected identifier. It must be URL-encoded.
      required: true
      schema:
        type: string
    api-service-pathTagId-apiv4:
      name: tagID
      in: path
      description: ID of the tag
      required: true
      schema:
        type: integer
        example: 645
    api-service-pathClientId-apiv4:
      name: clientId
      in: path
      description: The ID of the profile
      required: true
      schema:
        type: integer
        format: int64
        example: 434428563
    api-service-pathClientCustomId-apiv4:
      name: customId
      in: path
      description: The custom ID of the profile
      required: true
      schema:
        type: string
        example: customIdExample
    api-service-pathTargetCustomId-apiv4:
      name: targetCustomID
      in: path
      description: The custom ID of the profile to merge the `sourceCustomIDs` into
      required: true
      schema:
        type: string
        example: customIdExample
    api-service-pathClientCustomIds-apiv4:
      name: sourceCustomIDs
      in: path
      description: Comma-delimited string with custom IDs of the profiles to merge
      required: true
      schema:
        type: string
        example: customIdExample,customIdExample2,customIdExample3,customIdExample4,customIdExample5
    api-service-pathToClientId-apiv4:
      name: toClientId
      in: path
      description: The ID of the profile to merge the `fromClientIds` into
      required: true
      schema:
        type: integer
        format: int64
        example: 434428563
    api-service-pathFromClientIds-apiv4:
      name: fromClientIds
      in: path
      description: Comma-delimited string with client IDs of the profiles to merge
      required: true
      schema:
        type: string
        example: 434428563,33322211,232212342
    api-service-pathClientEmail-apiv4:
      name: clientEmail
      in: path
      description: |
        The profile's email address

        - Must match the pattern (ECMA flavor): `/^(([^<>()[\]\\.,;:\s@\\"]+(\.[^<>()[\]\\.,;:\s@\\"]+)*)|(\\".+\\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/`
        - The value can't include any characters that match the patternn (ECMA flavor): `/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\r\n\u2028\u2029\u00AD]|[\uFE00-\uFE0F]|[\u0000])/`
      required: true
      schema:
        type: string
        example: clientemail@synerise.com
    api-service-acceptHeader-apiv4:
      name: Accept
      in: header
      required: true
      style: simple
      explode: false
      schema:
        type: string
        enum:
          - application/json
    api-service-contentTypeHeader-apiv4:
      name: Content-Type
      in: header
      required: true
      style: simple
      explode: false
      schema:
        type: string
        enum:
          - application/json
    api-service-apiVersionHeader-apiv4:
      name: Api-Version
      in: header
      required: true
      style: simple
      explode: false
      schema:
        type: string
        enum:
          - "4.4"
    api-service-queryEventsLimit-apiv4:
      in: query
      name: limit
      description: The number of events to retrieve
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 500
    api-service-queryAction-apiv4:
      in: query
      name: action
      description: Filter events by action type. For example, to retrieve completed transactions, enter `transaction.charge`
      required: false
      schema:
        type: string
        example: transaction.charge
    api-service-queryDateTo-apiv4:
      in: query
      name: time[to]
      description: End of the time range to query. UTC time in ISO 8601 (for example, `2020-10-19T13:47:53Z`). If no value is provided, the current time applies.
      required: false
      schema:
        type: string
        format: date-time
    api-service-queryDateFrom-apiv4:
      in: query
      name: time[from]
      description: Start of the time range to query. UTC time in ISO 8601 (for example, `2020-10-19T13:47:53Z`). If no value is provided, the results are returned starting with the oldest entry in the database.
      required: false
      schema:
        type: string
        format: date-time
    automation-brain-diagramId:
      name: diagramId
      in: path
      description: UUID of the workflow/diagram.
      required: true
      schema:
        type: string
    automation-brain-limit:
      name: limit
      in: query
      description: Selected page
      schema:
        type: number
        default: 10
    automation-brain-limit50:
      name: limit
      in: query
      description: Selected page
      schema:
        type: number
        default: 50
    automation-brain-page:
      name: page
      in: query
      description: The selected page
      schema:
        type: number
        default: 1
        minimum: 1
    automation-brain-filterByStatus:
      name: status
      in: query
      description: Filter workflows by status
      schema:
        type: string
        enum:
          - All
          - Recent
          - Draft
          - Pending
          - Active
          - Paused
          - Stopped
          - Inactive
          - Scheduled
          - NoSchedule
          - ScheduleOn
          - ScheduleOff
        default: All
    automation-brain-sortDiagrams:
      name: sort
      in: query
      description: Sort workflows by a property value
      schema:
        type: string
        enum:
          - Author
          - Name
          - CreatedTime
          - UpdatedTime
          - Status
        default: UpdatedTime
    automation-brain-sortByDiagrams:
      name: sortBy
      in: query
      description: Sort workflows clause
      example: createdTime:desc
      schema:
        type: string
    automation-brain-sortingOrder:
      name: order
      in: query
      description: Sorting order
      schema:
        type: string
        enum:
          - Asc
          - Desc
        default: Desc
    automation-brain-search:
      name: search
      in: query
      description: A string to search for in workflow names and email addresses of authors. Workflows that don't match the search aren't returned at all.
      schema:
        type: string
    automation-brain-directoryId:
      name: directoryId
      in: query
      description: UUID of the directory
      schema:
        type: string
        format: uuid
    automation-brain-tagIds:
      name: tags
      in: query
      required: false
      schema:
        type: string
        description: List of comma separated tags
    boxes-v2-NameFilter:
      name: name
      in: query
      description: Searches for a given string in schema names. The search is **not** case-sensitive.
      required: false
      schema:
        type: string
    boxes-v2-PaginationLimit:
      name: limit
      in: query
      description: Number of entries per page
      required: true
      schema:
        type: number
    boxes-v2-PaginationPage:
      name: page
      in: query
      description: Selected page. The first page has the index `1`.
      required: true
      schema:
        type: number
    boxes-v2-SchemaId:
      name: schemaId
      in: path
      description: UUID of the schema
      required: true
      schema:
        type: string
    boxes-v2-RecordId:
      name: recordId
      in: path
      description: UUID of the record
      required: true
      schema:
        type: string
        format: uuid
    brickworks-service-queryLimit:
      name: limit
      in: query
      required: false
      description: Limit of items per page
      schema:
        type: integer
        format: int32
        default: 50
    brickworks-service-queryPage:
      name: page
      in: query
      required: false
      description: The number of the page to retrieve
      schema:
        type: integer
        format: int32
        minimum: 1
        default: 1
    brickworks-service-queryFields:
      name: fields
      in: query
      required: false
      description: A comma-separated list of fields to retrieve. If not defined, all fields are included in the response.
      schema:
        type: array
        items:
          type: string
    brickworks-service-pathIdentifierType:
      name: IdentifierType
      in: path
      required: true
      description: Profile identifier type
      schema:
        type: string
        enum:
          - id
          - uuid
          - email
          - custom_identify
    brickworks-service-pathExternalDataSourceId:
      name: ExternalDataSourceId
      in: path
      required: true
      description: External source ID
      schema:
        type: string
        format: uuid
    brickworks-service-queryRecordFilters:
      name: filters
      in: query
      required: false
      schema:
        type: string
        description: |
          An RSQL query to filter the results.  
          You can use these fields:
          - fields configured as searchable
          - `__id`
          - `__schemaId`
          - `__name`
          - `__slug`
          - `__status`
          - `__updatedAt`
          - `__createdAt`
          - `__publishedAt`
          - `__recordVersion`
    brickworks-service-querySearch:
      name: search
      in: query
      required: false
      description: |
        A string to search for in:
        - `id`
        - `appId`
        - `displayName`
        - `description`
      schema:
        type: string
    brickworks-service-querySearchRecords:
      name: search
      in: query
      required: false
      description: |
        A string to search for in the values of searchable fields.  
        If `filter` is used, this parameter is ignored.
      schema:
        type: string
    brickworks-service-querySortBy:
      name: sortBy
      description: |
        You can change the default sorting. The sorting direction is selected by adding `asc` or `desc`, for example `sortBy=createdAt:desc`.

        You can sort by:
          - `appId` 
          - `displayName`
          - `createdAt`
          - `updatedAt`
      in: query
      required: false
      style: form
      explode: true
      schema:
        type: string
        example: updatedAt:asc
        default: updatedAt:desc
    brickworks-service-querySortByRecords:
      name: sortBy
      description: |
        You can change the default sorting. The sorting direction is selected by adding `asc` or `desc`, for example `sortBy=__createdAt:desc`.

        System parameters are prefixed with `__` to avoid name collisions with fields you add to the schema.  

        You can sort by:
          - `__id`
          - `__createdAt`
          - `__updatedAt`
      in: query
      required: false
      style: form
      explode: true
      schema:
        type: string
        example: __updatedAt:asc
        default: __updatedAt:desc
    brickworks-service-methodQueryParam:
      name: method
      description: |
        You can filter the results by source http method.
      in: query
      required: false
      style: form
      explode: true
      schema:
        type: string
        enum:
          - get
          - post
    brickworks-service-queryIds:
      name: ids
      in: query
      description: Comma-separated list of IDs (in UUID format) to filter results through
      required: false
      style: form
      explode: false
      schema:
        type: string
    brickworks-service-pathRecordVersionIdentifier:
      name: RecordVersionIdentifier
      in: path
      required: true
      description: Record version identifier - can be a UUID (RecordVersionId) or a version number (integer)
      schema:
        oneOf:
          - type: string
            format: uuid
            title: Record version UUID
          - type: integer
            format: int32
            minimum: 1
            title: Record version Number
      examples:
        uuid:
          value: 6da06fc3-046b-4546-8247-2ad7be652e78
          summary: Record Version UUID
        versionNumber:
          value: 1
          summary: Record version number
    brickworks-service-queryStatuses:
      name: statuses
      in: query
      description: Comma-separated list of record statuses to filter the results.
      required: false
      style: form
      explode: false
      schema:
        type: string
        enum:
          - PUBLISHED
          - DRAFT
          - UNPUBLISHED
          - SCHEDULED
    brickworks-service-querySchemaTypes:
      name: schemaTypes
      in: query
      description: Comma-separated list of schema types to filter the results. By default, all types are retrieved.
      required: false
      style: form
      explode: false
      schema:
        type: string
        enum:
          - SIMPLE
          - VERSIONED
    brickworks-service-pathRecordIdentifier:
      name: RecordIdentifier
      in: path
      required: true
      description: Record identifier - can be a UUID (RecordId) or a human-readable slug (RecordSlug, 6-40 characters)
      schema:
        oneOf:
          - type: string
            format: uuid
            title: Record UUID
          - type: string
            minLength: 6
            maxLength: 40
            pattern: ^(?!__)(?![0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)[\w\-]+$
            title: Record slug
      examples:
        uuid:
          value: f6ce33ee-bdf2-4a23-87be-07de936ceeab
          summary: Record UUID
        slug:
          value: my-record-slug
          summary: Record slug
    brickworks-service-pathSchemaIdentifier:
      name: SchemaIdentifier
      in: path
      required: true
      description: Schema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters)
      schema:
        oneOf:
          - type: string
            format: uuid
            title: Schema UUID
          - type: string
            minLength: 3
            maxLength: 25
            pattern: ^(?!__)(?![0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)[\w\-]+$
            title: Schema AppId
      examples:
        uuid:
          value: 550e8400-e29b-41d4-a716-446655440000
          summary: Schema UUID
        appId:
          value: my-schema-app-id
          summary: Schema AppId (API name)
    brickworks-service-querySlugs:
      name: slugs
      in: query
      description: Comma-separated list of slugs to filter results through
      required: false
      style: form
      explode: false
      schema:
        type: string
    business-profile-service-listPage:
      name: page
      description: Page to retrieve
      in: query
      required: false
      schema:
        type: integer
        format: int32
        default: 1
    business-profile-service-listLimit:
      name: limit
      description: Limit of items per page
      in: query
      required: false
      schema:
        type: integer
        format: int32
        default: 20
    business-profile-service-listSearch:
      name: search
      description: String to search for
      in: query
      required: false
      schema:
        type: string
        default: ""
    catalogs-itemDatabaseId:
      in: path
      name: itemId
      description: |
        ID of the item. This is the ID of the entry in the Synerise
        database, not the unique identifier that you're using in your
        catalog. The itemId is available in the `id` field of the catalog item when you [retrieve items from a catalog](#operation/getItemsByBag):

        ```
        {
            "creationDate": "2020-09-30T11:31:16.314Z",
            "id": 73753, // this is the itemId
            "itemKey": "uniqueValue",
            "lastModified": null,
            "value": "{\"exampleKey\":\"uniqueValue\",\"exampleKey2\":\"exampleValue\"}",
            "bag": {
                "author": "authorName",
                "creationDate": "2020-09-30T10:52:31.264Z",
                "id": 1053, // this is the ID of the catalog
                "lastModified": "2020-09-30T11:41:11.808Z",
                "name": "sampleCatalog"
            }
        },
        ```
      required: true
      schema:
        type: integer
    catalogs-queryLimit:
      in: query
      name: limit
      description: "The maximum number of items to include in the response. `offset` must be defined. Default: 100"
      required: false
      schema:
        type: integer
    catalogs-queryOffset:
      in: query
      name: offset
      description: The offset for the search. For example, if your `limit` is 10 and you want to retrieve the third page of items, set the offset to 20. Items with indexes 20 to 29 are returned (the first item on the first page has the index 0).
      required: false
      schema:
        type: integer
    catalogs-queryCatalogSearchBy:
      in: query
      name: searchBy
      description: A search string. You can search the catalogs by their name or the first or last name of the author.
      required: false
      schema:
        type: string
    catalogs-queryCatalogOrderBy:
      in: query
      name: orderBy
      description: The parameter to order the results by. Order is always ascending.
      required: false
      schema:
        type: string
        enum:
          - id
          - author
          - lastModified
          - creationDate
    catalogs-pathCatalogId:
      in: path
      name: catalogId
      description: ID of the catalog
      required: true
      schema:
        type: integer
    catalogs-queryItemKey:
      in: query
      name: itemKey
      description: Filter by the value of the unique identifier of the item (exact match)
      required: false
      schema:
        type: string
    catalogs-queryDelimiter:
      in: query
      name: delimiter
      description: "The delimiter to use in csv. You can use `;` or `,`. Default: `,`"
      required: false
      schema:
        type: string
    crm-pathClientId:
      name: clientId
      in: path
      description: Profile ID
      required: true
      schema:
        type: integer
    items-filter-all-itemsCatalogId:
      name: itemsCatalogId
      in: query
      required: false
      description: |
        ID of the item catalog that contains the items tested in the request. If not provided, "default" is assumed - however, the "default" catalog may not exist in your workspace.

        **NOTE:** This ID is available in the details the search index or recommendation campaign you want to make test requests for.
      schema:
        type: string
        default: default
    items-filter-all-exampleItems:
      name: exampleItems
      in: query
      required: false
      description: Controls how many example items will be returned
      schema:
        type: integer
        default: 10
    items-search-paginationSortBy:
      name: sortBy
      in: query
      required: false
      description: |
        <span style='color:red'><strong>IMPORTANT:</strong></span> Sorting disables boosting, elastic filters, and promoting search results.

        Name of the attribute by which the data will be sorted.      
      schema:
        type: string
    items-search-paginationOrdering:
      name: ordering
      in: query
      required: false
      description: Sorting order
      schema:
        type: string
        default: asc
        enum:
          - desc
          - asc
    items-search-paginationPage:
      name: page
      in: query
      description: Page number to return for pagination. The first page has the index `1`.
      required: false
      schema:
        type: integer
        format: int32
        example: 4
        default: 1
    items-search-filterableAttributes:
      name: attribute
      in: query
      description: List of attributes for which values will be fetched
      required: true
      explode: true
      schema:
        type: array
        items:
          type: string
    items-search-paginationLimit:
      name: limit
      in: query
      description: The number of items to return per page
      required: false
      schema:
        type: integer
        format: int32
        example: 10
        default: 20
        minimum: 0
        maximum: 500
    items-search-paginationIncludeMeta:
      name: includeMeta
      in: query
      required: false
      description: |
        
        When `true`, pagination metadata is included in the response body.

        When `false`, the data is included in the response headers:

        - Link: links to neighbors, first, and last pages in pagination.

        - X-Pagination-Total-Count: total number of items on all pages

        - X-Pagination-Total-Pages: total number of pages

        - X-Pagination-Page: current page

        - X-Pagination-Limit: maximum number of items on a page

        - X-Pagination-Sorted-By: parameter that the items were sorted by

        - X-Pagination-Ordering: sorting direction
      schema:
        type: boolean
        default: false
    items-search-searchQuery:
      name: query
      in: query
      required: true
      description: Query text to use in the search
      schema:
        type: string
    items-search-imageUrl:
      name: url
      in: query
      required: true
      description: URL of the image to be used in the visual search
      schema:
        type: string
    items-search-inPathIndexId:
      name: indexId
      in: path
      required: true
      description: ID of the index to be used in the search operation
      schema:
        type: string
    items-search-clientUUID:
      name: clientUUID
      in: query
      required: false
      description: UUID of the profile for which the search is performed
      schema:
        type: string
    items-search-itemId:
      name: itemId
      in: query
      required: true
      description: Item ID
      schema:
        type: string
    items-search-correlationId:
      name: correlationId
      in: query
      required: false
      description: |
        Correlation ID for pagination. If a search with the ID was performed recently (last 10 minutes), the cached results will be used.

        Do not send this if sortBy/filters/sorting order, etc. have changed - the cached results may have different order or may match different filters.
      schema:
        type: string
    items-search-searchId:
      name: searchId
      in: query
      required: false
      deprecated: true
      description: |
        **DEPRECATED - use correlationId instead**

        Search ID for pagination. If a search with the ID was performed recently (last 10 minutes), the cached results will be used.

        Do not send this if sortBy/filters/sorting order, etc. have changed - the cached results may have different order or may match different filters.
      schema:
        type: string
    items-search-sortByMetric:
      name: sortByMetric
      in: query
      required: false
      description: |
        <span style='color:red'><strong>IMPORTANT:</strong></span> Sorting disables boosting, elastic filters, and promoting search results.

        Name of the metric by which the data will be sorted.
      schema:
        type: string
        enum:
          - TransactionsPopularity
          - PageVisitsPopularity
    items-search-sortByGeoPoint:
      name: sortByGeoPoint
      in: query
      required: false
      description: |
        <span style='color:red'><strong>IMPORTANT:</strong></span> Sorting disables boosting, elastic filters, and promoting search results.

        Geo-point (`{latitude},{longitude}`) for data sorting. Results are sorted by distance from this point. `ordering: asc` means "closest first".'
      schema:
        type: string
        example: 34.052235,-118.243685
    items-search-filterGeoPoints:
      name: filterGeoPoints
      in: query
      required: false
      description: |
        The definition of a geographical area to filter by.

        Given one geo-point, the results will be limited to a radius around a point. To override the default radius (1000 meters), provide the `filterAroundRadius` parameter.
        **Example input:** `["34.052235,-118.243685"]`

        Given two geo-points, the results will be limited to a rectangular area.
        **Example input:** `["50,-100", "25,150"]`

        Given three or more geo-points, the results will be limited to a polygonal area.
        **Example input:** `["50,0", "40,20", "-20,10"]`
      schema:
        type: array
        example:
          - 34.052235,-118.243685
          - 15.0,65.0
        items:
          type: string
    items-search-filterAroundRadius:
      name: filterAroundRadius
      in: query
      required: false
      description: Radius in meters to be used when filtering using geo-location. Can only be used when filtering by a single geo-point.
      schema:
        type: integer
        format: int32
        example: 5000
        default: 1000
    items-search-filterAnchor:
      name: filterAnchor
      in: query
      required: false
      description: |
        Anchor (`{width},{height}`) by which the visual results data will be filtered.
        `{width},{height}` correspond to normalized image coordinates, i.e. they are in range [0,1].
        Anchor (0,0) corresponds to the top-left pixel of an image.
      schema:
        type: string
        example: 0.2,0.8
    items-search-filters:
      name: filters
      in: query
      required: false
      description: IQL query string. For details, see the [Help Center](https://help.synerise.com/developers/iql/).
      schema:
        type: string
    items-search-facets:
      name: facets
      in: query
      required: false
      description: |
        A list of attributes for which facets will be returned. A single `*` value matches all facetable attributes.
        A single `auto` value enables automatic facet selection based on the result set — the system picks the most relevant facets using the index's `dynamicFacets` configuration.

        To determine which groups of facets should be returned, use the `includeFacets` parameter.
      schema:
        type: array
        items:
          type: string
    items-search-context:
      name: context
      in: query
      required: false
      description: List of context strings for a search query
      example:
        - mobile
        - listing
      schema:
        type: array
        items:
          type: string
    items-search-displayAttributes:
      name: displayAttributes
      in: query
      required: false
      description: List of ad hoc attributes that will be returned for each found item
      example:
        - title
        - price
      schema:
        type: array
        items:
          type: string
    items-search-includeFacets:
      name: includeFacets
      in: query
      required: false
      description: |
        Determines which groups of facets will be returned: both filtered and unfiltered; just filtered; just unfiltered; or no group at at all.

        To determine which attributes should be returned as facets in each group, use the `facets` parameter.
      schema:
        type: string
        default: filtered
        enum:
          - all
          - filtered
          - unfiltered
          - none
    items-search-facetsSize:
      name: facetsSize
      in: query
      required: false
      description: |
        Determines how many items will be used for facets aggregation.
      schema:
        type: integer
        default: 2000
        minimum: 1
        maximum: 10000
    items-search-maxValuesPerFacet:
      name: maxValuesPerFacet
      in: query
      required: false
      description: |
        Determines how many values will be retrieved per facet.
      schema:
        type: integer
        default: 50
        minimum: 1
        maximum: 1000
    items-search-facetsOrderBy:
      name: facetsOrderBy
      in: query
      required: false
      description: |
        Controls the ordering of facets in the response.  
        When `facets=auto`, the default ordering is by coverage (most relevant facets first).  
        When facets are specified explicitly, the default ordering is by name.  
        When two facets have equal coverage, ties are resolved by name.
      schema:
        type: string
        enum:
          - coverage
          - name
    items-search-caseSensitiveFacetValues:
      name: caseSensitiveFacetValues
      in: query
      required: false
      description: |
        Specifies whether facets aggregation should be case sensitive.
      schema:
        type: boolean
        default: false
    items-search-distinctFilter:
      name: distinctFilter
      in: query
      required: false
      schema:
        type: string
        example: '{"attribute": "color", "maxNumItems": 3}'
      description: |
        DistinctFilter JSON as an URL-encoded string
    items-search-personalize:
      name: personalize
      in: query
      required: false
      description: |
        If set to `false`, the search result is not personalized.
      schema:
        type: boolean
        default: true
    items-search-ignoreQueryRules:
      name: ignoreQueryRules
      in: query
      required: false
      description: |
        If set to `true`, query rules are not applied.
      schema:
        type: boolean
        default: false
    items-search-excludeQueryRules:
      name: excludeQueryRules
      in: query
      required: false
      description: |
        List of query rules that will not be applied.
      example:
        - 2
        - 5
      schema:
        type: array
        items:
          type: integer
    items-search-disableQueryClassification:
      name: disableQueryClassification
      in: query
      required: false
      description: |
        If set to `true`, query classification is not applied.
      schema:
        type: boolean
        default: false
    items-search-disableDynamicReranker:
      name: disableDynamicReranker
      in: query
      required: false
      description: |
        If set to `true`, dynamic reranker is not applied.
      schema:
        type: boolean
        default: false
    items-search-crossWorkspaceModeEnabled:
      name: crossWorkspaceModeEnabled
      in: query
      required: false
      description: |
        If set, overrides the cross-workspace mode from the index configuration. When `true`, cross-workspace personalization is enabled. When `false`, it is disabled.
      schema:
        type: boolean
    items-search-params:
      name: params
      in: query
      required: false
      description: |
        List of extra params that will be added to the `item.search` event. They must be in the `name:value` format. The total size must not exceed 500 bytes when written as a JSON object.
      example:
        - source:mobile
      schema:
        type: array
        items:
          type: string
    items-search-config-paginationSortBy:
      name: sortBy
      in: query
      required: false
      description: Name of the attribute by which the data will be sorted
      schema:
        type: string
    items-search-config-paginationOrdering:
      name: ordering
      in: query
      required: false
      description: Sorting order
      schema:
        type: string
        default: desc
        enum:
          - desc
          - asc
    items-search-config-paginationPage:
      name: page
      in: query
      description: Page number to return for pagination. The first page has the index `1`.
      required: false
      schema:
        type: integer
        format: int32
        example: 4
        default: 1
    items-search-config-paginationLimit:
      name: limit
      in: query
      description: The number of items to return per page
      required: false
      schema:
        type: integer
        format: int32
        example: 100
        default: 1000
        maximum: 1000
    items-search-config-paginationIncludeMeta:
      name: includeMeta
      in: query
      required: false
      description: |
        
        When `true`, pagination metadata is included in the response body.

        When `false`, the data is included in the response headers:

        - Link: links to neighbors, first, and last pages in pagination.

        - X-Pagination-Total-Count: total number of items on all pages

        - X-Pagination-Total-Pages: total number of pages

        - X-Pagination-Page: current page

        - X-Pagination-Limit: maximum number of items on a page

        - X-Pagination-Sorted-By: parameter that the items were sorted by

        - X-Pagination-Ordering: sorting direction
      schema:
        type: boolean
        default: false
    items-search-config-inQueryDirectoryId:
      in: query
      name: directoryId
      required: false
      description: Requested directoryId of the rule.
      schema:
        type: string
        format: uuid
    items-search-config-inQueryType:
      in: query
      name: type
      required: false
      description: Requested type of the rule.
      schema:
        type: string
        enum:
          - Keyword
          - Hybrid
          - Semantic
    items-search-config-InPathIndexId:
      in: path
      name: indexId
      required: true
      description: ID of the index
      schema:
        type: string
    items-search-config-nameFilter:
      name: name
      in: query
      required: false
      deprecated: true
      description: |
        Deprecated parameter. If `query` is provided, this parameter is ignored.
        If an index has an `id` equal to the value of this parameter, only that index will be retrieved. Otherwise, all indices containing this value in their `name` will be retrieved.
      schema:
        type: string
    items-search-config-queryFilter:
      name: query
      in: query
      required: false
      description: If an index has an `id` equal to the value of this parameter, only that index will be retrieved. Otherwise, all indices containing this value in their `name` will be retrieved. This parameter replaces the deprecated `name` parameter.
      schema:
        type: string
    items-search-config-excludeAbTests:
      name: excludeAbTests
      in: query
      required: false
      description: Only indices not involved in currently running AB tests will be retrieved.
      schema:
        type: boolean
    items-search-recent-indexId:
      name: indexId
      in: path
      required: true
      description: ID of the index that the query relates to
      schema:
        type: string
        example: 4add1a1fa877c1651906bb22c9dfd37a1618852272
    items-search-recent-clientUUID:
      name: clientUUID
      in: query
      required: true
      description: UUID of the profile for which the query is performed
      schema:
        type: string
        example: e0097757-d1e2-44ac-ba3c-d97979a354c1
    items-search-recent-windowSize:
      name: windowSize
      in: query
      required: false
      description: Maximum number of recent searches to be returned. <br><strong>NOTE:</strong><br> The provided query parameter has priority over the configuration provided in [this endpoint](#operation/postIndexConfigV2). If the parameter is not provided, the default value does **not** override the configuration.
      schema:
        type: integer
        minimum: 1
        default: 15
    items-search-recent-timeUnit:
      name: timeUnit
      in: query
      required: false
      description: The time unit. Used in conjunction with `timeValue`.<br><strong>NOTE:</strong><br> The provided query parameter has priority over the configuration provided in [this endpoint](#operation/postIndexConfigV2). If the parameter is not provided, the default value does **not** override the configuration.
      schema:
        type: string
        default: DAYS
        enum:
          - YEARS
          - MONTHS
          - WEEKS
          - DAYS
          - HOURS
          - MINUTES
          - SECONDS
    items-search-recent-timeValue:
      name: timeValue
      in: query
      required: false
      description: The amount of time units. Used in conjunction with `timeUnit`.<br><strong>NOTE:</strong><br> The provided query parameter has priority over the configuration provided in [this endpoint](#operation/postIndexConfigV2). If the parameter is not provided, the default value does **not** override the configuration.
      schema:
        type: integer
        minimum: 1
        default: 30
    morph-LogsLimitInQuery:
      name: limit
      in: query
      required: false
      schema:
        type: number
        default: 500
        maximum: 5000
      description: The maximum number of log lines in each stage
    notes-service-profileId:
      in: path
      name: clientId
      required: true
      description: Profile ID
      schema:
        type: integer
        format: int64
    optimizer-manager-InQuerySearch:
      in: query
      name: search
      required: false
      description: ID of the experiment or a part of its name.
      schema:
        type: string
    optimizer-manager-InQueryStatus:
      in: query
      name: status
      required: false
      description: "Requested status of the experiment. One of: NotStarted, Running, Paused, Finished, Draft. May pass more than one status."
      schema:
        type: array
        items:
          type: string
          enum:
            - NotStarted
            - Running
            - Paused
            - Finished
            - Draft
    optimizer-manager-InQueryCampaignType:
      in: query
      name: campaignType
      required: false
      description: CampaignType of the experiment
      schema:
        type: string
        enum:
          - ITEMS_SEARCH
          - RECOMMENDATION_CAMPAIGN
    optimizer-manager-InPathExperimentId:
      in: path
      required: true
      name: id
      description: ID of the experiment
      schema:
        type: integer
    promotions-pathHandbillUuid:
      name: handbillUuid
      in: path
      required: true
      description: UUID of the handbill configuration
      schema:
        type: string
        format: uuid
    promotions-pathIdentifierValue:
      name: identifierValue
      in: path
      description: The value of the selected identifier
      required: true
      schema:
        type: string
    promotions-pathPromoIdentifierType:
      name: identifierType
      in: path
      required: true
      description: The promotion identifier to use for the request
      schema:
        type: string
        enum:
          - uuid
          - code
    promotions-pathClientIdentifierType:
      name: identifierType
      in: path
      description: |
        The Profile identifier to use for the request.

        `externalId` is known as `customId` or `custom_identify` in other Synerise services.
      required: true
      schema:
        type: string
        example: email
        enum:
          - email
          - phone
          - externalId
          - uuid
          - clientId
    promotions-pathLockIdentifier:
      name: lockIdentifier
      in: path
      description: Lock identifier
      required: true
      schema:
        type: string
        example: 2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119
    promotions-queryLockTtlSec:
      in: query
      name: lockTtlSec
      description: Lock duration in seconds
      schema:
        type: number
        default: 900
    promotions-queryOrderFieldName:
      in: query
      name: orderFieldName
      description: Name of the parameter used for sorting
      schema:
        type: string
        enum:
          - createdAt
          - headerName
          - code
          - startAt
          - expireAt
          - name
          - type
        default: createdAt
    promotions-queryOrder:
      in: query
      name: order
      description: Sorting order
      schema:
        type: string
        enum:
          - asc
          - desc
        default: asc
    promotions-queryQuery:
      in: query
      name: query
      description: A string to search for in the `headerName` parameter or fragment of UUID.
      schema:
        type: string
    promotions-queryPromotionUuids:
      in: query
      name: promotionUuids
      description: Filters the response data by a list of promotion UUIDs.
      required: false
      schema:
        type: string
        example: fc1ee5bf-ad97-47a8-a474-e1b6e755ff38,aabaed4e-4ee7-44d5-b079-445a017ec6fe
      style: form
      explode: true
    promotions-queryHandbillSort:
      name: sort
      in: query
      required: false
      description: |
        The sorting order of the response.


        You can sort by any combination of the following attributes:

        * `createdAt`: time when the configuration was created

        * `updatedAt`: time when the configuration was last updated


        You can sort ascending (default) or descending by adding `asc` or `desc` after the parameter, separated by a comma."
      style: form
      explode: true
      allowReserved: true
      schema:
        type: string
        example: createdAt,desc
    promotions-queryPromotionSort:
      name: sort
      in: query
      required: false
      description: |
        The sorting order of the response.


          You can sort by any combination of the following attributes:
          * `headerName`: promotion header name
          * `name`: promotion name
          * `code`: promotion code
          * `startAt`: time when the promotion starts
          * `createdAt`: time when the promotion was created
          * `updatedAt`: time when the promotion was last updated
          * `expireAt`: time when the promotion expires
          * `requireRedeemedPoints`: how many loyalty points are needed to redeem the promotion
          * `type`: type of the promotion
          * `priority`: priority of the promotion
          * `status` : status of the promotion for the Profile

          Additionally, you can add the following attributes:
          * `ai` : enables ai sorting, should be only combined with `status` sorting (direction of sorting is not needed)

          You can sort ascending (default) or descending by adding `asc` or `desc` after the parameter, separated by a comma.

          **Example**: `sort=requireRedeemedPoints&sort=expireAt,asc&sort=status,desc`
      style: form
      explode: true
      allowReserved: true
      schema:
        type: string
        example: requireRedeemedPoints,desc
    promotions-queryTarget:
      name: target
      in: query
      required: false
      description: The target of the promotion
      style: form
      explode: false
      schema:
        type: array
        items:
          type: string
          enum:
            - ALL
            - SEGMENT
          default: ALL
    promotions-queryLimit:
      name: limit
      in: query
      description: The number of items to return per page
      required: false
      schema:
        type: integer
        example: 100
        default: 100
        maximum: 1000
    promotions-queryLockIdentifier:
      name: lockIdentifier
      in: query
      schema:
        type: string
        example: 6561d87b-2697-46ad-8f9a-0550736b86e3
      description: |-
        Identifier of the lock which will be created with this request. The lock disables the profile's possibility to fetch promotion lists.

        This lock will be active until one of those conditions is met:

        - the TTL (configured with the [settings](#operation/endpointSettingsUpdateSettingsPUT) endpoint) expires.
        - it is removed using the [Release "promotion requested" lock](#operation/endpointLockReleasePromotionRequestedLockForClientPOST) endpoint.
        - a promotion is redeemed and this lock's identifier is provided with the redemption request.
    promotions-queryPage:
      name: page
      in: query
      description: Page number to return for pagination. The first page has the index `1`.
      required: false
      schema:
        type: integer
        format: int32
        example: 4
        default: 1
    promotions-queryStoreCatalog:
      name: storeCatalog
      in: query
      description: Limits the response to data from stores included in a catalog.
      required: false
      schema:
        type: string
    promotions-queryStoreIds:
      name: storeIds
      in: query
      description: Limits the response to data from particular stores, identified by IDs.
      required: false
      schema:
        type: string
      style: form
      explode: false
    promotions-queryIncludeMeta:
      name: includeMeta
      in: query
      description: |
        
        When `true`, pagination metadata is included in the response body.

        When `false`, the data is included in the response headers:

        - Link: links to neighbors, first, and last pages in pagination.

        - X-Pagination-Total-Count: total number of items on all pages

        - X-Pagination-Total-Pages: total number of pages

        - X-Pagination-Page: current page

        - X-Pagination-Limit: maximum number of items on a page
      required: false
      schema:
        type: boolean
        example: false
        default: false
    promotions-queryIncludeVouchers:
      name: includeVouchers
      in: query
      schema:
        type: boolean
        example: false
        default: false
      description: |
        
        When `true`, promotion with defined vouchers will also have list of assigned vouchers.

        When `false`, vouchers will not be fetched.
    promotions-queryStatusByType:
      name: statusByType
      in: query
      description: A combination of status and type, for example `[CUSTOM]=ACTIVE`
      required: false
      style: form
      explode: true
      schema:
        type: string
        example: "[CUSTOM]=ACTIVE"
    promotions-queryTargetByType:
      name: targetByType
      in: query
      description: A combination of target and type, for example `[SEGMENT]=ACTIVE`
      required: false
      style: form
      explode: true
      schema:
        type: string
        example: "[SEGMENT]=ACTIVE"
    promotions-queryVisibilityStatus:
      name: visibilityStatus
      in: query
      description: Visibility status
      required: false
      style: form
      explode: true
      schema:
        type: array
        items:
          type: string
          enum:
            - DRAFT
            - PUBLISH
            - HIDDEN
    promotions-queryPromotionType:
      name: type
      in: query
      description: Promotion type
      required: false
      style: form
      explode: false
      schema:
        type: array
        items:
          type: string
          enum:
            - GENERAL
            - CUSTOM
            - MEMBERS_ONLY
            - HANDBILL
    promotions-queryReturnCodes:
      name: returnCodes
      in: query
      description: Return deactivated codes
      required: false
      style: form
      explode: false
      schema:
        type: boolean
        example: true
        default: false
    promotions-queryLockPoints:
      name: lockPoints
      in: query
      description: Lock profile points during the deactivation process
      required: false
      style: form
      explode: false
      schema:
        type: boolean
        example: true
        default: true
    promotions-queryPromotionStatus:
      name: status
      in: query
      description: Filter by promotion status
      required: false
      style: form
      explode: false
      schema:
        type: array
        items:
          type: string
          enum:
            - ACTIVE
            - ASSIGNED
            - REDEEMED
    promotions-queryLastingOnly:
      name: lastingOnly
      in: query
      description: When set to `true`, shows promotions/vouchers that are currently active and those that are still inactivated. (lastingAt set to null or lastingAt in future)
      required: false
      style: form
      explode: false
      schema:
        type: boolean
        example: true
        default: true
    promotions-queryHandbillUuid:
      name: handbillUuid
      in: query
      required: true
      style: form
      schema:
        type: array
        description: An array of handbill configuration UUIDs
        items:
          type: string
    promotions-queryPromotionPresentOnly:
      name: presentOnly
      in: query
      description: |
        When set to:
        - `true`, the response includes only promotions that are currently active (startAt later than now or null, expireAt later than now or null)
        - `false`, the response includes the above and also promotions that are expired or will become active in the future.
      required: false
      style: form
      explode: false
      schema:
        type: boolean
        example: true
        default: true
    promotions-queryPromotionDisplayableOnly:
      name: displayableOnly
      in: query
      description: When set to `true`, promotions which are not currently active are included in response, according to date range defined in promotion fields `displayFrom` and `displayTo`.
      required: false
      style: form
      explode: false
      schema:
        type: boolean
        example: true
        default: false
    promotions-queryTagNames:
      name: tagNames
      in: query
      description: Filter the response to promotions with a certain tag or tags
      required: false
      style: form
      explode: false
      schema:
        type: array
        items:
          type: string
    promotions-queryExcludeTag:
      name: excludeTags
      in: query
      description: Promotions with the tags included in this list will not be deactivated
      required: false
      style: form
      explode: false
      schema:
        type: array
        items:
          type: string
    promotions-queryCheckGlobalActivationLimits:
      name: checkGlobalActivationLimits
      in: query
      description: Flag to indicate if global limits should be checked
      required: false
      style: form
      explode: false
      schema:
        type: boolean
        example: true
        default: true
    promotions-queryPromotionFields:
      name: fields
      in: query
      description: Return only specified promotion fields. If `fields` is not specified, all fields are returned.
      required: false
      style: form
      explode: false
      schema:
        example: uuid,requireRedeemedPoints,requireRedeemedPoints,possibleRedeems,status,currentRedeemedQuantity,lastingAt
        type: array
        items:
          type: string
          enum:
            - uuid
            - code
            - status
            - type
            - redeemLimitPerClient
            - redeemQuantityPerActivation
            - currentRedeemedQuantity
            - currentRedeemLimit
            - activationCounter
            - possibleRedeems
            - details
            - discountType
            - discountValue
            - discountMode
            - discountModeDetails
            - requireRedeemedPoints
            - name
            - headline
            - description
            - images
            - startAt
            - expireAt
            - displayFrom
            - displayTo
            - assignedAt
            - lastingTime
            - lastingAt
            - catalogIndexItems
            - params
            - price
            - priority
            - maxBasketValue
            - minBasketValue
            - itemScope
            - tags
            - handbillUuid
    push-devices-service-pathIdentifierValue:
      name: identifierValue
      in: path
      description: The value of the selected identifier
      required: true
      schema:
        type: string
    push-devices-service-acceptHeader:
      name: Accept
      in: header
      required: true
      style: simple
      explode: false
      schema:
        type: string
        enum:
          - application/json
    push-devices-service-pathClientId:
      name: clientId
      description: Unique identifier of a profile
      in: path
      required: true
      schema:
        type: integer
        format: int64
    query-rules-v2-paginationSortBy:
      name: sortBy
      in: query
      required: false
      description: Name of the attribute by which the data will be sorted
      schema:
        type: string
    query-rules-v2-paginationOrdering:
      name: ordering
      in: query
      required: false
      description: Sorting order
      schema:
        type: string
        default: desc
        enum:
          - desc
          - asc
    query-rules-v2-paginationPage:
      name: page
      in: query
      description: Page number to return for pagination. The first page has the index `1`.
      required: false
      schema:
        type: integer
        format: int32
        example: 4
        default: 1
    query-rules-v2-paginationLimit:
      name: limit
      in: query
      description: The number of items to return per page
      required: false
      schema:
        type: integer
        format: int32
        example: 100
        default: 1000
        maximum: 1000
    query-rules-v2-paginationIncludeMeta:
      name: includeMeta
      in: query
      required: false
      description: |
        
        When `true`, pagination metadata is included in the response body.

        When `false`, the data is included in the response headers:

        - Link: links to neighbors, first, and last pages in pagination.

        - X-Pagination-Total-Count: total number of items on all pages

        - X-Pagination-Total-Pages: total number of pages

        - X-Pagination-Page: current page

        - X-Pagination-Limit: maximum number of items on a page

        - X-Pagination-Sorted-By: parameter that the items were sorted by

        - X-Pagination-Ordering: sorting direction
      schema:
        type: boolean
        default: false
    query-rules-v2-inQueryDirectoryId:
      in: query
      name: directoryId
      required: false
      description: Requested directoryId of the rule.
      schema:
        type: string
        format: uuid
    query-rules-v2-InQuerySearch:
      in: query
      name: search
      required: false
      description: Requested part of the name or the id of the rule.
      schema:
        type: string
    query-rules-v2-inPathIndexId:
      in: path
      name: indexId
      required: true
      description: ID of the index
      schema:
        type: string
    query-rules-v2-inPathRuleId:
      in: path
      name: ruleId
      required: true
      description: Rule identifier
      schema:
        type: integer
    query-rules-v2-statusFilter:
      name: status
      in: query
      required: false
      description: Only rules with this status will be retrieved.
      schema:
        type: string
        enum:
          - finished
          - draft
          - paused
          - scheduled
          - active
    query-rules-v2-nameFilter:
      name: name
      in: query
      required: false
      description: Only rules containing this name will be retrieved.
      schema:
        type: string
    query-rules-v2-consequenceTypeFilter:
      name: consequenceType
      in: query
      required: false
      description: Only rules producing at least one of the given consequence types will be retrieved. May be repeated.
      style: form
      explode: true
      schema:
        type: array
        items:
          type: string
          enum:
            - hide
            - promote
            - standardFilter
            - elasticFilter
            - boost
            - topHits
            - sortBy
            - customData
            - returnNoData
            - distinctFilter
            - pinFacet
            - hideFacet
            - replaceWord
            - removeWord
            - replaceQuery
    recommendation-campaigns-campaignId:
      name: campaignId
      in: path
      description: ID of the campaign
      required: true
      schema:
        type: string
    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-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-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-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-config-InPathItemFeedId:
      in: path
      name: itemFeedId
      required: true
      description: ID of an item feed
      schema:
        type: string
    recommendations-config-InQueryCatalogType:
      in: query
      name: catalogType
      required: true
      description: Catalog type
      schema:
        type: string
        enum:
          - items
          - metadata
          - inventory
    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-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-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-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-pathAggregateUuid:
      name: aggregateUUID
      in: path
      description: Information will be shown for the provided aggregate 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-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-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-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-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-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-recommendationsIncludeContextItems:
      name: includeContextItems
      in: query
      required: false
      description: The recommendation results will include context items from the request.
      schema:
        type: boolean
    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-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-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-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
    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-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-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-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-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
    sauth-pathClientId:
      name: clientID
      in: path
      description: The ID of the Profile
      required: true
      schema:
        type: string
        example: "434428563"
    schema-service-pathFeedId:
      name: feedId
      in: path
      required: true
      description: UUID of a screen view feed
      schema:
        type: string
        format: uuid
    schema-service-pathDirectoryId:
      name: directoryId
      in: path
      required: true
      description: UUID of the directory
      schema:
        type: string
        format: uuid
    schema-service-pathGroupId:
      name: groupId
      in: path
      required: true
      schema:
        type: string
        format: uuid
    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-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-querySchema:
      name: schema
      in: query
      description: Name of the document schema (type) for filtering the results
      required: false
      schema:
        type: string
    schema-service-queryGroupId:
      name: groupId
      in: query
      required: false
      description: UUID of the document group for filtering the results
      schema:
        type: string
        format: uuid
        description: UUID of the document schema 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-queryPage:
      name: page
      in: query
      required: false
      schema:
        type: number
        format: int32
        minimum: 1
        default: 1
    schema-service-queryLimit:
      name: limit
      in: query
      required: false
      description: Limit of items per page
      schema:
        type: number
        format: int32
        default: 25
    schema-service-querySearch:
      name: search
      in: query
      required: false
      description: A string to search for in resource names
      schema:
        type: string
    schema-service-pathFeedSlug:
      in: path
      name: feedSlug
      description: Slug of the screen view feed
      required: true
      schema:
        type: string
    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-pathDocumentSlugLegacy:
      in: path
      name: slug
      description: Document slug
      required: true
      schema:
        type: string
    schema-service-pathDocumentUuidLegacy:
      in: path
      name: uuid
      description: Document UUID. The UUID is the same for all versions of a document.
      required: true
      schema:
        type: string
        format: uuid
    schema-service-pathDocumentIdLegacy:
      in: path
      name: id
      description: Document ID. Each version of a document has a unique ID.
      required: true
      schema:
        type: integer
    schema-service-PathDocumentSlug:
      name: slug
      in: path
      required: true
      description: Slug of the document
      schema:
        type: string
        pattern: "[a-z0-9]+(?:-[a-z0-9]+)*"
    schema-service-PathDocumentUuid:
      name: documentId
      in: path
      required: true
      description: UUID of the document
      schema:
        type: string
        format: uuid
    schema-service-PathDocumentIdentifier:
      name: documentIdentifier
      in: path
      required: true
      description: UUID or slug of the document
      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-pathScreenViewVersion:
      name: screenViewVersion
      in: path
      required: true
      description: Version of the screen view
      schema:
        type: string
    schema-service-QueryLimitRequired:
      in: query
      name: limit
      description: The maximum number of items to retrieve for pagination
      required: true
      schema:
        type: string
    schema-service-QueryPageRequired:
      in: query
      name: page
      description: The number of the page to retrieve
      required: true
      schema:
        type: integer
    synonyms-crud-paginationSortBy:
      name: sortBy
      in: query
      required: false
      description: "Name of the attribute by which the data will be sorted and ordered by. Supported values: `indexId`, `updatedAt`, `createdAt`, `confidence`. Defaults to `updatedAt`."
      schema:
        type: string
        example:
          - confidence:asc
    synonyms-crud-paginationOrdering:
      name: ordering
      in: query
      required: false
      description: Sorting order
      schema:
        type: string
        default: desc
        enum:
          - desc
          - asc
    synonyms-crud-paginationPage:
      name: page
      in: query
      description: Page number to return for pagination. The first page has the index `1`.
      required: false
      schema:
        type: integer
        format: int32
        example: 4
        default: 1
    synonyms-crud-paginationLimit:
      name: limit
      in: query
      description: The number of items to return per page
      required: false
      schema:
        type: integer
        format: int32
        example: 100
        default: 1000
        maximum: 1000
    synonyms-crud-paginationIncludeMeta:
      name: includeMeta
      in: query
      required: false
      description: |
        
        When `true`, pagination metadata is included in the response body.

        When `false`, the data is included in the response headers:

        - Link: links to neighbors, first, and last pages in pagination.

        - X-Pagination-Total-Count: total number of items on all pages

        - X-Pagination-Total-Pages: total number of pages

        - X-Pagination-Page: current page

        - X-Pagination-Limit: maximum number of items on a page

        - X-Pagination-Sorted-By: parameter that the items were sorted by

        - X-Pagination-Ordering: sorting direction
      schema:
        type: boolean
        default: false
    synonyms-crud-source:
      name: source
      in: query
      required: false
      description: Filter synonyms by source
      schema:
        type: string
        description: Origin of the synonym
        enum:
          - User
          - Agent
          - Import
        default: User
    synonyms-crud-sourceForImport:
      name: source
      in: query
      required: false
      description: Source to assign to imported synonyms
      schema:
        allOf:
          - $ref: "#/components/schemas/synonyms-crud-SynonymSource"
          - default: Import
    synonyms-crud-state:
      name: state
      in: query
      required: false
      description: Filter synonyms by state
      schema:
        type: string
        description: Current state of the synonym
        enum:
          - New
          - Accepted
          - Pending
          - Rejected
        default: Accepted
    synonyms-crud-search:
      name: search
      in: query
      required: false
      description: Search synonyms by word or synonym phrase (case-insensitive partial match)
      schema:
        type: string
    synonyms-crud-synonymType:
      name: type
      in: query
      required: false
      description: Filter synonyms by type
      schema:
        type: string
        description: |
          Type of the synonym.

            - `oneway`: when the word is searched, the results show the results as if the synonyms were searched. Searching for the synonyms does NOT return results for the word or the other synonyms.
            - `synonyms`: the `word` column is empty, all phrases in `synonym` return results for every other phrase in the list.
        enum:
          - oneway
          - synonyms
        default: oneway
    synonyms-crud-confidence:
      name: confidence
      in: query
      required: false
      description: Filter synonyms with confidence greater than or equal to this value
      schema:
        type: number
        format: float
        minimum: 0
        maximum: 1
    synonyms-crud-inPathSynonymId:
      in: path
      name: synonymId
      required: true
      description: Synonym identifier
      schema:
        type: integer
    synonyms-crud-inPathIndexId:
      in: path
      name: indexId
      required: true
      description: Index identifier
      schema:
        type: string
        format: uuid
    tags-collector-DirectoryHash-collector:
      in: path
      name: directoryHash
      description: Hash ID of the directory
      required: true
      schema:
        type: string
    tags-collector-TagHash-collector:
      in: path
      name: tagHash
      description: HashID of a tag
      required: true
      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
    template-backend-previewUuid:
      in: path
      name: previewUuid
      schema:
        type: string
        format: uuid
        example: e0326a2d-7697-4ae9-b490-31f97041adcb
      description: Preview UUID
      required: true
    uauth-PaginationPage:
      name: page
      in: query
      description: The page of results to retrieve. The first page has the index `0`.
      required: true
      schema:
        type: integer
        format: int32
    uauth-PaginationSize:
      name: size
      in: query
      description: The number of entries on a page
      required: true
      schema:
        type: integer
        format: int32
    uauth-InvitationIds:
      name: invitationIds
      in: path
      description: Comma-separated list of invitation IDs. To obtain the invitation ID, check the [list of users with PENDING status](#/operation/UsersListingUsingGET). The invitation ID for a user is the same as the ID of that user.
      required: true
      schema:
        type: string
    uauth-roleId:
      name: roleId
      in: path
      description: Role ID
      required: true
      schema:
        type: integer
        format: int64
    uauth-roleGroupId:
      name: groupId
      in: path
      description: Role group ID
      required: true
      schema:
        type: integer
        format: int64
    uauth-businessProfileId:
      name: businessProfileUUID
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: UUID of the workspace
    uauth-mfaType:
      name: mfaType
      in: query
      description: Type of multi-factor authentication
      required: true
      schema:
        type: string
        enum:
          - TOTP_AUTHENTICATOR
          - EMAIL
    uauth-UserId:
      name: userId
      in: path
      required: true
      description: User ID
      schema:
        type: integer
    uauth-UserIds:
      name: ids
      in: path
      description: Comma-separated user IDs
      required: true
      schema:
        type: string
        example: 11405,11406,11407
    uploader-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
    vouchers-acceptHeader:
      name: Accept
      in: header
      required: true
      style: simple
      explode: false
      schema:
        type: string
        enum:
          - application/json
    vouchers-contentTypeHeader:
      name: Content-Type
      in: header
      required: true
      style: simple
      explode: false
      schema:
        type: string
        enum:
          - application/json
    vouchers-apiVersionHeader:
      name: Api-Version
      in: header
      required: true
      style: simple
      explode: false
      schema:
        type: string
        enum:
          - "4.4"
          - "4.2"
    vouchers-queryLimit:
      name: limit
      in: query
      description: The number of items to return per page
      required: false
      schema:
        type: integer
        format: int32
        example: 100
        default: 100
        maximum: 1000
    vouchers-queryPage:
      name: page
      in: query
      description: Page number to return for pagination. The first page has the index `1`.
      required: false
      schema:
        type: integer
        format: int32
        example: 4
        default: 1
    vouchers-queryIncludeMeta:
      name: includeMeta
      in: query
      description: |
        
        When `true`, pagination metadata is included in the response body.

        When `false`, the data is included in the response headers:

        - Link: links to neighbors, first, and last pages in pagination.

        - X-Pagination-Total-Count: total number of items on all pages

        - X-Pagination-Total-Pages: total number of pages

        - X-Pagination-Page: current page

        - X-Pagination-Limit: maximum number of items on a page
      required: false
      schema:
        type: boolean
        example: false
        default: false
    vouchers-querySortFieldName:
      name: orderFieldName
      in: query
      description: Name of the parameter used for sorting. If you include this parameter, you **must** also send the `order` parameter.
      required: false
      schema:
        type: string
        enum:
          - name
          - poolLimit
          - startAt
          - expireIn
          - createdAt
        default: createdAt
    vouchers-querySortingOrder:
      name: order
      in: query
      description: Sorting order. If you include this parameter, you **must** also send the `orderFieldName` parameter.
      required: false
      schema:
        type: string
        enum:
          - asc
          - desc
        default: asc
    vouchers-queryFilter:
      name: query
      in: query
      description: Filter by phrase in pool name.
      required: false
      schema:
        type: string
    vouchers-queryClientIdentifierName:
      name: clientIdentifierName
      in: query
      description: The Profile identifier to use for the request.
      required: true
      schema:
        type: string
        enum:
          - id
          - uuid
          - email
          - custom_identify
      example: custom_identify
    vouchers-queryClientIdentifierValue:
      name: clientIdentifierValue
      in: query
      description: The value of the selected profile identifier
      required: true
      schema:
        type: string
      example: custom_identify_123456
    vouchers-pathVoucherUuid:
      name: voucherUuid
      in: path
      description: UUID of the voucher
      required: true
      schema:
        type: string
        example: 29392878-d43f-402e-8297-f63d465cf173
    vouchers-pathVoucherSearchValue:
      name: searchValue
      in: path
      description: The value to search for
      required: true
      schema:
        type: string
        example: 29392878-d43f-402e-8297-f63d465cf173
    vouchers-pathVoucherSearchKey:
      name: searchKey
      in: path
      description: The key type to search by
      required: true
      schema:
        type: string
        example: code
        enum:
          - code
          - uuid
    vouchers-pathClientUuid:
      name: clientUuid
      in: path
      description: UUID of the Profile
      required: true
      schema:
        type: string
        example: e9e6840b-b9d4-4c7b-8191-9c4f9e751c76
    vouchers-pathPoolUuid:
      name: poolUuid
      in: path
      description: UUID of the voucher pool
      required: true
      style: simple
      explode: false
      schema:
        type: string
        example: 8465c240-d38e-42f8-af29-b9fa1ed05115
  schemas:
    activities-api-action:
      type: object
      title: Action
      description: Details of the action.
      properties:
        name:
          $ref: "#/components/schemas/activities-api-actionName"
        label:
          type: string
          description: Human-readable label of the event. Used in Data Management, Analytics, and Automation modules. You can add this parameter to an event the Data Management module, but up to 48 hours may pass until it's returned here.
        description:
          type: string
          description: Description of the event. Used in Data Management, Analytics, and Automation modules. You can add this parameter to an event the Data Management module, but up to 48 hours may pass until it's returned here.
          nullable: true
    activities-api-actionName:
      type: string
      example: page.visit
      description: "Action name. Can be up to 32 characters long and must match the following regular expression: `^[a-zA-Z0-9\\.\\-_]+$`"
    activities-api-ActivityRaw1:
      type: object
      title: Raw data
      properties:
        action:
          $ref: "#/components/schemas/activities-api-actionName"
        eventUUID:
          $ref: "#/components/schemas/activities-api-EventUUID"
        unique:
          type: integer
          nullable: true
          description: Not available (null) with raw data
        label:
          type: string
          deprecated: true
          description: The label that was sent with the event.
        createDate:
          $ref: "#/components/schemas/activities-api-Timestamp"
        params:
          $ref: "#/components/schemas/activities-api-RawParams"
    activities-api-ActivityRaw2:
      type: object
      title: Raw data
      properties:
        action:
          $ref: "#/components/schemas/activities-api-actionName"
        eventUUID:
          $ref: "#/components/schemas/activities-api-EventUUID"
        unique:
          $ref: "#/components/schemas/activities-api-UniqueInt"
        label:
          type: string
          deprecated: true
        client:
          $ref: "#/components/schemas/activities-api-client"
        params:
          type: object
          description: Parameters of the event
          properties:
            ip:
              $ref: "#/components/schemas/activities-api-SourceIp"
            eventCreateTime:
              $ref: "#/components/schemas/activities-api-EventCreateTime"
          additionalProperties:
            description: Custom parameters that were sent with the event
        createDate:
          $ref: "#/components/schemas/activities-api-Timestamp"
    activities-api-ActivityTerrarium1:
      type: object
      title: Data from event storage
      properties:
        action:
          $ref: "#/components/schemas/activities-api-actionName"
        eventUUID:
          $ref: "#/components/schemas/activities-api-EventUUID"
        unique:
          $ref: "#/components/schemas/activities-api-UniqueInt"
        createDate:
          $ref: "#/components/schemas/activities-api-Timestamp"
        label:
          type: string
          deprecated: true
        params:
          type: object
          description: Parameters of the event
          properties:
            eventCreateTime:
              $ref: "#/components/schemas/activities-api-EventCreateTime"
            ip:
              $ref: "#/components/schemas/activities-api-SourceIp"
          additionalProperties:
            description: Additional parameters required by this event type and custom parameters.
    activities-api-ActivityTerrarium2:
      type: object
      title: Data from event storage
      properties:
        action:
          $ref: "#/components/schemas/activities-api-action"
        description:
          $ref: "#/components/schemas/activities-api-EventDescription"
        eventUUID:
          $ref: "#/components/schemas/activities-api-EventUUID"
        unique:
          $ref: "#/components/schemas/activities-api-UniqueInt"
        icon:
          type: string
          description: URL of the event's icon
        icons:
          nullable: true
          $ref: "#/components/schemas/activities-api-iconDetails"
        time:
          $ref: "#/components/schemas/activities-api-Timestamp"
        label:
          description: |-
            Event name shown in a Profile card (not in Analytics). Can include jinja inserts, which are returned unprocessed.

            This name is not used when searching for events in Analytics or for Automation trigger purposes.

            If no label is defined in the Data Management settings, this field returns the value of `label` that was sent with the original event, but that is not used by the Synerise Web Application.
          type: string
        client:
          $ref: "#/components/schemas/activities-api-client"
        userAgent:
          $ref: "#/components/schemas/activities-api-userAgent"
        modifiedBy:
          nullable: true
          type: string
          deprecated: true
    activities-api-client:
      type: object
      description: Profile's data
      properties:
        uuid:
          $ref: "#/components/schemas/activities-api-ClientUuid"
        id:
          $ref: "#/components/schemas/activities-api-ClientId"
        firstname:
          description: Profile's first name
          type: string
        lastname:
          description: Profile's last name
          type: string
        email:
          description: Profile's email address
          type: string
        avatarUrl:
          description: URL of the profile's avatar
          type: string
    activities-api-ClientEventsRequest:
      type: object
      required:
        - identifierValue
        - additionalData
      properties:
        identifierValue:
          $ref: "#/components/schemas/activities-api-IdentifierValue"
        additionalData:
          $ref: "#/components/schemas/activities-api-ClientEventsRequestAdditionalData"
    activities-api-ClientEventsRequestAdditionalData:
      type: object
      description: Pagination, date filters, and other optional parameters
      properties:
        actions:
          type: string
          example: page.visit,client.login
          description: A comma-separated list of actions (or a single action) that will be included in the response.
        dateFrom:
          type: string
          example: "1720688755000"
          description: Lower value of the time range, as a Unix timestamp in milliseconds.
        dateTo:
          type: string
          example: "1720695955000"
          description: Upper limit of the time range, as a Unix timestamp in milliseconds.
        limit:
          type: string
          default: 50
          description: The maximum number of items per page
        raw:
          type: string
          enum:
            - "true"
            - "false"
          default: "false"
          description: 'When `true`, the response returns raw data. If raw data is not available, processed data from event storage (like from `"raw": false`) is returned instead.'
        pageToken:
          type: string
          description: The token of the page to retrieve. You can check the tokens of the next/previous page in the response to this endpoint. If not provided, the first page is retrieved.
        sortBy:
          type: string
          enum:
            - time:desc
            - time:asc
          default: time:desc
          description: Sorting order. `time:desc` (default) returns newest events first.
    activities-api-ClientId:
      type: number
      description: Profile's ID
    activities-api-ClientUuid:
      type: string
      description: Profile's UUID
    activities-api-descriptionRequest:
      type: object
      description: This object holds the details of the custom description
      properties:
        action:
          $ref: "#/components/schemas/activities-api-actionName"
        description:
          $ref: "#/components/schemas/activities-api-EventDescription"
    activities-api-descriptionResponse:
      type: object
      description: This object holds the details of the custom description
      properties:
        id:
          $ref: "#/components/schemas/activities-api-MappingId"
        businessProfileId:
          type: number
          description: Workspace where this mapping applies
        action:
          $ref: "#/components/schemas/activities-api-actionName"
        description:
          $ref: "#/components/schemas/activities-api-EventDescription"
    activities-api-EventCreateTime:
      type: string
      format: date-time
      description: |-
        Time when the event was received, as an ISO string.
        When you overwrite an event with eventSalt, this value changes to the time of overwriting.
      example: 2022-11-04T12:09:30.404Z
    activities-api-EventDescription:
      type: string
      description: |-
        Event description shown in a Profile card. Can include jinja inserts, which are returned unprocessed.
        This description is not used when searching for events in Analytics or for Automation trigger purposes.
    activities-api-EventLabel:
      type: string
      description: |-
        Event name shown in a Profile card. Can include jinja inserts, which are returned unprocessed.
        This description is not used when searching for events in Analytics or for Automation trigger purposes.
    activities-api-EventUUID:
      type: string
      description: UUID of the event
      example: 482af443-7f6f-4b80-b4ac-a7db5a2f543a
    activities-api-iconDetails:
      type: object
      description: Icon configuration with primary, secondary icon and color
      required:
        - primary
      properties:
        primary:
          type: string
          description: Primary icon ID/name from the system SVG library
        secondary:
          type: string
          nullable: true
          description: Secondary icon ID/name from the system SVG library
        color:
          type: string
          nullable: true
          description: Semantic color name (e.g. positive, negative, warning, neutral) or hex color code
    activities-api-iconRequest:
      type: object
      description: Details of the icon mapping
      required:
        - action
        - icons
      properties:
        action:
          $ref: "#/components/schemas/activities-api-actionName"
        icons:
          $ref: "#/components/schemas/activities-api-iconDetails"
    activities-api-iconResponse:
      type: object
      description: Details of the icon mapping
      properties:
        id:
          $ref: "#/components/schemas/activities-api-MappingId"
        businessProfileId:
          type: number
          description: Workspace where this mapping applies
        action:
          $ref: "#/components/schemas/activities-api-actionName"
        icons:
          $ref: "#/components/schemas/activities-api-iconDetails"
    activities-api-IdentifierValue:
      type: string
      description: Value of the identifier selected in `identifierType`
    activities-api-labelRequest:
      type: object
      description: This object holds the details of the custom label
      properties:
        action:
          $ref: "#/components/schemas/activities-api-actionName"
        label:
          $ref: "#/components/schemas/activities-api-EventLabel"
    activities-api-labelResponse:
      type: object
      description: This object holds the details of the custom label
      properties:
        id:
          $ref: "#/components/schemas/activities-api-MappingId"
        businessProfileId:
          type: number
          description: Workspace where this mapping applies
        action:
          $ref: "#/components/schemas/activities-api-actionName"
        label:
          $ref: "#/components/schemas/activities-api-EventLabel"
    activities-api-MappingId:
      type: number
      description: ID of the mapping
    activities-api-RawParams:
      type: object
      description: Parameters of the event. Some of the parameters listed here don't exist in system events.
      additionalProperties:
        description: Other parameters depending on event type and custom parameters
      properties:
        ip:
          $ref: "#/components/schemas/activities-api-SourceIp"
        clientId:
          $ref: "#/components/schemas/activities-api-ClientId"
        uuid:
          $ref: "#/components/schemas/activities-api-ClientUuid"
        snr-original-time:
          type: string
          description: Original ISO string that was sent with the event. This is saved without modification even if the time was rejected (for example, because it was a future date).
        eventUUID:
          $ref: "#/components/schemas/activities-api-EventUUID"
        eventCreateTime:
          $ref: "#/components/schemas/activities-api-EventCreateTime"
        time:
          $ref: "#/components/schemas/activities-api-Timestamp"
        businessProfileId:
          type: integer
          description: Workspace ID
    activities-api-SingleActivityRequest:
      type: object
      required:
        - identifierValue
        - additionalData
      properties:
        identifierValue:
          type: string
          description: Value of the selected profile identifier
        additionalData:
          description: Identification of the event to retrieve
          oneOf:
            - type: object
              title: Event storage data request
              required:
                - time
                - unique
              properties:
                time:
                  type: string
                  description: |-
                    Unix timestamp of when the event occurred, in milliseconds. To find the value you need:
                    - from raw data responses, use the `time` property from the `params` object
                    - from event storage responses, use the `time` or `createDate` property
                  example: "1667563770404"
                unique:
                  $ref: "#/components/schemas/activities-api-UniqueStr"
            - type: object
              title: Raw data request (if not available, data from event storage is returned)
              required:
                - time
                - eventUUID
              properties:
                time:
                  $ref: "#/components/schemas/activities-api-Timestamp"
                eventUUID:
                  $ref: "#/components/schemas/activities-api-EventUUID"
    activities-api-SourceIp:
      type: string
      description: IP of the device which sent the event
    activities-api-Timestamp:
      type: integer
      description: |-
        Unix timestamp of when the event occurred, in milliseconds.

        This is the time that:
        - is sent as `recordedAt` to **v4/transactions/** endpoints
        - is sent as `time` to **v4/events/** endpoints
        - is the occurrence time of system events
        - is used (after converting to ISO string) as the event time when overwriting with eventSalt (see v4/events endpoints)

        If the event had no time provided when sending, the time of receiving the event is used.

        If the event had a future time when sending, it was rejected and the time of receiving the event is used.
      example: 1667563770404
    activities-api-UniqueInt:
      type: integer
      description: Unique identifier of the event
      example: 1245924049
    activities-api-UniqueStr:
      type: string
      description: Unique identifier of the event
      example: "1245924049"
    activities-api-userAgent:
      type: object
      description: User Agent details
      properties:
        system:
          type: string
          description: Operating System
        browser:
          description: Browser
          type: string
    activities-api-Cursors:
      type: object
      description: Tokens of the next and previous pages
      required:
        - after
        - before
      properties:
        after:
          type: string
          description: Token of the next page
        before:
          type: string
          description: Token of the previous page
    activities-api-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
    activities-api-Meta:
      type: object
      description: Pagination metadata
      properties:
        links:
          type: array
          description: Links to the neighboring pages and the first page
          items:
            $ref: "#/components/schemas/activities-api-Link"
        cursors:
          $ref: "#/components/schemas/activities-api-Cursors"
        limit:
          type: integer
          format: int32
          description: Limit of items per page
        count:
          type: integer
          nullable: true
          description: The number of items on the current page
    activities-api-PaginatedEvents:
      type: object
      required:
        - meta
        - data
      properties:
        meta:
          $ref: "#/components/schemas/activities-api-Meta"
        data:
          type: array
          description: A list of events
          items:
            oneOf:
              - $ref: "#/components/schemas/activities-api-ActivityTerrarium2"
              - type: object
                title: Raw data
                properties:
                  eventUUID:
                    $ref: "#/components/schemas/activities-api-EventUUID"
                  unique:
                    type: integer
                    nullable: true
                    description: Not available (null) with raw data
                  action:
                    $ref: "#/components/schemas/activities-api-actionName"
                  label:
                    type: string
                    deprecated: true
                    description: The label that was sent with the event.
                  client:
                    $ref: "#/components/schemas/activities-api-client"
                  params:
                    $ref: "#/components/schemas/activities-api-RawParams"
                  createDate:
                    $ref: "#/components/schemas/activities-api-Timestamp"
    activity-time-estimator-Hours:
      type: array
      description: |
        An array of best hour prediction arrays.  

        The array at index `0` is for the profile at index `0` in the profile list, the array at `1` is for profile `1`, and so on.
      example:
        - 16
        - 32
        - 64
      items:
        type: array
        items:
          type: integer
          example: 17
    activity-time-estimator-Predictions:
      type: array
      description: |
        An array of predicted probabilities for each hour in the `hours` array.  

        Results at index `0` are for the hours at index `0` in the `hours` array. Result at index `0` is for the hour at index `0`.  

        Higher values mean higher probability.
      example:
        - 0.013318098150193691
        - 0.012947574257850647
        - 0.0123398806899786
      items:
        type: array
        items:
          type: number
          format: float
          example: 0.013318098150193691
    activity-time-estimator-ClientIDs:
      type: array
      maxItems: 1000
      description: An array of profile IDs. To generate predictions for fake profiles, send empty strings as the identifiers.
      items:
        type: string
        description: Profile ID
        example: "67346"
    activity-time-estimator-ClientUUIDs:
      type: array
      maxItems: 1000
      description: An array of profile UUIDs. To generate predictions for fake profiles, send empty strings as the identifiers.
      items:
        type: string
        description: Profile UUID
        example: 6768085e-5925-43c6-b64f-4b90d02de8f2
    activity-time-estimator-TimeIndexValue:
      type: integer
      title: Hour
      description: |
        Hour of the week.  
        The count starts from `0` at 00:00 on Monday. The counter changes on a full hour.  
        **Examples**:
          - Monday, 00:00 is `0`
          - Monday, 00:47 is `0`
          - Monday, 01:00 is `1`
          - Monday, 23:59 is `23`
          - Tuesday, 00:00 is `24`
          - Tuesday, 01:15 is `25`
      minimum: 0
      maximum: 167
    activity-time-estimator-TimeRange:
      type: array
      title: Hour range
      description: A range of hours
      minItems: 2
      maxItems: 2
      example:
        - 4
        - 7
      items:
        $ref: "#/components/schemas/activity-time-estimator-TimeIndexValue"
    activity-time-estimator-TimeIndex:
      type: array
      maxItems: 168
      description: |
        An array of times and time ranges to include in the predictions. If empty or omitted, the entire week is included (with the exceptions listed in `timeIndexExclude`, if they exist).

        A time range is a two-item array. For example, `[4,7]` is the range from Monday, 03:00 to Monday, 06:59. You can mix hours and time ranges in the request.
      example:
        - - 0
          - 23
        - 24
        - 25
        - 26
        - - 27
          - 48
      items:
        anyOf:
          - $ref: "#/components/schemas/activity-time-estimator-TimeRange"
          - $ref: "#/components/schemas/activity-time-estimator-TimeIndexValue"
    activity-time-estimator-Mode:
      type: string
      description: The mode name
      default: standard
    activity-time-estimator-TimeIndexExclude:
      type: array
      maxItems: 168
      description: |
        An array of times and time ranges to exclude from the predictions. If empty or omitted, the entire week is included (according to the time selections made in `timeIndex`, if they exist).

        A time range is a two-item array. For example, `[4,7]` is the range from Monday, 03:00 to Monday, 06:59. You can mix hours and time ranges in the request.
      example:
        - - 0
          - 23
        - 24
        - 25
        - 26
      items:
        anyOf:
          - $ref: "#/components/schemas/activity-time-estimator-TimeRange"
          - $ref: "#/components/schemas/activity-time-estimator-TimeIndexValue"
    activity-time-estimator-TopN:
      type: integer
      minimum: 1
      maximum: 168
      description: The number of best predictions to return for each profile. If omitted, predictions for every hour of the week are returned.
    ai-stats-averageClickPosition:
      type: number
      format: float
      description: The average position of the clicked item on the list of results.
    ai-stats-averageOrderValue:
      type: number
      format: float
      description: The average value of orders resulting from the search.
    ai-stats-clickThroughRate:
      type: number
      format: float
      description: CTR of the search.
    ai-stats-conversionRate:
      type: number
      format: float
      description: Conversion rate of the search.
    ai-stats-conversions:
      type: integer
      description: The number of successful conversions.
    ai-stats-noResultsCount:
      type: integer
      description: The number of searches which returned no results.
    ai-stats-revenue:
      type: number
      format: float
      description: Revenue generated from the search.
    ai-stats-totalClicks:
      type: integer
      description: The number of times a result was clicked.
    ai-stats-query:
      type: string
      description: Query used for search.
    ai-stats-totalCount:
      type: integer
      description: The number of times the search was performed.
    ai-stats-totalSuggestionsUsed:
      type: integer
      description: The number of times a user accepted a suggestion.
    ai-stats-views:
      type: integer
      description: The number of recommendation frame views.
    ai-stats-generations:
      type: integer
      description: The number of generated recommendations.
    ai-stats-itemPurchases:
      type: integer
      description: The number of individual item purchases.
    ai-stats-transactions:
      type: integer
      description: The number of transactions resulting from the recommendation.
    ai-stats-recommendationsRevenue:
      type: number
      format: float
      description: Total revenue generated by recommendations.
    ai-stats-itemPurchasesPerItemClick:
      type: number
      format: float
      description: Item purchases per item click ratio.
    ai-stats-frameClicksPerGeneration:
      type: number
      format: float
      description: Frame clicks per generation ratio.
    ai-stats-frameClicksPerView:
      type: number
      format: float
      description: Frame clicks per view ratio.
    ai-stats-uniqueClients:
      type: number
      format: integer
      description: Number of unique profiles which generated a recommendation.
    ai-stats-frameClicks:
      type: number
      format: integer
      description: Number of clicks on a recommendation frame.
    ai-stats-itemClicks:
      type: number
      format: integer
      description: Number of clicks on a recommendation item.
    ai-stats-QueriesSummarySchema:
      type: object
      description: Queries statistics
      properties:
        averageClickPosition:
          $ref: "#/components/schemas/ai-stats-averageClickPosition"
        averageOrderValue:
          $ref: "#/components/schemas/ai-stats-averageOrderValue"
        clickThroughRate:
          $ref: "#/components/schemas/ai-stats-clickThroughRate"
        conversionRate:
          $ref: "#/components/schemas/ai-stats-conversionRate"
        conversions:
          $ref: "#/components/schemas/ai-stats-conversions"
        noResultsCount:
          $ref: "#/components/schemas/ai-stats-noResultsCount"
        revenue:
          $ref: "#/components/schemas/ai-stats-revenue"
        totalClicks:
          $ref: "#/components/schemas/ai-stats-totalClicks"
        totalCount:
          $ref: "#/components/schemas/ai-stats-totalCount"
        totalSuggestionsUsed:
          $ref: "#/components/schemas/ai-stats-totalSuggestionsUsed"
    ai-stats-QueriesTopSchema:
      type: array
      description: Top queries
      items:
        type: object
        properties:
          query:
            $ref: "#/components/schemas/ai-stats-query"
          count:
            $ref: "#/components/schemas/ai-stats-totalCount"
          clicks:
            $ref: "#/components/schemas/ai-stats-totalClicks"
          clickThroughRate:
            $ref: "#/components/schemas/ai-stats-clickThroughRate"
          revenue:
            $ref: "#/components/schemas/ai-stats-revenue"
          conversions:
            $ref: "#/components/schemas/ai-stats-conversions"
          conversionRate:
            $ref: "#/components/schemas/ai-stats-conversionRate"
    ai-stats-FiltersSummarySchema:
      type: array
      description: Filters stats
      items:
        type: object
        properties:
          filterName:
            type: string
            description: Name of the filterable attribute
          count:
            type: integer
            description: The number of times the filter was used
    ai-stats-RulesSummarySchema:
      type: array
      description: Rules stats
      items:
        type: object
        properties:
          ruleId:
            type: integer
            description: Applied rule id
          count:
            type: integer
            description: The number of times the rule was applied
    ai-stats-QueriesSummaryMultipleIndicesSchema:
      type: array
      description: Queries statistics for multiple indices
      items:
        type: object
        properties:
          indexId:
            type: string
            description: ID of the index for which the stats are requested
            example: 4add1a1fa877c1651906bb22c9dfd37a1618852272
          stats:
            $ref: "#/components/schemas/ai-stats-QueriesSummarySchema"
    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-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-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-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-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-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-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"
    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"
    analytics-isNumber:
      type: boolean
      description: "`true` when the metric is purely numerical (does not calculate any events, parameters, etc.)"
    analytics-isMetricHistogram:
      type: boolean
      description: "`true` when the metric can be used in histogram"
    analytics-isReportMetric:
      type: boolean
      description: "`true` when the metric can be used as a report metric (the expression references either client params or event params, but not both)"
    analytics-AggregateResult:
      type: object
      properties:
        clientId:
          type: integer
          format: int32
          description: ID of the profile
        aggregateId:
          type: string
          format: uuid
          description: UUID of the aggregate
        name:
          type: string
          description: Name of the aggregate
        result:
          description: The result of the calculation
          anyOf:
            - type: string
            - type: number
            - type: object
            - type: boolean
            - type: array
              items: {}
      required:
        - aggregateId
        - clientId
        - name
        - result
    analytics-ListAnalyticsItemCommon:
      type: object
      description: Common elements retrieved in lists of analyses
      properties:
        id:
          $ref: "#/components/schemas/analytics-id"
        name:
          $ref: "#/components/schemas/analytics-name"
        author:
          $ref: "#/components/schemas/analytics-author"
        updatedAt:
          $ref: "#/components/schemas/analytics-updatedAt"
        usedAt:
          $ref: "#/components/schemas/analytics-usedAt"
        createdAt:
          $ref: "#/components/schemas/analytics-createdAt"
        directoryId:
          $ref: "#/components/schemas/analytics-directoryId"
        isDynamicAnalytic:
          $ref: "#/components/schemas/analytics-isDynamicAnalytic"
        variables:
          $ref: "#/components/schemas/analytics-variables"
      required:
        - author
        - createdAt
        - directoryId
        - id
        - isDynamicAnalytic
        - name
        - updatedAt
        - usedAt
        - variables
    analytics-AllowNull:
      type: boolean
      default: true
      description: When `true`, null values can be included in the results.
    analytics-TrendAggregateDataBy:
      type: object
      description: The interval for grouping data
      properties:
        type:
          $ref: "#/components/schemas/analytics-timePeriod"
        value:
          $ref: "#/components/schemas/analytics-timeValue"
      required:
        - type
        - value
    analytics-MetricAggregationType:
      type: string
      enum:
        - COUNT
        - COUNT_DISTINCT
        - SUM
        - MIN
        - MAX
        - AVG
        - EXISTS
        - MEDIAN
        - QUANTILE
      description: |
        
        The type of calculation.

        - COUNT allows you to count the total number of the entities that meet the filters. Doesn't use `attribute`.
        - COUNT_DISTINCT allows you to count the total number of distinct (unique) attribute values in entities which match the filters.
        - SUM, MIN, MAX, AVG, MEDIAN and QUANTILE (requires `level`) allow you to perform calculations on numerical-value parameters within the entities that meet the filters.
        - EXISTS checks the existence of at least a single entity that meets the filters and returns 1 when "true" or 0 when "false". Doesn't use `attribute`.
    analytics-QuantileLevel:
      type: number
      minimum: 0.01
      maximum: 1
      description: Only applies when `type` is `QUANTILE`. This is the percentile whose value will be the result of the analysis. For example, `0.35` is the 35th percentile.
    analytics-MetricClientAggregation:
      type: object
      description: Defines the mathematical or logical formula of the metric
      properties:
        type:
          $ref: "#/components/schemas/analytics-MetricAggregationType"
        level:
          $ref: "#/components/schemas/analytics-QuantileLevel"
        attribute:
          $ref: "#/components/schemas/analytics-ProfileAttribute"
      required:
        - type
    analytics-MetricEventAggregation:
      type: object
      description: Defines the mathematical or logical formula of the metric
      properties:
        type:
          $ref: "#/components/schemas/analytics-MetricAggregationType"
        level:
          $ref: "#/components/schemas/analytics-QuantileLevel"
        attribute:
          $ref: "#/components/schemas/analytics-EventAttribute"
      required:
        - type
    analytics-MetricArgValueTypeEvent:
      type: object
      title: Event
      properties:
        type:
          type: string
          enum:
            - EVENT
        title:
          $ref: "#/components/schemas/analytics-name"
        occurrenceType:
          type: string
          enum:
            - FIRST
            - LAST
            - ALL
          description: Defines which instance of the event per profile is taken into consideration.
        aggregation:
          $ref: "#/components/schemas/analytics-MetricEventAggregation"
        action:
          $ref: "#/components/schemas/analytics-Action"
        dateFilter:
          $ref: "#/components/schemas/analytics-dateFilter"
        filter:
          $ref: "#/components/schemas/analytics-ProfileFilter"
        expressions:
          $ref: "#/components/schemas/analytics-AggregateExpressions"
      required:
        - type
        - title
        - aggregation
        - filter
        - occurrenceType
        - dateFilter
        - action
    analytics-MetricArgValueTypeClient:
      type: object
      title: Profile
      properties:
        type:
          type: string
          enum:
            - CLIENT
        title:
          $ref: "#/components/schemas/analytics-name"
        aggregation:
          $ref: "#/components/schemas/analytics-MetricClientAggregation"
        filter:
          $ref: "#/components/schemas/analytics-ProfileFilter"
      required:
        - type
        - title
        - aggregation
        - filter
    analytics-MetricArgValueNumber:
      type: object
      title: Number
      properties:
        type:
          type: string
          enum:
            - NUMBER
        value:
          type: number
          description: A numerical value
      required:
        - type
        - value
    analytics-MetricExpressionValue:
      description: The value to retrieve with this argument.
      oneOf:
        - $ref: "#/components/schemas/analytics-MetricArgValueTypeEvent"
        - $ref: "#/components/schemas/analytics-MetricArgValueTypeClient"
        - $ref: "#/components/schemas/analytics-MetricArgValueNumber"
    analytics-MetricFormat:
      type: object
      description: |
        
        This object defines the display format of the data in the Synerise Web UI. The JSON format of the results is not affected.

        Values other than in the enums or min-max ranges are accepted by the backend, but may not be displayed properly by the Synerise Web UI.
      properties:
        compactNumbers:
          type: boolean
          default: false
          description: When `true`, numbers are shortened. For example, "20500" becomes "20.5k".
        currency:
          type: string
          nullable: true
          enum:
            - EUR
            - USD
            - PLN
            - JPY
          description: The currency to use when `dataFormat` is `cash`
        dataFormat:
          type: string
          nullable: true
          enum:
            - cash
            - numeric
            - percent
          description: Format of the data
        fixedLength:
          description: The number of digits after the decimal point
          type: integer
          format: int32
          default: 0
          minimum: 0
          maximum: 4
        useSeparator:
          type: boolean
          default: false
          description: Enables the use of a comma as the thousands separator. When `false`, no separator is used.
    analytics-MetricType:
      type: string
      enum:
        - SIMPLE
        - FORMULA
      description: |
        Defines the type of the metric. This affects the contents of the
        `expression` object.

        When the type is `SIMPLE`, the `expression` can only include a single argument.
    analytics-MetricExpression:
      description: |
        A simple metric can only contain a single argument (only VALUE-type). A formula-type metric allows you to build more complex queries. In a formula metric, the schemas are recursive - functions can contain functions.

        **WARNING**: For metrics compatible with Synerise Portal, you should encapsulate the contents of this object in a `BRACKET` function:

        ```
        "expression" {
            "type": "FUNCTION",
            "function": "BRACKET",
            "arg": {
                // the actual content of the metric, for example:
                  "type": "VALUE",
                  "value": {
                      "type": "NUMBER",
                      "value": 15
                    }
              }
        }
        ```
      oneOf:
        - type: object
          title: Value
          properties:
            type:
              type: string
              enum:
                - VALUE
              description: "This type lets you refer to: profile attributes, event parameters, static numerical values. It's the only type that can be used when the metric type is SIMPLE."
            value:
              $ref: "#/components/schemas/analytics-MetricExpressionValue"
        - type: object
          title: Single-argument function
          properties:
            type:
              type: string
              enum:
                - FUNCTION
            function:
              type: string
              description: |
                The type of function.

                * ABS - absolute value

                * CEIL - ceiling function

                * FLOOR - floor function

                * EXP - exponential function

                * LN - natural logarithm

                * ROUND - rounds down if `fraction < x.5` and up if `fraction >= x.5`
              enum:
                - ABS
                - CEIL
                - EXP
                - FLOOR
                - LN
                - ROUND
            arg:
              $ref: "#/components/schemas/analytics-MetricExpression"
        - type: object
          title: Two-argument function
          properties:
            type:
              type: string
              enum:
                - FUNCTION
            function:
              type: string
              description: |
                
                The type of mathematical or logical operation.

                * MULTIPLY, DIVIDE, SUM, SUB - mathematical operations, (SUB - subtraction)

                * IF_NULL - returns the value of arg2 if the value of arg1 is null

                * MAX - returns the higher argument value

                * MIN - returns the lower argument value

                * MOD - modulo operation

                * EQUALS - returns `1` if the argument values are equal, `0` otherwise

                * NOT_EQUALS - returns `0` if the argument values are equal, `1` otherwise

                * GREATER - returns `1` if the value of arg1 is higher than the value of arg2, `0` otherwise

                * GREATER_OR_EQUALS - returns `1` if the value of arg1 is higher than or equal to the value of arg2, `0` otherwise

                * LESS - returns `1` if the value of arg1 is lower than the value of arg2, `0` otherwise

                * LESS_OR_EQUALS - returns `1` if the value of arg1 is lower than or equal to the value of arg2, `0` otherwise
              enum:
                - SUM
                - SUB
                - MULTIPLY
                - DIVIDE
                - IF_NULL
                - MAX
                - MIN
                - MOD
                - EQUALS
                - GREATER
                - GREATER_OR_EQUALS
                - LESS
                - LESS_OR_EQUALS
                - NOT_EQUALS
                - ADD_YEARS
            arg1:
              $ref: "#/components/schemas/analytics-MetricExpression"
            arg2:
              $ref: "#/components/schemas/analytics-MetricExpression"
        - type: object
          title: IF function
          properties:
            type:
              type: string
              enum:
                - FUNCTION
            function:
              type: string
              description: |
                
                The IF function takes three arguments:

                * arg1 is the condition (VALUE-type arguments are considered true)

                * arg2 is the value returned if the condition is true

                * arg3 is the value returned if the condition is false
              enum:
                - IF
            arg1:
              $ref: "#/components/schemas/analytics-MetricExpression"
            arg2:
              $ref: "#/components/schemas/analytics-MetricExpression"
            arg3:
              $ref: "#/components/schemas/analytics-MetricExpression"
        - type: object
          title: Bracket
          properties:
            type:
              type: string
              enum:
                - FUNCTION
            function:
              type: string
              description: |
                Brackets can be used to group expressions and set the order in which they are processed (starting with the deepest, like in mathematics). 

                For metrics compatible with the Synerise Web Portal, the top-level function (first descendant of the `expression` object) should be a bracket, for example:
                ```
                "expression" {
                    "type": "FUNCTION",
                    "function": "BRACKET",
                    "arg": {
                        // the actual content of the metric, for example:
                          "type": "VALUE",
                          "value": {
                              "type": "NUMBER",
                              "value": 15
                            }
                      }
                }
                ```
              enum:
                - BRACKET
            arg:
              description: The values in the bracket.
              oneOf:
                - type: object
                  title: Two values
                  properties:
                    arg1:
                      $ref: "#/components/schemas/analytics-MetricExpression"
                    arg2:
                      $ref: "#/components/schemas/analytics-MetricExpression"
                - type: object
                  title: One value
                  properties:
                    arg:
                      $ref: "#/components/schemas/analytics-MetricExpression"
    analytics-MetricComparison:
      type: object
      description: Use this filter to compare the data from `expression` with another period. If this is used, then the result of the analysis is the difference between the two periods.
      properties:
        dateFilter:
          $ref: "#/components/schemas/analytics-dateFilter"
    analytics-EventExpressionContentEntity:
      description: Structure of the expression. This is a recursive schema - functions can contain more functions.
      oneOf:
        - type: object
          title: Value
          properties:
            type:
              type: string
              enum:
                - VALUE
            title:
              type: string
              description: Title of the value
            value:
              oneOf:
                - $ref: "#/components/schemas/analytics-EventParameter"
                - $ref: "#/components/schemas/analytics-ClientParameter"
                - $ref: "#/components/schemas/analytics-ConstantValue"
                - $ref: "#/components/schemas/analytics-VariableValue"
          required:
            - title
            - type
            - value
        - type: object
          title: Single-argument function
          example:
            type: FUNCTION
            function: LN
            arg:
              type: VALUE
              title: title
              value:
                type: CONSTANT
                constant: 10
          properties:
            type:
              type: string
              enum:
                - FUNCTION
            function:
              $ref: "#/components/schemas/analytics-UnaryFunctionType"
            arg:
              $ref: "#/components/schemas/analytics-EventExpressionContentEntity"
        - type: object
          title: Two-argument function
          properties:
            type:
              type: string
              enum:
                - FUNCTION
            function:
              $ref: "#/components/schemas/analytics-BinaryFunctionType"
            arg1:
              $ref: "#/components/schemas/analytics-EventExpressionContentEntity"
            arg2:
              $ref: "#/components/schemas/analytics-EventExpressionContentEntity"
        - type: object
          title: IF function
          properties:
            type:
              type: string
              enum:
                - FUNCTION
            function:
              $ref: "#/components/schemas/analytics-TernaryFunctionType"
            arg1:
              $ref: "#/components/schemas/analytics-EventExpressionContentEntity"
            arg2:
              $ref: "#/components/schemas/analytics-EventExpressionContentEntity"
            arg3:
              $ref: "#/components/schemas/analytics-EventExpressionContentEntity"
        - type: object
          title: Current time function
          example:
            type: FUNCTION
            function: NOW
          properties:
            type:
              type: string
              enum:
                - FUNCTION
            function:
              $ref: "#/components/schemas/analytics-NullaryFunctionType"
    analytics-expressionCreateRequestBody:
      type: object
      properties:
        isVisibleForClientProfile:
          $ref: "#/components/schemas/analytics-isVisibleForClientProfile"
        analysis:
          description: Details of an expression analysis
          oneOf:
            - $ref: "#/components/schemas/analytics-EventExpressionEntity"
            - $ref: "#/components/schemas/analytics-ClientExpressionEntity"
      required:
        - isVisibleForClientProfile
        - analysis
    analytics-EventExpressionEntity:
      type: object
      title: Event expression
      properties:
        type:
          type: string
          enum:
            - EVENT
          description: This type of expression can be used to analyze event attributes, including the attributes of the profile that owns the event.
        action:
          $ref: "#/components/schemas/analytics-Action"
        name:
          $ref: "#/components/schemas/analytics-name"
        description:
          $ref: "#/components/schemas/analytics-description"
        expression:
          $ref: "#/components/schemas/analytics-EventExpressionContentEntity"
      required:
        - expression
        - name
        - type
        - description
    analytics-AnalysisGetCommon:
      type: object
      description: Common elements retrieved in details of all analyses
      properties:
        id:
          $ref: "#/components/schemas/analytics-id"
        businessProfileId:
          $ref: "#/components/schemas/analytics-businessProfileId"
        name:
          $ref: "#/components/schemas/analytics-name"
        description:
          $ref: "#/components/schemas/analytics-description"
        author:
          $ref: "#/components/schemas/analytics-authorId"
        modifier:
          $ref: "#/components/schemas/analytics-modifierId"
        updatedAt:
          $ref: "#/components/schemas/analytics-updatedAt"
        createdAt:
          $ref: "#/components/schemas/analytics-createdAt"
        usedAt:
          $ref: "#/components/schemas/analytics-usedAt"
        isPredefinedAnalytic:
          $ref: "#/components/schemas/analytics-isPredefinedAnalytic"
        isDynamicAnalytic:
          $ref: "#/components/schemas/analytics-isDynamicAnalytic"
        isDeleted:
          $ref: "#/components/schemas/analytics-isDeleted"
        namespace:
          $ref: "#/components/schemas/analytics-namespace"
        directoryId:
          $ref: "#/components/schemas/analytics-directoryId"
      required:
        - author
        - businessProfileId
        - createdAt
        - description
        - directoryId
        - id
        - isDeleted
        - isDynamicAnalytic
        - isPredefinedAnalytic
        - modifier
        - name
        - namespace
        - updatedAt
        - usedAt
    analytics-ProfileAttribute:
      description: The profile attribute to access
      oneOf:
        - type: object
          title: Segmentation/expression/aggregate
          properties:
            type:
              type: string
              enum:
                - SEGMENTATION
                - EXPRESSION
                - AGGREGATE
            id:
              type: string
              format: uuid
              description: UUID of the referenced analysis
          required:
            - type
            - id
        - type: object
          title: Special
          properties:
            type:
              type: string
              enum:
                - SPECIAL
            special:
              type: string
              enum:
                - CLIENT_ID
              description: The name of the special parameter
          required:
            - type
            - special
        - type: object
          title: Parameter
          properties:
            type:
              type: string
              enum:
                - PARAM
            param:
              type: string
              description: The name of the profile parameter
          required:
            - type
            - param
        - type: object
          title: Tag
          properties:
            type:
              type: string
              enum:
                - TAG
            tag:
              type: string
              description: The name of the tag
          required:
            - type
            - tag
    analytics-variables:
      type: array
      description: Dynamic keys used in this analysis
      items:
        type: object
        properties:
          name:
            type: string
            description: The name of the dynamic key
            example: event.params.PARAMNAME
          value:
            type: string
            description: The default value to use if the parameter referenced by `name` doesn't exist.
    analytics-FunnelStep:
      required:
        - action
        - title
        - expressions
      type: object
      properties:
        title:
          type: string
          description: The name of the step
        action:
          $ref: "#/components/schemas/analytics-Action"
        expressions:
          type: array
          description: Conditions of the event. All of the conditions must be met in order for the step to be completed. For no additional conditions, leave this array empty.
          items:
            $ref: "#/components/schemas/analytics-EventExpression"
    analytics-funnelStructure:
      type: object
      properties:
        completedWithin:
          type: object
          description: |
            Time constraint for completing all the steps in the funnel. Timer starts
            when the first step is triggered.

            - `period` sets the time unit  
            - `value` sets the number of time units
          properties:
            period:
              $ref: "#/components/schemas/analytics-timePeriod"
            value:
              $ref: "#/components/schemas/analytics-timeValue"
        dateFilter:
          $ref: "#/components/schemas/analytics-dateFilter"
        exact:
          type: boolean
          default: false
          description: |
            <span style="color:red"><strong>WARNING</strong>: The Synerise Portal doesn't currently support this parameter.</span> Analyses created from the Portal assume the default value, false.

            When true, the profile's events must be exactly as in the funnel. For example, if the profile's history has events `A -> B -> C -> D`, and the funnel is `A -> C -> D`, the match is not exact, because there is an event between A and C.
        steps:
          type: array
          minItems: 0
          description: An array of steps in the funnel. The order of the steps in the array determines the order of their analysis (that is, the step at index 0 is the first step, the step at index 1 is the second step, and so on).
          items:
            $ref: "#/components/schemas/analytics-FunnelStep"
        title:
          type: string
          description: Title of the funnel.
      description: Funnel conditions
      required:
        - title
        - steps
    analytics-filterExpressionFunnel:
      type: object
      title: Funnel
      properties:
        type:
          type: string
          enum:
            - FUNNEL
        matching:
          $ref: "#/components/schemas/analytics-matching"
        funnel:
          $ref: "#/components/schemas/analytics-funnelStructure"
    analytics-filterExpressionAttribute:
      type: object
      title: Profile attribute
      properties:
        type:
          type: string
          enum:
            - ATTRIBUTE
        matching:
          $ref: "#/components/schemas/analytics-matching"
        attribute:
          type: object
          description: An attribute to test against a constraint
          properties:
            matching:
              $ref: "#/components/schemas/analytics-matching"
            expressions:
              type: array
              description: |
                An array of conditions. All conditions must be met.  

                <span style="color:red"><strong>WARNING</strong>: The Synerise Portal doesn't currently support multiple objects in this array.</span> 

                To create multiple conditions compatible with the Synerise Portal, add more objects to the `expressions` array that is the parent of this object, and use the AND/OR operator between them.
              items:
                type: object
                properties:
                  constraint:
                    $ref: "#/components/schemas/analytics-EventConstraint"
                  attribute:
                    $ref: "#/components/schemas/analytics-ProfileAttribute"
    analytics-filterExpressions:
      type: array
      items:
        oneOf:
          - $ref: "#/components/schemas/analytics-filterExpressionFunnel"
          - $ref: "#/components/schemas/analytics-filterExpressionAttribute"
          - type: object
            title: AND/OR operator
            properties:
              type:
                type: string
                enum:
                  - OPERATOR
                description: |
                  The logical operator must be placed in the array between expressions.

                  **Example**:

                  ```
                  "expressions" [
                  {
                      "type": "ATTRIBUTE",
                      "matching": true,
                      "attribute": {
                          "expressions": [
                              {
                                  ...
                              }
                          ]
                      }
                  },
                  {
                      "type": "OPERATOR",
                      "logic": "AND"
                  },
                  {
                      "type": "ATTRIBUTE",
                      "matching": true,
                      "attribute": {
                          "expressions": [
                              {
                                  ...
                              }
                          ]
                      }
                  }]
                  ```
              logic:
                type: string
                enum:
                  - AND
                  - OR
            required:
              - type
              - logic
      description: |
        Profile filter details. The expressions are applied according to their position in the array. The logical AND/OR operator must be placed between expressions.  
        An empty array means no filters are applied.
    analytics-matching:
      type: boolean
      description: When `true`, the results include only data that matched the condition. When `false`, the results include only data that did not match the condition.
    analytics-SegmentationUnique:
      type: boolean
      description: When `true`, a profile is only included in the first segment that it matches; segments that follow do not include this profile in their results even if their conditions are met. The segments are checked according to their order in the request.
      default: true
    analytics-id:
      type: string
      format: uuid
      description: Unique ID of the resource
    analytics-uuid:
      type: string
      format: uuid
      description: Unique ID of the resource
    analytics-name:
      type: string
      description: Name of the resource
    analytics-description:
      type: string
      description: Description of the resource
    analytics-author:
      type: object
      description: Data of the author of the analysis
      properties:
        id:
          $ref: "#/components/schemas/analytics-authorId"
        name:
          type: string
          description: Name of the author
        iconUrl:
          type: string
          description: URL of the author's avatar icon
      required:
        - id
        - name
    analytics-authorId:
      type: integer
      format: int64
      description: Unique ID of the original creator. `1` means the resource was created by a request with workspace authorization.
    analytics-modifierId:
      type: integer
      format: int64
      description: Unique ID of the last editor. `1` means the resource was edited by a request with workspace authorization.
    analytics-updatedAt:
      type: string
      format: date-time
      description: Last update time
    analytics-createdAt:
      type: string
      format: date-time
      description: Creation time
    analytics-isPredefinedAnalytic:
      type: boolean
      description: "`true` if the analysis was automatically created with the workspace"
    analytics-isDeleted:
      type: boolean
      description: "`true` if the resource was deleted"
    analytics-analyticVersion:
      type: string
      format: uuid
      description: Unique ID of this version of the resource
    analytics-namespace:
      type: string
      description: Name of the namespace in the database where this resource is saved. This is **different than the namespace in the path parameters** of the request.
    analytics-oldId:
      type: integer
      description: A unique numeric ID required for backwards compatibility. Cannot be changed.
    analytics-AggregateExpressions:
      type: array
      minLength: 0
      description: An array of conditions that the analyzed event must meet
      items:
        $ref: "#/components/schemas/analytics-EventExpression"
    analytics-datePickerDayFrom:
      type: string
      description: Lower boundary of the pattern's timeframe, in HH:MM:SS format.
    analytics-datePickerDayTo:
      type: string
      description: Upper boundary of the pattern's timeframe, in HH:MM:SS format.
    analytics-datePickerInverted:
      type: boolean
      default: false
      description: "Inverts the pattern's timeframe. For example: if `from` is 12:00:00; `to` is 14:00:00; and `inverted` is true, the analysis does NOT include anything between 12:00:01 and 13:59:59."
    analytics-previewDefaultObjectId:
      type: number
      format: int64
      description: The ID of the default profile for generating a preview of the results.
    analytics-AggregateAttribute:
      allOf:
        - type: object
          description: The event attribute, special property, or aggregate result analyzed by this aggregate.
        - oneOf:
            - $ref: "#/components/schemas/analytics-ParameterEventAttribute"
            - $ref: "#/components/schemas/analytics-RunningAggregateEventAttribute"
            - $ref: "#/components/schemas/analytics-ExpressionEventAttribute"
            - $ref: "#/components/schemas/analytics-SpecialEventAttribute"
            - $ref: "#/components/schemas/analytics-EmptyEventAttribute"
    analytics-AggregateSize:
      type: integer
      description: Only applies and is required when `type` is *_MULTI. Defines how many results to return.
    analytics-AggregateUnique:
      type: boolean
      default: false
      description: Only applies when `type` is *_MULTI. When set to `true`, only unique occurrences of an event parameter are included in the results.
    analytics-isVisibleForClientProfile:
      type: boolean
      description: When set to `true`, information about this analysis is shown on a profile's card.
    analytics-AggregateCommon:
      type: object
      required:
        - actionId
        - attribute
        - dateFilter
        - type
        - name
        - description
      properties:
        name:
          $ref: "#/components/schemas/analytics-name"
        description:
          $ref: "#/components/schemas/analytics-description"
        action:
          $ref: "#/components/schemas/analytics-Action"
        attribute:
          $ref: "#/components/schemas/analytics-AggregateAttribute"
        type:
          $ref: "#/components/schemas/analytics-AggregateExpressionType"
        level:
          $ref: "#/components/schemas/analytics-QuantileLevel"
        dateFilter:
          $ref: "#/components/schemas/analytics-dateFilter"
        size:
          $ref: "#/components/schemas/analytics-AggregateSize"
        unique:
          $ref: "#/components/schemas/analytics-AggregateUnique"
        expressions:
          type: array
          $ref: "#/components/schemas/analytics-AggregateExpressions"
    analytics-isDynamicAnalytic:
      type: boolean
      description: "`true` if the analysis contains any [dynamic values](https://hub.synerise.com/docs/analytics/i_events-parameter-value/#dynamic-key)."
    analytics-dateRule:
      description: A set of rules. Within a monthly filter, you can include a mixture of rules for days of the month and days of the week.
      oneOf:
        - $ref: "#/components/schemas/analytics-weekDateRule"
        - $ref: "#/components/schemas/analytics-monthDateRule"
    analytics-SankeyCalculationResponse:
      type: object
      properties:
        results:
          type: array
          description: |
            
            Each array in this array is one transition.

            Each transition array includes six strings.
            - index 0 is the FROM event in the format `"<layer>_<eventId>_<drilldownResult>"`<br>Layer indexes start at 0. If you are analyzing paths starting at the sourceEvent, that event is layer 0. If you are analyzing paths that end with the sourceEvent, layer 0 is the first event in the path.<br>Drilldown result is nullified if no drilldown is defined for this event at this layer.
            - index 1 is the TO event in the same format
            - index 2 is the number of occurrences
            - index 3 is the average transition time in ms
            - index 4 is the shortest transition time in ms
            - index 5 is the longest transition time in ms

            **EXAMPLE:**

            Consider the following snippet, which includes two transitions:
            <pre><code><span>"results"</span><span>:</span> <span>[</span>
            <span>[</span>
                <span>"0_531_\"Mac OS X\""</span><span>,</span>
                <span>"1_1051_null"</span><span>,</span>
                <span>"2"</span><span>,</span>
                <span>"20"</span><span>,</span>
                <span>"10"</span><span>,</span>
                <span>"30"</span>
            <span>]</span><span>,</span>
            <span>[</span>
                <span>"1_1604_null"</span><span>,</span>
                <span>"2_6961_null"</span><span>,</span>
                <span>"1"</span><span>,</span>
                <span>"4242"</span><span>,</span>
                <span>"4242"</span><span>,</span>
                <span>"4242"</span>
            <span>]</span><span>,</span> </code></pre>
            The results of the first transition can be read as follows:

            Transition was FROM layer 0; sourceEvent (`action.id 531`); drilldown result \"Mac OS X\".

            Transition was TO layer 1; event with ID 1051, drilldown was undefined or result is null.

            Two profiles completed this transition.

            The average transition time was 20 ms, the longest time was 30 ms, and the shortest time was 10 ms.
          items:
            type: array
            items:
              type: string
    analytics-Sankey:
      allOf:
        - type: object
          properties:
            analysis:
              $ref: "#/components/schemas/analytics-SankeyAnalysis"
        - $ref: "#/components/schemas/analytics-AnalysisGetCommon"
      required:
        - analysis
    analytics-ClientExpressionEntity:
      type: object
      title: Profile expression
      description: Details of a profile expression. In the Synerise Portal, they are called _attribute_ expressions.
      properties:
        type:
          type: string
          enum:
            - CLIENT
          description: This type of expression can be used to analyze profile attributes.
        name:
          $ref: "#/components/schemas/analytics-name"
        description:
          $ref: "#/components/schemas/analytics-description"
        expression:
          $ref: "#/components/schemas/analytics-ClientExpressionContentEntity"
      required:
        - expression
        - name
        - type
        - description
    analytics-RunningAggregate:
      allOf:
        - type: object
          title: Event aggregate
          properties:
            aggregateType:
              type: string
              description: |
                Type of the aggregate. `RUNNING_AGGREGATE` is an event aggregate.

                Event aggregates take into account events that occurred before the event that is the subject of the aggregate. If `excludeCurrent` is `false`, the data from that event is included too.

                `timeWindow` is a sliding time window anchored to the timestamp of the event currently being evaluated: only elements from events whose timestamp falls within `[currentEvent.timestamp - timeWindow, currentEvent.timestamp]` contribute to the result. It is required when `type` is `LAST_TIME`, `FIRST_TIME`, `LAST_MULTI_TIME`, or `FIRST_MULTI_TIME`, and ignored for all other aggregate types.
              enum:
                - RUNNING_AGGREGATE
            excludeCurrent:
              type: boolean
              description: When `false`, data from the event that is the subject of the analysis is analyzed in addition to data of the events that occurred before it.
            timeWindow:
              $ref: "#/components/schemas/analytics-period"
          required:
            - aggregateType
            - excludeCurrent
        - $ref: "#/components/schemas/analytics-AggregateCommon"
    analytics-UnaryFunctionType:
      type: string
      description: |
        The type of function.


        * ABS - absolute value

        * CEIL - ceiling function

        * FLOOR - floor function

        * EXP - exponential function

        * LN - natural logarithm

        * ROUND - rounds down if `fraction < x.5` and up if `fraction >= x.5`

        * TO_NUMBER and TO_STRING - return the argument value in a given format

        * TO_MONEY - returns a numerical value with an accuracy of two decimal places

        * DAY_OF_* - returns a numerical value. The argument must be a date (yyyy-mm-dd) or the "now" function

        * HOUR/WEEK/MONTH/YEAR - returns a part of date/time. The argument must be a date (ISO 8601) or the "now" function.

        * BRACKET - allows you to group elements, like in mathematics. The most deeply-nested brackets are processed first.
      enum:
        - LN
        - ABS
        - CEIL
        - EXP
        - FLOOR
        - ROUND
        - TO_NUMBER
        - TO_STRING
        - DAY_OF_MONTH
        - DAY_OF_WEEK
        - DAY_OF_YEAR
        - HOUR
        - MONTH
        - WEEK
        - YEAR
        - TO_MONEY
        - TO_TIMESTAMP
        - TO_DATE
        - BRACKET
    analytics-AggregateTypedCalculationResponse:
      type: object
      properties:
        aggregateId:
          type: string
          format: uuid
        aggregateuuid:
          type: string
          format: uuid
        clientId:
          type: number
          format: int64
        title:
          type: string
        result:
          type: object
        variables:
          type: array
          items:
            $ref: "#/components/schemas/analytics-Variable"
        dateFilter:
          $ref: "#/components/schemas/analytics-dateFilter"
        analyticVersion:
          type: string
          format: uuid
    analytics-Aggregate:
      allOf:
        - type: object
          properties:
            oldId:
              $ref: "#/components/schemas/analytics-oldId"
            analysis:
              allOf:
                - type: object
                  properties:
                    id:
                      $ref: "#/components/schemas/analytics-id"
                    uuid:
                      $ref: "#/components/schemas/analytics-uuid"
                    oldId:
                      $ref: "#/components/schemas/analytics-oldId"
                - $ref: "#/components/schemas/analytics-AggregateAnalysis"
            isVisibleForClientProfile:
              $ref: "#/components/schemas/analytics-isVisibleForClientProfile"
            aggregateType:
              $ref: "#/components/schemas/analytics-AggregateType"
            previewDefaultObjectId:
              $ref: "#/components/schemas/analytics-previewDefaultObjectId"
            analyticVersion:
              $ref: "#/components/schemas/analytics-analyticVersion"
        - $ref: "#/components/schemas/analytics-AnalysisGetCommon"
      required:
        - oldId
        - analysis
        - aggregateType
        - isVisibleForClientProfile
        - analyticVersion
    analytics-weekDateRule:
      type: object
      title: Days of the week
      properties:
        type:
          type: string
          enum:
            - WEEK
        weeks:
          type: array
          description: Weeks included in the pattern
          items:
            $ref: "#/components/schemas/analytics-weekOfMonth"
        inverted:
          type: boolean
          default: false
          description: |
            When set to `true`, weeks are counted from the end of the month.

            For example, if `inverted` is true and `week` is set to 1, the rule applies to the last week of each month. This lets you take into account the varying length of months.

            **NOTE:** Remember that this `inverted` field is not the same as the `inverted` field of each object in the `days` array of each week..
      required:
        - type
        - weeks
    analytics-analyticName:
      type: string
      description: Name of the analysis
      example: Nice people who read the documentation
    analytics-ClientAggregate:
      allOf:
        - type: object
          title: Profile aggregate
          description: Profile aggregate definition
          properties:
            aggregateType:
              type: string
              description: Type of the aggregate. `AGGREGATE` is a profile aggregate.
              enum:
                - AGGREGATE
          required:
            - aggregateType
        - $ref: "#/components/schemas/analytics-AggregateCommon"
    analytics-FunnelAnalysis:
      type: object
      description: Details of the funnel
      properties:
        title:
          $ref: "#/components/schemas/analytics-name"
        description:
          $ref: "#/components/schemas/analytics-description"
        funnel:
          $ref: "#/components/schemas/analytics-funnelStructure"
        filter:
          $ref: "#/components/schemas/analytics-ProfileFilter"
      required:
        - description
        - filter
        - funnel
        - title
    analytics-dateFilter:
      description: |
        Definition of a date filter. Only data that meets the result of the filter will be included in the analysis. For no filter, leave this object empty.

        An absolute date filter lets you define static dates and times that always apply to the analysis.

        A relative date filter lets you create a date filter that goes back a certain time from the moment of calculating the analysis.
      oneOf:
        - $ref: "#/components/schemas/analytics-absoluteDateFilter"
        - $ref: "#/components/schemas/analytics-relativeDateFilter"
    analytics-SegmentationAnalysis:
      type: object
      description: Definition of the segmentation.
      properties:
        title:
          $ref: "#/components/schemas/analytics-name"
        description:
          $ref: "#/components/schemas/analytics-description"
        segments:
          type: array
          description: An array of segments in the segmentation. By default, a profile is only included in the first matching segment, even if it meets the filters of the following segments. To change this, use the `unique` parameter.
          minItems: 1
          items:
            $ref: "#/components/schemas/analytics-OneSegment"
        unique:
          $ref: "#/components/schemas/analytics-SegmentationUnique"
      required:
        - description
        - segments
        - title
    analytics-Directory:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/analytics-id"
        businessProfileId:
          $ref: "#/components/schemas/analytics-businessProfileId"
        name:
          $ref: "#/components/schemas/analytics-name"
        objectType:
          $ref: "#/components/schemas/analytics-objectType"
        createdAt:
          $ref: "#/components/schemas/analytics-createdAt"
        updatedAt:
          $ref: "#/components/schemas/analytics-updatedAt"
        isDefault:
          type: boolean
          description: "`true` if this is the default directory"
      required:
        - createdAt
        - id
        - isDefault
        - name
        - objectType
        - updatedAt
    analytics-Trend:
      allOf:
        - type: object
          properties:
            analysis:
              $ref: "#/components/schemas/analytics-TrendAnalysis"
        - $ref: "#/components/schemas/analytics-AnalysisGetCommon"
      required:
        - analysis
    analytics-HistogramItemsValues:
      type: object
      properties:
        metricId:
          type: string
          description: UUID of a metric
          format: uuid
        value:
          type: number
          format: double
          description: Result of a metric
      required:
        - metricId
        - value
    analytics-customDailyDateFilter:
      type: object
      title: Daily
      properties:
        type:
          type: string
          enum:
            - DAILY
          description: Daily filters limit the data scope to a range of hours every day.
        nestingType:
          type: string
          enum:
            - IN_PLACE
        from:
          $ref: "#/components/schemas/analytics-datePickerDayFrom"
        to:
          $ref: "#/components/schemas/analytics-datePickerDayTo"
        inverted:
          $ref: "#/components/schemas/analytics-datePickerInverted"
      required:
        - nestingType
        - type
        - from
        - to
    analytics-DirectoryChangeRequest:
      type: object
      properties:
        newDir:
          description: ID of the new directory
          type: string
          format: uuid
        analyticType:
          $ref: "#/components/schemas/analytics-objectType"
      required:
        - analyticType
        - newDir
    analytics-successResult:
      type: object
      example:
        success: true
        value: "123"
      properties:
        success:
          type: boolean
          description: Always `true`
        value:
          type: string
          description: Calculation result
      required:
        - success
        - value
      title: Successful calculation
    analytics-FunnelMetadata:
      type: object
      description: Raw data of the calculation
      properties:
        source:
          type: array
          description: An array of results. The first item of the array is the number of profiles that matched the profile filter (if applicable), but didn't complete any steps. The second number is the number of profiles who completed the first step, and so on.
          items:
            type: integer
            format: int64
    analytics-Histogram:
      allOf:
        - type: object
          properties:
            analysis:
              $ref: "#/components/schemas/analytics-HistogramAnalysis"
        - $ref: "#/components/schemas/analytics-AnalysisGetCommon"
      required:
        - analysis
    analytics-SegmentationPreviewRequest:
      type: object
      properties:
        analysis:
          $ref: "#/components/schemas/analytics-SegmentationAnalysis"
        allowNull:
          $ref: "#/components/schemas/analytics-AllowNull"
      required:
        - analysis
    analytics-ReportRequest:
      type: object
      properties:
        analysis:
          $ref: "#/components/schemas/analytics-ReportAnalysis"
        allowNull:
          $ref: "#/components/schemas/analytics-AllowNull"
    analytics-numberArray:
      type: array
      items:
        type: integer
    analytics-AggregateType:
      type: string
      enum:
        - AGGREGATE
        - RUNNING_AGGREGATE
    analytics-Metric:
      allOf:
        - type: object
          properties:
            analysis:
              $ref: "#/components/schemas/analytics-MetricAnalysis"
            isReportMetric:
              type: boolean
            isMetricHistogram:
              $ref: "#/components/schemas/analytics-isMetricHistogram"
        - $ref: "#/components/schemas/analytics-AnalysisGetCommon"
      required:
        - analysis
        - isReportMetric
        - isMetricHistogram
    analytics-NullaryFunctionType:
      type: string
      description: Returns the current time in ISO format, with the time zone of the workspace. For example `2025-02-06T14:09:56.321+01:00`
      enum:
        - NOW
    analytics-AggregateRequest:
      type: object
      description: Definition of the aggregate
      properties:
        analysis:
          $ref: "#/components/schemas/analytics-AggregateAnalysis"
        isVisibleForClientProfile:
          $ref: "#/components/schemas/analytics-isVisibleForClientProfile"
        previewDefaultObjectId:
          $ref: "#/components/schemas/analytics-previewDefaultObjectId"
      required:
        - analysis
        - isVisibleForClientProfile
    analytics-AggregateUpdateRequest:
      type: object
      description: Definition of the aggregate
      properties:
        analysis:
          allOf:
            - type: object
              description: Structure of the analysis
              properties:
                oldId:
                  $ref: "#/components/schemas/analytics-oldId"
              required:
                - oldId
            - $ref: "#/components/schemas/analytics-AggregateAnalysis"
        isVisibleForClientProfile:
          $ref: "#/components/schemas/analytics-isVisibleForClientProfile"
        previewDefaultObjectId:
          $ref: "#/components/schemas/analytics-previewDefaultObjectId"
      required:
        - analysis
        - isVisibleForClientProfile
    analytics-Variable:
      type: object
      properties:
        name:
          type: string
          description: The name of the variable (dynamic key) which will receive this value for the current calculation.
        value:
          oneOf:
            - $ref: "#/components/schemas/analytics-stringType"
            - $ref: "#/components/schemas/analytics-numberType"
            - $ref: "#/components/schemas/analytics-booleanType"
            - $ref: "#/components/schemas/analytics-stringArray"
            - $ref: "#/components/schemas/analytics-numberArray"
            - $ref: "#/components/schemas/analytics-dateFilter"
      required:
        - name
        - value
    analytics-calculationResult:
      type: object
      properties:
        name:
          type: string
          description: Segment name
        result:
          type: integer
          format: int64
          description: |
            
            The number of profiles which matched the conditions of this segment.

            **IMPORTANT:** If a profile matches a segment's conditions, that profile is not included in any further calculations, even if it would normally match the conditions of the segments that follow.
      required:
        - name
        - result
    analytics-Error:
      allOf:
        - type: object
          properties:
            source:
              type: object
              nullable: true
              description: Information about a parameter that caused the error, if applicable.
              properties:
                pointer:
                  type: string
                  description: Information about a parameter
                value:
                  type: string
                  nullable: true
                  description: Currently unused
            errors:
              type: array
              description: An array of errors, if applicable
              items:
                $ref: "#/components/schemas/analytics-ErrorContent"
        - $ref: "#/components/schemas/analytics-ErrorContent"
    analytics-ErrorContent:
      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 [https://developers.synerise.com/errors.html](https://developers.synerise.com/errors.html).
        httpStatus:
          type: integer
          description: HTTP status code
        message:
          type: string
          description: Description of the problem
        traceId:
          type: string
          description: Currently unused
          nullable: true
        help:
          type: string
          nullable: true
          description: Currently unused
    analytics-successor:
      type: object
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - SEGMENTATION
            - METRIC
            - FUNNEL
            - TREND
            - EXPRESSION
            - AGGREGATE
            - SANKEY
        name:
          type: string
        children:
          type: array
          items:
            $ref: "#/components/schemas/analytics-successor"
      required:
        - children
        - id
        - type
    analytics-AggregateAnalysis:
      description: Definition of the aggregate
      required:
        - aggregateType
      oneOf:
        - $ref: "#/components/schemas/analytics-RunningAggregate"
        - $ref: "#/components/schemas/analytics-ClientAggregate"
    analytics-analyticAggregateResponse:
      type: object
      properties:
        meta:
          $ref: "#/components/schemas/analytics-meta"
        data:
          type: array
          description: Array of aggregates
          items:
            $ref: "#/components/schemas/analytics-AggregateListItem"
      required:
        - data
        - meta
    analytics-relativeDateFilter:
      type: object
      title: Relative
      properties:
        type:
          type: string
          enum:
            - RELATIVE
          description: |
            Relative filters allow you to create a filter that depends on when the analysis is calculated. 

            - `duration` is the length of time that the filter covers.
            - `offset` is the time that the filter goes back to set the beginning of the duration.
        duration:
          $ref: "#/components/schemas/analytics-period"
        offset:
          $ref: "#/components/schemas/analytics-period"
        filter:
          $ref: "#/components/schemas/analytics-customDateFilter"
      required:
        - duration
        - offset
        - type
    analytics-failureResult:
      type: object
      example:
        success: false
        errorMessage: Analytic or one of nested analytics does not exist
        httpStatus: 400
        errorCode: ANA-002
      properties:
        success:
          type: boolean
          description: Always `false`
        errorMessage:
          type: string
          description: Details of the error which caused the calculation failure
        httpStatus:
          type: integer
          description: HTTP status of the error which caused the calculation failure
        errorCode:
          type: string
          description: Code of the error which caused the calculation failure
      required:
        - errorMessage
        - success
      title: Failed calculation
    analytics-HistogramItems:
      type: object
      properties:
        aggregateTimeDescription:
          type: string
          description: Timestamp of the result
          format: date-time
        values:
          type: array
          description: An array of the results of the included metrics
          items:
            $ref: "#/components/schemas/analytics-HistogramItemsValues"
      required:
        - aggregateTimeDescription
        - values
    analytics-MetricCalculationData:
      type: object
      description: Basic information about the metric
      properties:
        name:
          $ref: "#/components/schemas/analytics-name"
        description:
          $ref: "#/components/schemas/analytics-description"
        format:
          $ref: "#/components/schemas/analytics-MetricFormat"
        initialDateFilter:
          $ref: "#/components/schemas/analytics-dateFilter"
      required:
        - description
        - format
        - initialDateFilter
        - name
    analytics-analyticId:
      type: string
      format: uuid
      description: UUID of the analysis
      example: 5370bf3c-2dfa-4e89-98ff-07100cffee6c
    analytics-DirectoryRenameRequest:
      type: object
      properties:
        newName:
          type: string
          description: New name for the directory
      required:
        - newName
    analytics-FunnelCalculationResult:
      type: object
      description: Calculation results, divided into steps
      properties:
        name:
          type: string
          description: Step name
        result:
          type: integer
          format: int64
          description: The number of profiles which completed this step
    analytics-segmentation:
      allOf:
        - type: object
          properties:
            analysis:
              $ref: "#/components/schemas/analytics-SegmentationAnalysis"
            isVisibleForClientProfile:
              $ref: "#/components/schemas/analytics-isVisibleForClientProfile"
            sharing:
              $ref: "#/components/schemas/analytics-SharingData"
        - $ref: "#/components/schemas/analytics-AnalysisGetCommon"
      required:
        - analysis
        - isVisibleForClientProfile
    analytics-BinaryFunctionType:
      type: string
      description: |
        
        The type of mathematical or logical operation.

        * MULTIPLY, DIVIDE, SUM, SUB - mathematical operations, (SUB - subtraction)

        * IF_NULL - returns the value of arg2 if the value of arg1 is null

        * MAX - returns the higher argument value

        * MIN - returns the lower argument value

        * MOD - modulo operation

        * EQUALS - returns `1` if the argument values are equal, `0` otherwise

        * NOT_EQUALS - returns `0` if the argument values are equal, `1` otherwise

        * GREATER - returns `1` if the value of arg1 is higher than the value of arg2, `0` otherwise

        * GREATER_OR_EQUALS - returns `1` if the value of arg1 is higher than or equal to the value of arg2, `0` otherwise

        * LESS - returns `1` if the value of arg1 is lower than the value of arg2, `0` otherwise

        * LESS_OR_EQUALS - returns `1` if the value of arg1 is lower than or equal to the value of arg2, `0` otherwise

        * CONCAT - concatenates the values and returns them as a string (even if both values are numerical)

        * REGEXP - arg1 is the string to transform (can be calculated from a function). arg2 is a regular expression that defines the transformation (which can also be calculated from a function, otherwise use the "constant" value type). For example, if arg1 is "123", and arg2 is "2.", the result is "23".
      enum:
        - DIVIDE
        - IF_NULL
        - MAX
        - MIN
        - MOD
        - MULTIPLY
        - SUB
        - SUM
        - GREATER
        - GREATER_OR_EQUALS
        - LESS
        - LESS_OR_EQUAL
        - NOT_EQUAL
        - EQUALS
        - ADD_YEARS
        - CONCAT
        - REGEXP
    analytics-TrendRequest:
      type: object
      properties:
        analysis:
          $ref: "#/components/schemas/analytics-TrendAnalysis"
      required:
        - analysis
    analytics-ProfileFilter:
      type: object
      description: This filter lets you limit the results to profiles that match it. For no filter, leave the object empty.
      properties:
        matching:
          $ref: "#/components/schemas/analytics-matching"
        expressions:
          $ref: "#/components/schemas/analytics-filterExpressions"
        expression:
          type: object
          description: Legacy parameter.
          deprecated: true
      required:
        - expressions
        - matching
    analytics-Expression:
      allOf:
        - type: object
          properties:
            analysis:
              description: Details of the analysis
              oneOf:
                - $ref: "#/components/schemas/analytics-EventExpressionEntity"
                - $ref: "#/components/schemas/analytics-ClientExpressionEntity"
            analyticVersion:
              $ref: "#/components/schemas/analytics-analyticVersion"
            isVisibleForClientProfile:
              $ref: "#/components/schemas/analytics-isVisibleForClientProfile"
        - $ref: "#/components/schemas/analytics-AnalysisGetCommon"
      required:
        - analysis
        - analyticVersion
        - isVisibleForClientProfile
    analytics-TrendMetadata:
      type: object
      description: Metadata of the analysis
      properties:
        aggregateDataBy:
          $ref: "#/components/schemas/analytics-TrendAggregateDataBy"
        dateFilter:
          $ref: "#/components/schemas/analytics-dateFilter"
      required:
        - aggregateDataBy
        - dateFilter
    analytics-HistogramMetadata:
      type: object
      description: Time constraints and aggregation details
      properties:
        period:
          $ref: "#/components/schemas/analytics-TrendAggregateDataBy"
        dateFilter:
          $ref: "#/components/schemas/analytics-dateFilter"
      required:
        - aggregateDataBy
        - dateFilter
    analytics-HistogramAnalysis:
      type: object
      description: Details of a histogram
      properties:
        title:
          $ref: "#/components/schemas/analytics-name"
        description:
          $ref: "#/components/schemas/analytics-description"
        histogram:
          $ref: "#/components/schemas/analytics-HistogramDefinition"
      required:
        - description
        - histogram
        - title
    analytics-customDateFilter:
      description: This object allows you to define a pattern for a more detailed time filter. These patterns are applied within the constraints of the `dateFilter` object that contains them, regardless of its type relative or absolute).
      oneOf:
        - $ref: "#/components/schemas/analytics-customDailyDateFilter"
        - $ref: "#/components/schemas/analytics-customWeeklyDateFilter"
        - $ref: "#/components/schemas/analytics-customMonthlyDateFilter"
    analytics-Funnel:
      allOf:
        - type: object
          properties:
            analysis:
              $ref: "#/components/schemas/analytics-FunnelAnalysis"
        - $ref: "#/components/schemas/analytics-AnalysisGetCommon"
      required:
        - analysis
    analytics-customWeeklyDateFilter:
      type: object
      title: Weekly
      properties:
        type:
          type: string
          enum:
            - WEEKLY
          description: Weekly filters let you define separate rules for each day of the week.
        nestingType:
          type: string
          enum:
            - IN_PLACE
        days:
          type: array
          description: An array of rules for different days of the week.
          items:
            $ref: "#/components/schemas/analytics-dayOf"
      required:
        - days
        - nestingType
        - type
    analytics-HistogramDefinition:
      type: object
      description: Structure of a histogram analysis. A histogram must have a date filter - an empty (infinite) filter causes a Bad Request error due to database limits per request.
      properties:
        dateFilter:
          $ref: "#/components/schemas/analytics-dateFilter"
        period:
          $ref: "#/components/schemas/analytics-TrendAggregateDataBy"
        eventMetrics:
          type: array
          description: An array of metrics in the histogram
          items:
            $ref: "#/components/schemas/analytics-HistogramMetric"
      required:
        - dateFilter
        - eventMetrics
        - period
    analytics-MetricAnalysis:
      type: object
      description: Structure of the analytical query
      properties:
        title:
          $ref: "#/components/schemas/analytics-name"
        description:
          $ref: "#/components/schemas/analytics-description"
        format:
          $ref: "#/components/schemas/analytics-MetricFormat"
        comparison:
          $ref: "#/components/schemas/analytics-MetricComparison"
        metricType:
          $ref: "#/components/schemas/analytics-MetricType"
        expression:
          $ref: "#/components/schemas/analytics-MetricExpression"
        isVisibleForClientProfile:
          $ref: "#/components/schemas/analytics-isVisibleForClientProfile"
      required:
        - comparison
        - description
        - expression
        - format
        - isVisibleForClientProfile
        - metricType
        - title
    analytics-stringArray:
      type: array
      items:
        type: string
    analytics-weekOfMonth:
      type: object
      properties:
        week:
          type: integer
          description: Number of the week. The direction of counting depends on the `inverted` boolean property of the ancestor object.
        days:
          type: array
          description: Days included in the pattern
          items:
            $ref: "#/components/schemas/analytics-dayOf"
      required:
        - days
        - type
    analytics-numberType:
      type: integer
    analytics-HistogramCalculationResponse:
      type: object
      properties:
        metadata:
          $ref: "#/components/schemas/analytics-HistogramMetadata"
        items:
          type: array
          description: The numerical results, divided into time units defined in the `period` object. Each object in the array holds the results of all metrics for a particular aggregation period.
          items:
            $ref: "#/components/schemas/analytics-HistogramItems"
        legends:
          type: array
          description: Information about included metrics and their display mode
          items:
            $ref: "#/components/schemas/analytics-HistogramLegends"
      required:
        - items
        - legends
        - metadata
    analytics-AggregateExpressionType:
      type: string
      description: |
        The type of calculation.

        - COUNT allows you to count the total number of the entities that meet the filters.

        - COUNT_DISTINCT allows you to count the total number of distinct (unique) attribute values in entities which match the filters.

        - SUM, MIN, MAX, MEDIAN, QUANTILE (requires `level`) and AVG allow you to perform calculations on numerical-value parameters within the entities that meet the filters.

        - EXISTS checks the existence of at least a single entity that meets the filters and returns 1 when "true" or 0 when "false".

        - LAST and LAST_MULTI (requires `size`) retrieve the newest matching data.

        - FIRST and FIRST_MULTI (requires `size`) retrieve the oldest matching data.

        - LAST_TIME and FIRST_TIME (running aggregates only; require `timeWindow`) retrieve the single newest / oldest matching value from events within the time window preceding the currently evaluated event.

        - LAST_MULTI_TIME and FIRST_MULTI_TIME (running aggregates only; require `size` and `timeWindow`) retrieve the newest / oldest matching data from events within the time window preceding the currently evaluated event.
      enum:
        - AVG
        - SUM
        - MIN
        - MAX
        - COUNT
        - MEDIAN
        - QUANTILE
        - COUNT_DISTINCT
        - LAST
        - FIRST
        - EXISTS
        - FIRST_MULTI
        - LAST_MULTI
        - FIRST_TIME
        - LAST_TIME
        - FIRST_MULTI_TIME
        - LAST_MULTI_TIME
        - TOP
        - BOTTOM
        - TOP_MULTI
        - BOTTOM_MULTI
    analytics-dayOf:
      type: object
      properties:
        day:
          type: integer
          description: The day that this rule applies to. In weekly patterns, `1` is Monday (Sunday if inverted).
        from:
          $ref: "#/components/schemas/analytics-datePickerDayFrom"
        to:
          $ref: "#/components/schemas/analytics-datePickerDayTo"
        mode:
          $ref: "#/components/schemas/analytics-dayOfMode"
        inverted:
          $ref: "#/components/schemas/analytics-datePickerInverted"
      required:
        - day
        - from
        - inverted
        - to
    analytics-MetricRequest:
      type: object
      properties:
        analysis:
          $ref: "#/components/schemas/analytics-MetricAnalysis"
    analytics-OverrideQueryRequest:
      type: object
      description: Override details
      properties:
        dateFilter:
          $ref: "#/components/schemas/analytics-dateFilter"
        aggregateDataBy:
          allOf:
            - type: object
              description: Data aggregation (if applicable for this analysis type)
            - $ref: "#/components/schemas/analytics-period"
        filter:
          $ref: "#/components/schemas/analytics-ProfileFilter"
        variables:
          type: array
          description: A list of variable values to use in this calculation
          items:
            $ref: "#/components/schemas/analytics-Variable"
      required:
        - variables
    analytics-stringType:
      type: string
    analytics-HistogramLegends:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: UUID of a metric
        title:
          type: string
          description: Title of a metric
        chartType:
          $ref: "#/components/schemas/analytics-ChartType"
      required:
        - chartType
        - id
        - title
    analytics-AnalyticsFirstMatchRequest:
      type: object
      properties:
        identifierValue:
          $ref: "#/components/schemas/analytics-identifierValue"
        segmentations:
          type: array
          description: An array of objects. The objects are checked in the order from the array, and when a segmentation from an object matches the profile, the value of that object's `id` is returned in the response. Note that each object can check multiple segmentations - in such cases, only one of those segmentation needs to match for the object to be considered a match.
          items:
            $ref: "#/components/schemas/analytics-FirstMatchingSegmentation"
      required:
        - identifierValue
        - segmentations
    analytics-SegmentationRequest:
      type: object
      properties:
        analysis:
          $ref: "#/components/schemas/analytics-SegmentationAnalysis"
        isVisibleForClientProfile:
          $ref: "#/components/schemas/analytics-isVisibleForClientProfile"
      required:
        - analysis
        - isVisibleForClientProfile
    analytics-meta:
      type: object
      description: Pagination metadata
      properties:
        links:
          type: array
          description: Links to the neighboring pages and the first page
          items:
            $ref: "#/components/schemas/analytics-link"
        limit:
          type: integer
          format: int32
          description: Limit of items per page
        count:
          type: integer
          description: Currently unused
    analytics-TrendDefinition:
      type: object
      properties:
        title:
          $ref: "#/components/schemas/analytics-name"
        description:
          $ref: "#/components/schemas/analytics-description"
        action:
          $ref: "#/components/schemas/analytics-Action"
        expressions:
          type: array
          minLength: 0
          description: An array of conditions that the event must meet
          items:
            $ref: "#/components/schemas/analytics-EventExpression"
        tabIndex:
          type: integer
          format: int32
          description: Currently unused. For compatibility, set to 0.
          default: 0
        aggregationType:
          type: string
          default: EVENT
          description: Currently unused. For compatibility, set to EVENT
          enum:
            - EVENT
            - CLIENT
        chartType:
          $ref: "#/components/schemas/analytics-ChartType"
      required:
        - title
        - chartType
        - action
        - expressions
        - tabIndex
        - aggregationType
    analytics-TrendTrend:
      type: object
      description: Trend analysis conditions
      properties:
        aggregateDataBy:
          $ref: "#/components/schemas/analytics-TrendAggregateDataBy"
        dateFilter:
          $ref: "#/components/schemas/analytics-dateFilter"
        trendDefinitions:
          type: array
          description: An array of trends included in the trend analysis
          items:
            $ref: "#/components/schemas/analytics-TrendDefinition"
      required:
        - aggregateDataBy
        - dateFilter
        - trendDefinitions
    analytics-TrendAnalysis:
      type: object
      description: Details of a trend analysis
      properties:
        title:
          $ref: "#/components/schemas/analytics-name"
        description:
          $ref: "#/components/schemas/analytics-description"
        filter:
          $ref: "#/components/schemas/analytics-ProfileFilter"
        trend:
          $ref: "#/components/schemas/analytics-TrendTrend"
      required:
        - description
        - filter
        - title
        - trend
    analytics-OneSegment:
      type: object
      properties:
        title:
          type: string
          description: Name of the segment. If you want to use the segment name (for example, by creating an expression that returns it for use in a filter), the name shouldn't include any whitespace or special characters.
        description:
          type: string
          description: Description of the segment
        filter:
          $ref: "#/components/schemas/analytics-ProfileFilter"
      required:
        - title
        - description
        - filter
    analytics-FirstMatchingSegmentation:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: This ID will be returned in the response to identify which object contains the first matching segmentation.
        segmentationIds:
          type: array
          description: An array of segmentations to check in this entry
          items:
            type: string
            format: uuid
          minItems: 0
        query:
          type: object
          description: A segmentation query to check
          properties:
            analysis:
              $ref: "#/components/schemas/analytics-SegmentationAnalysis"
      required:
        - id
        - segmentationIds
    analytics-monthDateRule:
      type: object
      title: Days of the month
      properties:
        type:
          type: string
          enum:
            - MONTH
        days:
          type: array
          description: Days of the month included in the pattern.
          items:
            $ref: "#/components/schemas/analytics-dayOf"
        inverted:
          type: boolean
          default: false
          description: |
            When set to `true`, days are counted from the end of the month.

            For example, if `inverted` is true and `day` is set to 1, the rule applies to the last day of each month. This lets you take into account the varying length of months.  

            **NOTE:** Remember that this `inverted` field is not the same as the `inverted` field of each object in the `days` array.
      required:
        - days
        - type
    analytics-MetricCalculationResponse:
      type: object
      properties:
        result:
          description: The numerical result. In metrics that return true/false values, `1` is "true" and `0` is "false".
          type: number
          format: double
        metricData:
          $ref: "#/components/schemas/analytics-MetricCalculationData"
      required:
        - metricData
        - result
    analytics-ReportCalculationResponse:
      type: object
      properties:
        data:
          type: array
          description: Calculation results. Each object in this array corresponds to one metric included in the report. The Synerise Web UI currently only supports single-metric reports.
          items:
            $ref: "#/components/schemas/analytics-ReportCalculationData"
      required:
        - data
    analytics-dayOfMode:
      type: string
      enum:
        - Range
        - Hour
    analytics-TrendItems:
      type: object
      properties:
        aggregateTimeDescription:
          type: string
          description: Timestamp for which the data was calculated
          format: date-time
        values:
          type: array
          description: An array of values for each trend
          items:
            $ref: "#/components/schemas/analytics-TrendItemsValues"
      required:
        - aggregateTimeDescription
        - values
    analytics-GroupingReportMetric:
      type: object
      properties:
        name:
          type: array
          description: Parameter values
          items:
            anyOf:
              - type: string
              - type: number
        value:
          type: number
          description: The number of occurrences of the combination defined in `name`
          format: double
      required:
        - name
        - value
    analytics-objectType:
      type: string
      enum:
        - EXPRESSION
        - AGGREGATE
        - SEGMENTATION
        - METRIC
        - FUNNEL
        - SANKEY
        - TREND
        - HISTOGRAM
        - REPORT
        - ANALYTICS_QUERY
        - ANALYTICS_DASHBOARD
    analytics-AnalyticsBatchDeleteRequest:
      type: object
      properties:
        funnelIds:
          type: array
          minItems: 0
          description: A list of funnels to delete
          items:
            type: string
            format: uuid
        segmentationIds:
          type: array
          minItems: 0
          description: A list of segmentations to delete
          items:
            type: string
            format: uuid
        trendIds:
          type: array
          minItems: 0
          description: A list of trends to delete
          items:
            type: string
            format: uuid
        metricIds:
          type: array
          minItems: 0
          description: A list of metrics to delete
          items:
            type: string
            format: uuid
        histogramIds:
          type: array
          minItems: 0
          description: A list of histograms to delete
          items:
            type: string
            format: uuid
        reportIds:
          type: array
          minItems: 0
          description: A list of reports to delete
          items:
            type: string
            format: uuid
        aggregateIds:
          type: array
          minItems: 0
          description: A list of aggregates to delete
          items:
            type: string
            format: uuid
        expressionIds:
          type: array
          minItems: 0
          description: A list of expressions to delete
          items:
            type: string
            format: uuid
        sankeyIds:
          type: array
          minItems: 0
          description: A list of sankey analyses to delete
          items:
            type: string
            format: uuid
      required:
        - aggregateIds
        - expressionIds
        - funnelIds
        - histogramIds
        - metricIds
        - reportIds
        - sankeyIds
        - segmentationIds
        - trendIds
    analytics-CreateRequestSankeyAnalysis:
      type: object
      properties:
        analysis:
          $ref: "#/components/schemas/analytics-SankeyAnalysis"
      required:
        - analysis
    analytics-link:
      type: object
      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
      required:
        - rel
        - url
    analytics-DynamicVariablesRequest:
      type: object
      properties:
        variables:
          $ref: "#/components/schemas/analytics-variables"
      required:
        - variables
    analytics-SegmentationCalculationResponse:
      type: object
      properties:
        calculationResults:
          type: array
          description: A list of segments
          items:
            $ref: "#/components/schemas/analytics-calculationResult"
        totalContacts:
          type: integer
          description: The total number of profiles in the database
        excludedContacts:
          type: integer
          description: The number of profiles which did not match the conditions of any segment
        metadata:
          $ref: "#/components/schemas/analytics-metadata"
      required:
        - calculationResults
    analytics-DirectoryCreateRequest:
      type: object
      properties:
        name:
          $ref: "#/components/schemas/analytics-name"
        analyticType:
          $ref: "#/components/schemas/analytics-objectType"
      required:
        - analyticType
        - name
    analytics-HistogramTimeDistributionChartItemValue:
      type: object
      properties:
        metricId:
          type: string
          format: uuid
        value:
          type: number
          format: double
      required:
        - metricId
        - value
    analytics-MetricLegacyPreview:
      type: object
      properties:
        analysis:
          $ref: "#/components/schemas/analytics-MetricAnalysis"
      required:
        - analysis
    analytics-MetricProjectionResponse:
      type: object
      properties:
        hashId:
          $ref: "#/components/schemas/analytics-id"
        name:
          $ref: "#/components/schemas/analytics-name"
        description:
          $ref: "#/components/schemas/analytics-description"
        action:
          $ref: "#/components/schemas/analytics-Action"
        eventName:
          $ref: "#/components/schemas/analytics-ActionName"
        actionId:
          $ref: "#/components/schemas/analytics-ActionId"
        isNumber:
          $ref: "#/components/schemas/analytics-isNumber"
        isDynamicAnalytic:
          $ref: "#/components/schemas/analytics-isDynamicAnalytic"
        variables:
          $ref: "#/components/schemas/analytics-variables"
        createdAt:
          $ref: "#/components/schemas/analytics-createdAt"
        isMetricHistogram:
          $ref: "#/components/schemas/analytics-isMetricHistogram"
      required:
        - createdAt
        - isNumber
        - name
    analytics-TrendLegends:
      type: object
      properties:
        id:
          type: string
          description: Dynamically-generated UUID for a trend. This UUID is used to correlate a legend with a result from the `items` array.
          format: uuid
        title:
          type: string
          description: Title of the trend
        chartType:
          $ref: "#/components/schemas/analytics-ChartType"
      required:
        - chartType
        - id
        - title
    analytics-metadata:
      type: object
      description: Raw data of the calculation
      properties:
        source:
          type: array
          description: An array of results. Each number is the number of profiles which matched a segment, according to the segments' order in the request. The last number is the the number of profiles which don't match any of the segment.
          items:
            type: integer
    analytics-timePeriod:
      type: string
      description: The unit of time
      enum:
        - YEARS
        - MONTHS
        - WEEKS
        - DAYS
        - HOURS
        - MINUTES
        - SECONDS
        - UNKNOWN
    analytics-timeValue:
      type: integer
      description: The number of time units
      format: int64
    analytics-booleanType:
      type: boolean
    analytics-AggregateHistogramRequest:
      type: object
      properties:
        variables:
          type: array
          description: A list of variable values to use in this calculation
          items:
            $ref: "#/components/schemas/analytics-Variable"
        dateFilter:
          $ref: "#/components/schemas/analytics-dateFilter"
        aggregateDataBy:
          $ref: "#/components/schemas/analytics-TrendAggregateDataBy"
      required:
        - aggregateDataBy
        - dateFilter
        - variables
    analytics-identifierValue:
      type: string
      description: Value of the selected identifier. Note that IDs must also be sent as strings.
    analytics-Report:
      allOf:
        - type: object
          properties:
            analysis:
              $ref: "#/components/schemas/analytics-ReportAnalysis"
            allowNull:
              $ref: "#/components/schemas/analytics-AllowNull"
        - $ref: "#/components/schemas/analytics-AnalysisGetCommon"
      required:
        - allowNull
        - analysis
    analytics-FunnelRequest:
      type: object
      properties:
        analysis:
          $ref: "#/components/schemas/analytics-FunnelAnalysis"
    analytics-segmentationWithRelated:
      type: object
      properties:
        segmentationId:
          $ref: "#/components/schemas/analytics-analyticId"
        related:
          type: boolean
          description: "`true` if profile belongs to this segmentation."
      required:
        - related
        - segmentationId
    analytics-ChartType:
      type: string
      description: Currently unused. For compatibility, set to COLUMN
      enum:
        - COLUMN
        - LINE
    analytics-AggregateHistogramCalculationResponse:
      type: object
      properties:
        items:
          type: array
          description: The numerical results, divided into time units according to `aggregateDataBy`. Each object in the array holds the results for a particular aggregation period.
          items:
            $ref: "#/components/schemas/analytics-HistogramTimeDistributionItem"
        metadata:
          $ref: "#/components/schemas/analytics-HistogramMetadata"
      required:
        - items
        - metadata
    analytics-HistogramRequest:
      type: object
      properties:
        analysis:
          $ref: "#/components/schemas/analytics-HistogramAnalysis"
      required:
        - analysis
    analytics-ReportCalculationData:
      type: object
      properties:
        id:
          type: string
          format: uuid
        columnName:
          type: string
          description: |
            Column header for this metric. Uses the per-metric `columnName` from the report
            definition when set; otherwise falls back to the underlying metric's title.
        values:
          type: array
          description: |
            
            An array of results for each grouping.

            Note that `values` is a single-item array of arrays.

            **Example**: if the dimensions of your report are _firstname_ and _title_ in a page visit event, this may be the result:

            ```json
            "values": [
              [
                {
                  "name": [
                    "John",
                    "Discounted Product Page"
                  ],
                  "value": 26.0
                },
                {
                  "name": [
                    "Steve",
                    "Discounted Product Page"
                  ],
                  "value": 12.0
                },
                {
                  "name": [
                    "Steve",
                    "New product pre-order"
                  ],
                  "value": 117.0
                }
              ]
            ]
            ```

            This means that 26 profiles named John visited a page titled "Discounted Product Page". The same page was visited by 12 profiles named Steve. Profiles named Steve visited "New product pre-order" page 117 times.
          items:
            type: array
            items:
              $ref: "#/components/schemas/analytics-GroupingReportMetric"
        groups:
          type: array
          description: A list of parameters that were used for creating dimensions (grouping)
          items:
            type: string
      required:
        - columnName
        - groups
        - id
        - values
    analytics-FunnelCalculationResponse:
      type: object
      properties:
        calculationResult:
          type: array
          description: Funnel calculation results, listed step-by-step
          items:
            $ref: "#/components/schemas/analytics-FunnelCalculationResult"
        metadata:
          $ref: "#/components/schemas/analytics-FunnelMetadata"
        timeBetweenSteps:
          type: array
          description: Data about time between steps. The objects are arranged according to step order (the first object in the array relates to transition between step 1 and step 2). All times are in milliseconds.
          items:
            type: object
            properties:
              avg:
                type: integer
                format: int64
                description: Average time
              max:
                type: integer
                format: int64
                description: Longest time
              min:
                type: integer
                format: int64
                description: Shortest time
    analytics-ReportAnalysis:
      type: object
      description: Structure of the report analysis
      properties:
        title:
          $ref: "#/components/schemas/analytics-name"
        description:
          $ref: "#/components/schemas/analytics-description"
        filter:
          $ref: "#/components/schemas/analytics-ProfileFilter"
        reportMetrics:
          type: array
          minLength: 0
          description: An array of metrics in the report. The Synerise Web Portal currently only supports reports with one metric.
          items:
            $ref: "#/components/schemas/analytics-ReportMetricDefinition"
      required:
        - description
        - filter
        - reportMetrics
        - title
    analytics-HistogramMetric:
      type: object
      properties:
        metricId:
          $ref: "#/components/schemas/analytics-uuid"
        chartType:
          $ref: "#/components/schemas/analytics-ChartType"
        title:
          type: string
          description: Name of the metric on the histogram (can be different than the name saved in the metric's details)
      required:
        - chartType
        - metricId
    analytics-businessProfileId:
      type: integer
      format: int32
      description: ID of the workspace (formerly business profile)
      example: 48
    analytics-SankeyRequest:
      type: object
      properties:
        analysis:
          $ref: "#/components/schemas/analytics-SankeyAnalysis"
      required:
        - analysis
    analytics-ClientExpressionContentEntity:
      description: Structure of the expression. This is a recursive schema - functions can contain more functions.
      oneOf:
        - type: object
          title: Value
          properties:
            type:
              type: string
              enum:
                - VALUE
            title:
              type: string
              description: Title of the value
            value:
              oneOf:
                - $ref: "#/components/schemas/analytics-ClientParameter"
                - $ref: "#/components/schemas/analytics-ConstantValue"
                - $ref: "#/components/schemas/analytics-VariableValue"
          required:
            - title
            - type
            - value
        - type: object
          title: Single-argument function
          example:
            type: FUNCTION
            function: LN
            arg:
              type: VALUE
              title: title
              value:
                type: CONSTANT
                constant: 10
          properties:
            type:
              type: string
              enum:
                - FUNCTION
            function:
              $ref: "#/components/schemas/analytics-UnaryFunctionType"
            arg:
              $ref: "#/components/schemas/analytics-ClientExpressionContentEntity"
        - type: object
          title: Two-argument function
          properties:
            type:
              type: string
              enum:
                - FUNCTION
            function:
              $ref: "#/components/schemas/analytics-BinaryFunctionType"
            arg1:
              $ref: "#/components/schemas/analytics-ClientExpressionContentEntity"
            arg2:
              $ref: "#/components/schemas/analytics-ClientExpressionContentEntity"
        - type: object
          title: IF function
          properties:
            type:
              type: string
              enum:
                - FUNCTION
            function:
              $ref: "#/components/schemas/analytics-TernaryFunctionType"
            arg1:
              $ref: "#/components/schemas/analytics-ClientExpressionContentEntity"
            arg2:
              $ref: "#/components/schemas/analytics-ClientExpressionContentEntity"
            arg3:
              $ref: "#/components/schemas/analytics-ClientExpressionContentEntity"
        - type: object
          title: Current time function
          example:
            type: FUNCTION
            function: NOW
          properties:
            type:
              type: string
              enum:
                - FUNCTION
            function:
              $ref: "#/components/schemas/analytics-NullaryFunctionType"
    analytics-absoluteDateFilter:
      type: object
      title: Absolute
      properties:
        type:
          type: string
          enum:
            - ABSOLUTE
          description: Absolute filters have the same start and end regardless of when the analysis is calculated.
        from:
          type: string
          format: date-time
          description: The lower boundary of the date filter.
        to:
          type: string
          format: date-time
          description: The upper boundary of the date filter. Must be later than `from`.
        filter:
          $ref: "#/components/schemas/analytics-customDateFilter"
      required:
        - type
    analytics-SankeyAnalysis:
      type: object
      description: Details of a Sankey analysis
      properties:
        title:
          $ref: "#/components/schemas/analytics-name"
        description:
          $ref: "#/components/schemas/analytics-description"
        sourceEvent:
          required:
            - action
            - expressions
          type: object
          description: The event that serves as the basis of the Sankey analysis
          properties:
            action:
              $ref: "#/components/schemas/analytics-Action"
            expressions:
              type: array
              description: An array of conditions that the event must meet
              items:
                $ref: "#/components/schemas/analytics-EventExpression"
        reverseOrder:
          type: boolean
          description: |-
            
            Defines the direction of the analysis:
            - When "false", the analysis shows paths that begin with the `sourceEvent`.
            - When "true", the analysis shows paths that end with the `sourceEvent`.
        numberOfSteps:
          minimum: 0
          description: The number of steps to analyze before or after the source event
          exclusiveMinimum: false
          type: integer
          format: int32
        numberOfPaths:
          minimum: 0
          description: Information for the Synerise Web UI about the number of paths to analyze. This many most common paths are returned as standalone results, the rest is aggregated as "other". This does not affect the JSON content of the response from the analytics engine.
          exclusiveMinimum: false
          type: integer
          format: int32
        drillDown:
          type: array
          description: An array of drilldown conditions. On each layer, an event can only have one drilldown assigned.
          items:
            required:
              - action
              - attribute
              - layer
            type: object
            properties:
              eventName:
                $ref: "#/components/schemas/analytics-ActionName"
              attribute:
                $ref: "#/components/schemas/analytics-EventAttribute"
              layer:
                minimum: 0
                description: The layer where this drilldown applies. Layer indexes start at 0. If you are analyzing paths starting at the sourceEvent, that event is layer 0. If you are analyzing paths that end with the sourceEvent, layer 0 is the first event in the path.
                exclusiveMinimum: false
                type: integer
                format: int32
        drillDownCount:
          type: integer
          nullable: true
          default: null
          description: Defines the number of displayed top drilldown results.
        dateFilter:
          $ref: "#/components/schemas/analytics-dateFilter"
        filter:
          $ref: "#/components/schemas/analytics-ProfileFilter"
        eventFilters:
          type: array
          description: An array of events to include or exclude according to the `excludeEvents` setting.
          items:
            required:
              - event
            type: object
            properties:
              title:
                type: string
                description: The name of the filter. Currently not used in the Synerise Web UI.
              action:
                $ref: "#/components/schemas/analytics-Action"
              expressions:
                type: array
                description: Conditions of the event. All of the conditions must be met.
                items:
                  $ref: "#/components/schemas/analytics-EventExpression"
        excludeEvents:
          type: boolean
          description: |-
            
            - When "true", the events defined in `eventFilters` are excluded from the analysis.
            - When "false", ONLY the events defined in `eventFilters` are included in the analysis.
        firstOccurrenceOnly:
          type: boolean
          description: When `true`, only the first occurrence of the source event is counted in the analysis. Every subsequent occurrence of the same event will be ignored in the analysis.
      required:
        - dateFilter
        - description
        - drillDown
        - eventFilters
        - excludeEvents
        - filter
        - firstOccurrenceOnly
        - numbersOfPaths
        - numbersOfSteps
        - reverseOrder
        - sourceEvent
        - title
    analytics-ReportMetricDefinition:
      type: object
      properties:
        metricId:
          $ref: "#/components/schemas/analytics-uuid"
        dateFilter:
          allOf:
            - type: object
              description: This date filter overrides the date filter in the metric.
            - $ref: "#/components/schemas/analytics-dateFilter"
        action:
          allOf:
            - type: object
              description: |
                The parameters of an event defined in this object can be used in the dimensions (`group` object) of the report. The event must be included in the metric that is the base of the report.
            - $ref: "#/components/schemas/analytics-Action"
        format:
          $ref: "#/components/schemas/analytics-MetricFormat"
        columnName:
          type: string
          description: Optional alias displayed as this metric's column header. Falls back to the underlying metric's title when null or omitted.
        grouping:
          type: object
          description: |
            The type and number of results to show. "TOP" shows the highest results. "LAST" shows the most recent results.
          oneOf:
            - type: object
              title: Top
              required:
                - type
                - top
              properties:
                type:
                  type: string
                  enum:
                    - TOP
                top:
                  type: integer
                  description: The number of results to show in the report
            - type: object
              title: Last
              required:
                - type
                - last
              properties:
                type:
                  type: string
                  enum:
                    - LAST
                last:
                  type: integer
                  description: The number of results to show in the report
        groups:
          type: array
          description: |
            
            The data to be included in the report. This data is called the _dimensions_ of the report.
            Each object in the array adds one dimension.

            - When you choose a metric created on the basis of one event only, you can group the results in reports only by the parameters assigned to this event.
            - When you choose a metric that is based only on the profile attributes, then you can group the results according to attributes assigned to profiles.
            - When you choose a metric that is created on the basis of events and profile attributes which don't have a common parameter, then you can group the results in reports only by attributes assigned to profiles.

            **Example 1:**
            You have a metric that counts page visits. You want to see the results of the report grouped by the first name of the person who visited the page.
            To achieve this, you need to add one dimension: the profile's first name. The response will include an array of objects that list the names and the number of their occurrences.

            **Example 2:**
            While using the same metric as in example 1, you add two dimensions:
            - profile's name (`firstname` param)
            - title of the page (`title` param)

            The response will include the firstname/title combinations and the number of their occurrences. For a JSON example, see the description of the response schema for this method.
          items:
            type: object
            required:
              - type
              - attribute
            properties:
              title:
                type: string
                description: The name of the dimension
              format:
                $ref: "#/components/schemas/analytics-MetricFormat"
              type:
                type: string
                description: Defines the source type of the data shown in the report.
                enum:
                  - CLIENT
                  - EVENT
              attribute:
                description: Defines the data shown in the report.
                oneOf:
                  - $ref: "#/components/schemas/analytics-ProfileAttribute"
                  - $ref: "#/components/schemas/analytics-EventAttribute"
      required:
        - action
        - dateFilter
        - format
        - grouping
        - groups
        - metricId
    analytics-HistogramLegacyPreviewRequest:
      type: object
      properties:
        analysis:
          $ref: "#/components/schemas/analytics-HistogramAnalysis"
    analytics-Action:
      type: object
      description: The analyzed event
      required:
        - name
      properties:
        id:
          $ref: "#/components/schemas/analytics-ActionId"
        name:
          $ref: "#/components/schemas/analytics-ActionName"
    analytics-ActionId:
      type: integer
      format: int64
      deprecated: true
      nullable: true
      description: Deprecated parameter. DO NOT use. Has no effect in create/update requests.
    analytics-ActionName:
      type: string
      description: Action name of the event.
      example: page.visit
    analytics-TrendCalculationResponse:
      type: object
      properties:
        name:
          $ref: "#/components/schemas/analytics-name"
        metadata:
          $ref: "#/components/schemas/analytics-TrendMetadata"
        items:
          type: array
          description: Results, grouped by time unit
          items:
            $ref: "#/components/schemas/analytics-TrendItems"
        legends:
          type: array
          description: Information about included trends and their display mode
          items:
            $ref: "#/components/schemas/analytics-TrendLegends"
      required:
        - items
        - legends
        - metadata
        - name
    analytics-ExpressionType:
      type: string
      enum:
        - EVENT
        - CLIENT
    analytics-PreviewAggregateRequest:
      type: object
      properties:
        aggregate:
          allOf:
            - type: object
              description: Structure of the analysis. For previews, the `oldId` parameter can have any value.
              properties:
                oldId:
                  $ref: "#/components/schemas/analytics-oldId"
              required:
                - oldId
            - $ref: "#/components/schemas/analytics-ClientAggregate"
        identifierValue:
          $ref: "#/components/schemas/analytics-identifierValue"
      required:
        - aggregate
        - identifierValue
    analytics-predecessor:
      type: object
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - SEGMENTATION
            - METRIC
            - FUNNEL
            - TREND
            - EXPRESSION
            - AGGREGATE
            - SANKEY
        name:
          type: string
        children:
          type: array
          items:
            $ref: "#/components/schemas/analytics-predecessor"
      required:
        - children
        - id
        - type
    analytics-period:
      type: object
      description: The definition of a length of time.
      properties:
        type:
          $ref: "#/components/schemas/analytics-timePeriod"
        value:
          $ref: "#/components/schemas/analytics-timeValue"
      required:
        - type
        - value
    analytics-TernaryFunctionType:
      type: string
      description: |
        
        The IF function takes three arguments:

        * arg1 is the condition (VALUE-type arguments are considered true)

        * arg2 is the value returned if the condition is true

        * arg3 is the value returned if the condition is false
      enum:
        - IF
    analytics-HistogramTimeDistributionItem:
      type: object
      properties:
        aggregateTimeDescription:
          type: string
          description: Time when this interval ended
        values:
          type: array
          description: The result of the aggregate
          items:
            $ref: "#/components/schemas/analytics-HistogramTimeDistributionChartItemValue"
      required:
        - aggregateTimeDescription
        - values
    analytics-calculatedAnalytic:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/analytics-analyticId"
        name:
          $ref: "#/components/schemas/analytics-analyticName"
        result:
          description: Result of the analysis
          oneOf:
            - $ref: "#/components/schemas/analytics-successResult"
            - $ref: "#/components/schemas/analytics-failureResult"
      required:
        - id
        - name
        - result
    analytics-customMonthlyDateFilter:
      type: object
      title: Monthly
      properties:
        type:
          type: string
          enum:
            - MONTHLY
          description: Monthly filters allow you to build rules for days of the month and/or weeks, including rules for different days of the week.
        nestingType:
          type: string
          enum:
            - IN_PLACE
        rules:
          $ref: "#/components/schemas/analytics-dateRule"
      required:
        - nestingType
        - rules
        - type
    analytics-TrendItemsValues:
      type: object
      properties:
        trendId:
          type: string
          format: uuid
          description: Dynamically-generated UUID for a trend. To identify which results belongs to which trend, locate this UUID in an object in the `legends` array.
        countedEvents:
          type: number
          description: The number of events that matched the trend. If the trend analyzes profiles, this value is `0.0`.
          format: double
        countedClients:
          type: number
          description: The number of profiles which matched the trend. If the trend analyzes events, this value is `0.0`.
          format: double
      required:
        - countedClients
        - countedEvents
        - trendId
    analytics-EventExpression:
      type: object
      description: The `attribute` object is an event attribute that must exist in the analyzed event. The `constraint` object is a condition that the attribute must meet.
      properties:
        attribute:
          $ref: "#/components/schemas/analytics-EventAttribute"
        constraint:
          $ref: "#/components/schemas/analytics-EventConstraint"
    analytics-EventAttribute:
      description: Definition of an event attribute to access.
      oneOf:
        - $ref: "#/components/schemas/analytics-ParameterEventAttribute"
        - $ref: "#/components/schemas/analytics-RunningAggregateEventAttribute"
        - $ref: "#/components/schemas/analytics-ExpressionEventAttribute"
        - $ref: "#/components/schemas/analytics-SpecialEventAttribute"
    analytics-ParameterEventAttribute:
      type: object
      title: Event parameter
      properties:
        type:
          enum:
            - PARAM
          description: This `type` refers to parameters in an event.
        param:
          type: string
          description: Name of the parameter
        id:
          type: integer
          description: Only present in responses. ID of this attribute in the database.
      required:
        - type
        - param
    analytics-RunningAggregateEventAttribute:
      type: object
      title: Event aggregate
      properties:
        type:
          type: string
          enum:
            - RUNNING_AGGREGATE
          description: This type refers to event aggregates. You must provide the ID of the aggregate.
        id:
          type: string
          format: uuid
          description: ID of the event aggregate
      required:
        - type
        - id
    analytics-ExpressionEventAttribute:
      type: object
      title: Expression
      properties:
        type:
          type: string
          enum:
            - EXPRESSION
          description: This type refers to expressions. You must provide the ID of the expression.
        id:
          type: string
          format: uuid
          description: ID of the expression
      required:
        - type
        - id
    analytics-SpecialEventAttribute:
      type: object
      title: Special property
      properties:
        type:
          type: string
          enum:
            - SPECIAL
          description: This type lets you access special properties of an event.
        special:
          $ref: "#/components/schemas/analytics-SpecialTypeAttribute"
      required:
        - type
        - special
    analytics-EmptyEventAttribute:
      type: object
      title: No attribute
      properties:
        type:
          type: string
          enum:
            - EMPTY
          description: Can be used for analyses whose result isn't based on an attribute, such as `EXISTS`. **Can't be used with `constraint`**.
      required:
        - type
    analytics-SpecialTypeAttribute:
      type: string
      description: The type of special attribute you want to use
      enum:
        - TIMESTAMP
    analytics-EventConstraint:
      description: |
        This object defines the logic to apply to the `attribute`, and the values to compare it against (if required). 

        **The analytics engine doesn't check if the data types match - you need to ensure that your data types are consistent in the data you send to the database**.
      oneOf:
        - $ref: "#/components/schemas/analytics-BoolConstraintEventConstraint"
        - $ref: "#/components/schemas/analytics-StringZeroConstraintEventConstraint"
        - $ref: "#/components/schemas/analytics-StringOneConstraintEventConstraint"
        - $ref: "#/components/schemas/analytics-NumberOneConstraintEventConstraint"
        - $ref: "#/components/schemas/analytics-NumberTwoConstraintEventConstraint"
        - $ref: "#/components/schemas/analytics-StringArrayConstraintEventConstraint"
        - $ref: "#/components/schemas/analytics-StringArrayOneConstraintEventConstraint"
        - $ref: "#/components/schemas/analytics-NullConstraintEventConstraint"
        - $ref: "#/components/schemas/analytics-DateZeroConstraintEventConstraint"
        - $ref: "#/components/schemas/analytics-DateOneConstraintEventConstraint"
        - $ref: "#/components/schemas/analytics-DateTwoConstraintEventConstraint"
        - $ref: "#/components/schemas/analytics-DateFilterEventConstraint"
    analytics-BoolConstraintEventConstraint:
      type: object
      title: Boolean
      properties:
        type:
          type: string
          enum:
            - BOOL
        logic:
          type: string
          description: Boolean logic. Empty (zero-length) strings, `0`, and `"0"` are considered false. Null values are false.
          enum:
            - IS_TRUE
            - IS_FALSE
      required:
        - type
        - logic
    analytics-StringZeroConstraintEventConstraint:
      type: object
      title: Check empty
      properties:
        type:
          type: string
          enum:
            - STRING_ZERO
        logic:
          type: string
          description: Checks if a string is empty (zero-length). Null value is considered empty. A string of whitespace characters is NOT empty.
          enum:
            - IS_EMPTY
            - IS_NOT_EMPTY
      required:
        - type
        - logic
    analytics-StringOneConstraintEventConstraint:
      type: object
      title: String
      properties:
        type:
          type: string
          enum:
            - STRING_ONE
          description: This type is used to test values that are a single string.
        logic:
          type: string
          description: Logic of the test. For example, if the logic is `CONTAIN` and the `value` returns "foo", the expression checks if the `attribute` (sibling object to `constraint`) contains the string "foo".
          enum:
            - CONTAIN
            - NOT_CONTAIN
            - EQUAL
            - NOT_EQUAL
            - STARTS_WITH
            - REGEXP
            - ENDS_WITH
        value:
          $ref: "#/components/schemas/analytics-EventValue"
      required:
        - type
        - logic
        - value
    analytics-NumberOneConstraintEventConstraint:
      type: object
      title: Number
      properties:
        type:
          type: string
          enum:
            - NUMBER_ONE
          description: This type is used to test values that are a single number
        logic:
          type: string
          description: Logic of the test. For example, if the logic is `EQUAL` and the `value` returns 15, the expression checks if the `attribute` (sibling object to `constraint`) is 15.
          enum:
            - EQUAL
            - NOT_EQUAL
            - LESS
            - MORE
            - MORE_OR_EQUAL
            - LESS_OR_EQUAL
        value:
          $ref: "#/components/schemas/analytics-EventValue"
      required:
        - type
        - logic
        - value
    analytics-NumberTwoConstraintEventConstraint:
      type: object
      title: Two numbers
      properties:
        type:
          type: string
          enum:
            - NUMBER_TWO
          description: Checks if the `attribute` is between two numbers, defined in `value1` and `value2`.
        logic:
          type: string
          enum:
            - BETWEEN
        value1:
          $ref: "#/components/schemas/analytics-EventValue"
        value2:
          $ref: "#/components/schemas/analytics-EventValue"
      required:
        - type
        - logic
        - value1
        - value2
    analytics-StringArrayConstraintEventConstraint:
      type: object
      title: Check if string in array
      properties:
        type:
          type: string
          enum:
            - STRING_ARRAY
          description: "`value` needs to return an array of strings"
        logic:
          type: string
          description: You can check if the value from `attribute` is in the array defined in `value`
          enum:
            - IN
            - NOT_IN
        value:
          $ref: "#/components/schemas/analytics-EventValue"
      required:
        - type
        - logic
        - value
    analytics-StringArrayOneConstraintEventConstraint:
      type: object
      title: Other string array tests
      properties:
        type:
          type: string
          enum:
            - ARRAY_STRING_ONE_DEPRECATED
          description: "`value` should be an array"
        logic:
          type: string
          description: |
            - CONTAIN/NOT_CONTAIN test if any item in the array contains/doesn't contain the value from `attribute`
            - EQUAL/NOT_EQUAL test if any item in the array is/isn't identical to the value from `attribute`
            - STARTS_WITH/ENDS_WITH test if any item in the array starts/ends with the value from `attribute`
            - REGEXP tests if any item in the array matches the regular expression from `attribute`
          enum:
            - CONTAIN
            - NOT_CONTAIN
            - EQUAL
            - NOT_EQUAL
            - STARTS_WITH
            - REGEXP
            - ENDS_WITH
        value:
          $ref: "#/components/schemas/analytics-EventValue"
      required:
        - type
        - logic
        - value
    analytics-NullConstraintEventConstraint:
      type: object
      title: Check if null
      properties:
        type:
          type: string
          enum:
            - "NULL"
        logic:
          type: string
          description: Checks if the attribute is or isn't null. Empty strings, `0`, and negative numbers are NOT null. String `"null"` is NOT null.
          enum:
            - IS_NULL
            - IS_NOT_NULL
      required:
        - type
        - logic
    analytics-DateZeroConstraintEventConstraint:
      type: object
      title: Current date
      properties:
        type:
          type: string
          enum:
            - DATE_ZERO
          description: Compare a date from `attribute` to the current date
        logic:
          type: string
          enum:
            - MATCHES_CURRENT_DAY
            - MATCHES_CURRENT_HOUR
            - MATCHES_CURRENT_MONTH
            - MATCHES_CURRENT_YEAR
          description: Logic to apply to the date from `attribute`
      required:
        - type
        - logic
    analytics-DateOneConstraintEventConstraint:
      type: object
      title: Date
      properties:
        type:
          type: string
          enum:
            - DATE_ONE
        logic:
          type: string
          description: Checks how the date from `attribute` compares to the one in `value`. For example, MORE returns true if `attribute` is the later date.
          enum:
            - LESS
            - MORE
            - LESS_OR_EQUAL
            - MORE_OR_EQUAL
        value:
          $ref: "#/components/schemas/analytics-EventValue"
      required:
        - type
        - logic
        - value
    analytics-DateTwoConstraintEventConstraint:
      type: object
      title: Date range
      properties:
        type:
          type: string
          enum:
            - DATE_TWO
        logic:
          type: string
          description: Checks if the date from `attribute` is between the dates from `value1` and `value2`.
          enum:
            - BETWEEN
        value1:
          $ref: "#/components/schemas/analytics-EventValue"
        value2:
          $ref: "#/components/schemas/analytics-EventValue"
      required:
        - type
        - logic
        - value1
        - value2
    analytics-EventValue:
      description: The value to test `attribute` against.
      oneOf:
        - $ref: "#/components/schemas/analytics-ConstantValue"
        - $ref: "#/components/schemas/analytics-VariableValue"
        - $ref: "#/components/schemas/analytics-ClientParameter"
        - $ref: "#/components/schemas/analytics-EventParameter"
    analytics-ConstantValue:
      type: object
      title: Static value
      properties:
        type:
          type: string
          enum:
            - CONSTANT
        constant:
          description: |
            The value can't:
              - be longer than 21000 characters if it's a string
              - be larger than 65000 items if it's an array. Strings in the array can't be longer than 21000 characters.
          oneOf:
            - type: string
              maxLength: 21000
            - type: number
            - type: boolean
            - type: array
              maxItems: 65000
              items:
                type: string
                maxLength: 21000
      required:
        - type
        - constant
    analytics-VariableValue:
      type: object
      title: Dynamic value
      properties:
        type:
          type: string
          enum:
            - VARIABLE
          description: |
            This type is called a Dynamic Key in the Synerise Portal. It can be used to let other analytic components, such as dashboards, insert a value.

            The variable value can't:
              - be longer than 21000 characters if it's a string
              - be larger than 65000 items if it's an array. Strings in the array can't be longer than 21000 characters.
        name:
          type: string
          description: The name of the dynamic key
        defaultValue:
          type: string
          maxLength: 21000
          description: The default value to use
      required:
        - type
        - name
        - defaultValue
    analytics-ClientParameter:
      type: object
      title: Profile attribute
      properties:
        type:
          type: string
          enum:
            - CLIENT
        attribute:
          $ref: "#/components/schemas/analytics-ProfileAttribute"
      required:
        - type
        - attribute
    analytics-EventParameter:
      type: object
      title: Event parameter
      properties:
        type:
          type: string
          enum:
            - EVENT
        attribute:
          $ref: "#/components/schemas/analytics-EventAttribute"
      required:
        - type
        - attribute
    analytics-ExpressionPreviewRequestWithClient:
      type: object
      properties:
        identifierValue:
          $ref: "#/components/schemas/analytics-identifierValue"
        expression:
          $ref: "#/components/schemas/analytics-ClientExpressionEntity"
      required:
        - expression
        - identifierValue
    analytics-ExpressionTypedCalculationResponse:
      type: object
      properties:
        expressionId:
          type: string
          format: uuid
          description: Random ID for this expression preview
        clientId:
          type: integer
          format: int64
          description: ID of the profile
        title:
          type: string
          description: Expression title
        result:
          description: Result of the expression
          anyOf:
            - type: string
            - type: boolean
            - type: number
            - type: object
            - type: array
              items: {}
        variables:
          $ref: "#/components/schemas/analytics-variables"
      required:
        - clientId
        - expressionId
        - result
        - title
        - variables
    analytics-directoryId:
      type: string
      format: uuid
      description: Unique ID of the directory which contains this analysis. A 'default' directory is automatically created in every workspace.
    analytics-AggregateListItem:
      allOf:
        - type: object
          properties:
            aggregateType:
              $ref: "#/components/schemas/analytics-AggregateType"
        - $ref: "#/components/schemas/analytics-ListAnalyticsItemCommon"
      required:
        - aggregateType
    analytics-ExpressionListItem:
      allOf:
        - type: object
          properties:
            action:
              $ref: "#/components/schemas/analytics-Action"
              nullable: true
            type:
              $ref: "#/components/schemas/analytics-ExpressionType"
          required:
            - action
            - type
        - $ref: "#/components/schemas/analytics-ListAnalyticsItemCommon"
    analytics-MetricListItem:
      allOf:
        - type: object
          properties:
            action:
              $ref: "#/components/schemas/analytics-Action"
            actions:
              type: array
              items:
                $ref: "#/components/schemas/analytics-Action"
            eventName:
              $ref: "#/components/schemas/analytics-ActionName"
            eventNames:
              type: array
              items:
                $ref: "#/components/schemas/analytics-ActionName"
            actionId:
              $ref: "#/components/schemas/analytics-ActionId"
            actionIds:
              type: array
              items:
                $ref: "#/components/schemas/analytics-ActionId"
            isNumber:
              $ref: "#/components/schemas/analytics-isNumber"
            isMetricHistogram:
              $ref: "#/components/schemas/analytics-isMetricHistogram"
            isReportMetric:
              $ref: "#/components/schemas/analytics-isReportMetric"
        - $ref: "#/components/schemas/analytics-ListAnalyticsItemCommon"
    analytics-ReportListItem:
      allOf:
        - type: object
          properties:
            isMultiMetric:
              type: boolean
              description: True when the report has more than one metric.
          required:
            - isMultiMetric
        - $ref: "#/components/schemas/analytics-ListAnalyticsItemCommon"
    analytics-SegmentationListItem:
      allOf:
        - type: object
          properties:
            segments:
              type: integer
            starred:
              type: boolean
              description: "`true` if the segmentation is added to starred items"
            isPredefinedAnalytic:
              $ref: "#/components/schemas/analytics-isPredefinedAnalytic"
            sharing:
              $ref: "#/components/schemas/analytics-SharingData"
        - $ref: "#/components/schemas/analytics-ListAnalyticsItemCommon"
    analytics-usedAt:
      type: string
      format: date-time
      description: The date and time when the item was last used
      nullable: true
    analytics-PathNamespace:
      type: string
      enum:
        - profiles
    analytics-PathIdentifierType:
      type: string
      enum:
        - id
        - uuid
        - email
        - custom_identify
    analytics-SharingProcessSimple:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        shareType:
          type: string
          enum:
            - CROSSWORKSPACE
            - INTERNAL
        automationId:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
            - DELETED
      required:
        - id
        - name
        - shareType
        - status
    analytics-SharingData:
      type: object
      properties:
        process:
          $ref: "#/components/schemas/analytics-SharingProcessSimple"
        attribute:
          $ref: "#/components/schemas/analytics-AttributeData"
      required:
        - process
        - attribute
    analytics-AttributeData:
      type: object
      properties:
        name:
          type: string
        id:
          type: integer
          format: int64
      required:
        - name
        - id
    analytics-DateFilterEventConstraint:
      type: object
      title: Date filter
      properties:
        type:
          type: string
          enum:
            - DATE_FILTER
        logic:
          type: string
          enum:
            - DATE_FILTER
          description: Checks if the date from `attribute` matches a date filter.
        value:
          $ref: "#/components/schemas/analytics-dateFilter"
      required:
        - type
        - logic
        - value
    api-service-TransactionMeta-apiv4:
      type: object
      description: |
        Any custom parameters.   
        If you want to send `promotionCode` and `quantityToRedeem`, contact the Synerise support to enable it for your workspace.   
        Include these parameters in the `metadata` object, so Synerise can redeem it automatically.
      additionalProperties: true
      properties:
        promotionCode:
          $ref: "#/components/schemas/api-service-promotionCode-apiv4"
        quantityToRedeem:
          $ref: "#/components/schemas/api-service-quantityToRedeem-apiv4"
    api-service-JWTtoken-apiv4:
      type: object
      properties:
        token:
          type: string
          description: "[JWT](https://jwt.io/) token"
          example: eyJhbGciOiinvalidI6IkFQSSIsInJsbSI6ImNsaWVudCIsImN0ZCI6MTUyODM1NTgzMjEzOCwiZW1sIjoia3J6eXN6dG9mLmN6ZXJlcGFrQGdtYWlsLmNvbSIsImlzcyI6IlN5bmVyaXNlIiwiYnBpIjo1OTQsImNsSWQiOjUyNTQ0NjU3NCwinvalidx2XwJp-QBZ94d_EEKf41KtDCE33KhP_vTAYrs-JzbnIHgKRvG6ZRwsNOL8OTnbfbUZH4XYaqBB_tZTPPKfzHutP6GEGp7PLtu2E92JbChkVyrn8VCQ5v4z2e1-zsdgbmWcQk2g9RydaydO6NYO55suT3Hz2ZRv0AYLsG8rM1biZGdREWx9OaknVVuIo2ivehBiukL7VQ6Bu8ugjep3mn-z666a-nCMh6ZuASiQ6Geq0NSWmdDQIoCa5Hg44KzMfGRlCR2uKBXeHTD0SkwJ1VJM0sHNKwSfMXKpaX8OJ5wUJpgCzDzQwKVgxgWFp4eO_sbcvxWrpI7W0lfdCy1WKirnZ6Uh3uJ06v97GQDAQqVgBZFEpS47MrGZhTNuAG4ZbfYO7yyxVO8AHQbEC-UvZ-8DC1XZjvQ6S1uNqQIlVGcthnrxg8K6vKVhNzu6ifQI0bbsCl8bGsKkXOEK1pKR3ekckcSjNeeY2LrcdXs8F2gtkm0TjXU
    api-service-recommendationEventParams-apiv4:
      type: object
      description: |
        Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

        Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

        <span style="color:red"><strong>WARNING:</strong></span>
        - If you want to send the `email` param, it must be exactly the same as the email of the profile who generated the event.
        - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
        <code>modifiedBy</code><br>
        <code>apiKey</code><br>
        <code>eventUUID</code><br>
        <code>ip</code><br>
        <code>time</code><br>
        <code>businessProfileId</code>
      properties:
        productId:
          $ref: "#/components/schemas/api-service-ItemSku-apiv4"
        name:
          $ref: "#/components/schemas/api-service-ItemName-apiv4"
        source:
          $ref: "#/components/schemas/api-service-eventSource-apiv4"
        campaignHash:
          $ref: "#/components/schemas/api-service-CampaignHash-apiv4"
        url:
          $ref: "#/components/schemas/api-service-inBodyResourceUrl-apiv4"
        category:
          $ref: "#/components/schemas/api-service-ItemCategory-apiv4"
    api-service-AiCompatBatchEventRequest-apiv4:
      type: object
      properties:
        eventType:
          type: string
          enum:
            - item.search.click
            - suggestion.search.click
            - product.search.click
            - recommendation.click
            - recommendation.view
          description: A request can only include events of the same type.
        items:
          type: array
          description: An array of events
          items:
            oneOf:
              - $ref: "#/components/schemas/api-service-ItemSearchClickEventDataCompat-apiv4"
              - $ref: "#/components/schemas/api-service-SuggestionSearchClickEventDataCompat-apiv4"
              - $ref: "#/components/schemas/api-service-RecommendationViewEventDataCompat-apiv4"
              - $ref: "#/components/schemas/api-service-RecommendationClickEventDataCompat-apiv4"
              - $ref: "#/components/schemas/api-service-ProductSearchClickEventDataCompat-apiv4"
    api-service-ItemSearchClickEventDataCompat-apiv4:
      title: item.search.click
      type: object
      required:
        - correlationId
        - clientUUID
        - position
        - searchType
        - item
      properties:
        correlationId:
          $ref: "#/components/schemas/api-service-CorrelationId-apiv4"
        clientUUID:
          $ref: "#/components/schemas/api-service-inBodyClientUuid-apiv4"
        position:
          $ref: "#/components/schemas/api-service-ItemPosition-apiv4"
        searchType:
          $ref: "#/components/schemas/api-service-SearchType-apiv4"
        item:
          $ref: "#/components/schemas/api-service-Item-apiv4"
        EventTimestamp:
          $ref: "#/components/schemas/api-service-Time-apiv4"
      additionalProperties:
        description: |
          Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

          Events accept custom, free-form parameters, with the following restrictions:

            <span style="color:red"><strong>WARNING:</strong></span>
            - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
            - Some params are reserved for system use. If you send them, they are ignored or overwritten with system-assigned values:<br>
            <code>modifiedBy</code><br>
            <code>apiKey</code><br>
            <code>eventUUID</code><br>
            <code>ip</code><br>
            <code>time</code><br>
            <code>businessProfileId</code>
    api-service-SuggestionSearchClickEventDataCompat-apiv4:
      title: suggestion.search.click
      type: object
      required:
        - correlationId
        - clientUUID
        - position
        - searchType
        - suggestion
      properties:
        correlationId:
          $ref: "#/components/schemas/api-service-CorrelationId-apiv4"
        clientUUID:
          $ref: "#/components/schemas/api-service-inBodyClientUuid-apiv4"
        position:
          $ref: "#/components/schemas/api-service-ItemPosition-apiv4"
        searchType:
          $ref: "#/components/schemas/api-service-SearchType-apiv4"
        EventTimestamp:
          $ref: "#/components/schemas/api-service-Time-apiv4"
        suggestion:
          $ref: "#/components/schemas/api-service-Suggestion-apiv4"
      additionalProperties:
        description: |
          Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

          Events accept custom, free-form parameters, with the following restrictions:

            <span style="color:red"><strong>WARNING:</strong></span>
            - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
            - Some params are reserved for system use. If you send them, they are ignored or overwritten with system-assigned values:<br>
            <code>modifiedBy</code><br>
            <code>apiKey</code><br>
            <code>eventUUID</code><br>
            <code>ip</code><br>
            <code>time</code><br>
            <code>businessProfileId</code>
    api-service-RecommendationViewEventDataCompat-apiv4:
      title: recommendation.view
      type: object
      required:
        - correlationId
        - clientUUID
        - items
      properties:
        correlationId:
          $ref: "#/components/schemas/api-service-CorrelationId-apiv4"
        clientUUID:
          $ref: "#/components/schemas/api-service-inBodyClientUuid-apiv4"
        items:
          $ref: "#/components/schemas/api-service-RecommendationItems-apiv4"
        EventTimestamp:
          $ref: "#/components/schemas/api-service-Time-apiv4"
        campaignId:
          $ref: "#/components/schemas/api-service-CampaignId-apiv4"
      additionalProperties:
        description: |
          Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

          Events accept custom, free-form parameters, with the following restrictions:

            <span style="color:red"><strong>WARNING:</strong></span>
            - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
            - Some params are reserved for system use. If you send them, they are ignored or overwritten with system-assigned values:<br>
            <code>modifiedBy</code><br>
            <code>apiKey</code><br>
            <code>eventUUID</code><br>
            <code>ip</code><br>
            <code>time</code><br>
            <code>businessProfileId</code>
    api-service-RecommendationClickEventDataCompat-apiv4:
      title: recommendation.click
      type: object
      required:
        - correlationId
        - clientUUID
        - item
      properties:
        correlationId:
          $ref: "#/components/schemas/api-service-CorrelationId-apiv4"
        clientUUID:
          $ref: "#/components/schemas/api-service-inBodyClientUuid-apiv4"
        item:
          $ref: "#/components/schemas/api-service-Item-apiv4"
        campaignId:
          $ref: "#/components/schemas/api-service-CampaignId-apiv4"
        sessionId:
          type: string
          description: ID of the user session
        EventTimestamp:
          $ref: "#/components/schemas/api-service-Time-apiv4"
      additionalProperties:
        description: |
          Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

          Events accept custom, free-form parameters, with the following restrictions:

            <span style="color:red"><strong>WARNING:</strong></span>
            - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
            - Some params are reserved for system use. If you send them, they are ignored or overwritten with system-assigned values:<br>
            <code>modifiedBy</code><br>
            <code>apiKey</code><br>
            <code>eventUUID</code><br>
            <code>ip</code><br>
            <code>time</code><br>
            <code>businessProfileId</code>
    api-service-ProductSearchClickEventDataCompat-apiv4:
      title: product.search.click
      deprecated: true
      type: object
      required:
        - correlationId
        - clientUUID
        - position
        - searchType
        - productId
      properties:
        correlationId:
          $ref: "#/components/schemas/api-service-CorrelationId-apiv4"
        clientUUID:
          $ref: "#/components/schemas/api-service-inBodyClientUuid-apiv4"
        position:
          $ref: "#/components/schemas/api-service-ItemPosition-apiv4"
        searchType:
          $ref: "#/components/schemas/api-service-SearchType-apiv4"
        productId:
          $ref: "#/components/schemas/api-service-Item-apiv4"
        EventTimestamp:
          $ref: "#/components/schemas/api-service-Time-apiv4"
      additionalProperties:
        description: |
          Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

          Events accept custom, free-form parameters, with the following restrictions:

            <span style="color:red"><strong>WARNING:</strong></span>
            - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
            - Some params are reserved for system use. If you send them, they are ignored or overwritten with system-assigned values:<br>
            <code>modifiedBy</code><br>
            <code>apiKey</code><br>
            <code>eventUUID</code><br>
            <code>ip</code><br>
            <code>time</code><br>
            <code>businessProfileId</code>
    api-service-RecommendationViewEventData-apiv4:
      type: object
      allOf:
        - type: object
          required:
            - params
          properties:
            params:
              type: object
              description: |
                Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

                Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

                  <span style="color:red"><strong>WARNING:</strong></span>
                  - If you want to send the `email` param, it must be exactly the same as the email of the profile who generated the event.
                  - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
                  <code>modifiedBy</code><br>
                  <code>apiKey</code><br>
                  <code>eventUUID</code><br>
                  <code>ip</code><br>
                  <code>time</code><br>
                  <code>businessProfileId</code>
              required:
                - items
                - correlationId
              properties:
                items:
                  $ref: "#/components/schemas/api-service-RecommendationItems-apiv4"
                correlationId:
                  $ref: "#/components/schemas/api-service-CorrelationId-apiv4"
                campaignId:
                  $ref: "#/components/schemas/api-service-CampaignId-apiv4"
              additionalProperties: true
        - $ref: "#/components/schemas/api-service-EventBase-apiv4"
    api-service-promotionCode-apiv4:
      type: string
      description: |
        Unique promotion ID.  
        If you want to send `promotionCode` and `quantityToRedeem`, contact the Synerise support to enable it for your workspace.  
        Include these parameters in the metadata object, so Synerise can redeem it automatically.
    api-service-quantityToRedeem-apiv4:
      type: integer
      description: |
        The number of items to which the promotion has been applied.  
        If you want to send `promotionCode` and `quantityToRedeem`, contact the Synerise support to enable it for your workspace.  
        Include these parameters in the metadata object, so Synerise can redeem it automatically.
    api-service-ItemSearchClickEventData-apiv4:
      type: object
      allOf:
        - type: object
          required:
            - params
          properties:
            params:
              type: object
              description: |
                Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

                Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

                  <span style="color:red"><strong>WARNING:</strong></span>
                  - If you want to send the `email` param, it must be exactly the same as the email of the profile who generated the event.
                  - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
                  <code>modifiedBy</code><br>
                  <code>apiKey</code><br>
                  <code>eventUUID</code><br>
                  <code>ip</code><br>
                  <code>time</code><br>
                  <code>businessProfileId</code>
              required:
                - item
                - correlationId
                - position
                - searchType
              properties:
                item:
                  $ref: "#/components/schemas/api-service-Item-apiv4"
                correlationId:
                  $ref: "#/components/schemas/api-service-CorrelationId-apiv4"
                position:
                  $ref: "#/components/schemas/api-service-ItemPosition-apiv4"
                searchType:
                  $ref: "#/components/schemas/api-service-SearchType-apiv4"
              additionalProperties: true
        - $ref: "#/components/schemas/api-service-EventBase-apiv4"
    api-service-Currency-apiv4:
      type: string
      description: The currency of the transaction in ISO 4217
      example: USD
    api-service-OrderId-apiv4:
      type: string
      description: |-
        ID of the transaction.
        If you want to be able to overwrite this transaction in the future, you use `eventSalt`. If you send a transaction with the same `orderId` multiple times, the system generates multiple transaction events.
      example: be466362-71e9-4bdd-ad11-bfacead5276b
    api-service-ClientChangeset-apiv4:
      type: object
      properties:
        address:
          $ref: "#/components/schemas/api-service-inBodyClientAddress-apiv4"
        agreements:
          $ref: "#/components/schemas/api-service-Agreements-apiv4"
        attributes:
          $ref: "#/components/schemas/api-service-Attributes-apiv4-apiv4"
        avatarUrl:
          $ref: "#/components/schemas/api-service-inBodyClientAvatarUrl-apiv4"
        birthDate:
          $ref: "#/components/schemas/api-service-inBodyClientBirthDate-apiv4"
        city:
          $ref: "#/components/schemas/api-service-inBodyClientCity-apiv4"
        company:
          $ref: "#/components/schemas/api-service-inBodyClientCompany-apiv4"
        countryCode:
          $ref: "#/components/schemas/api-service-inBodyClientCountryCode-apiv4"
        customId:
          $ref: "#/components/schemas/api-service-inBodyClientCustomId-apiv4"
        displayName:
          $ref: "#/components/schemas/api-service-inBodyClientDisplayName-apiv4"
        email:
          $ref: "#/components/schemas/api-service-inBodyClientEmail-apiv4"
        firstName:
          $ref: "#/components/schemas/api-service-inBodyClientFirstName-apiv4"
        lastName:
          $ref: "#/components/schemas/api-service-inBodyClientLastName-apiv4"
        phone:
          $ref: "#/components/schemas/api-service-inBodyClientPhone-apiv4"
        province:
          $ref: "#/components/schemas/api-service-inBodyClientProvince-apiv4"
        sex:
          $ref: "#/components/schemas/api-service-inBodyClientSex-apiv4"
        zipCode:
          $ref: "#/components/schemas/api-service-inBodyClientZipCode-apiv4"
    api-service-ClientId-apiv4:
      description: Unique ID. This ID is generated by the system during profile creation.
      type: integer
      format: int64
      example: 433230297
    api-service-TagAssociation-apiv4:
      type: object
      properties:
        clientId:
          $ref: "#/components/schemas/api-service-ClientId-apiv4"
        id:
          type: integer
          format: int64
          description: ID of the assignment
          example: 73
        tagId:
          type: integer
          format: int64
          description: ID of the tag
          example: 645
    api-service-Error-apiv4:
      type: object
      properties:
        code:
          type: integer
          format: int32
          example: 12082
          description: A numeric identifier of the error type
        field:
          type: string
          example: countryCode
          description: Field in the request body that caused the error
        message:
          type: string
          example: Country Code must have 0 or 3 characters as per ISO format.
          description: A detailed description of the problem
        rejectedValue:
          type: string
          example: Poland
          description: The value that caused the error
    api-service-RegularUnitPrice-apiv4:
      description: The regular price of the items
      required:
        - amount
        - currency
      type: object
      properties:
        amount:
          type: number
          minimum: 0
          description: The price of the items
        currency:
          $ref: "#/components/schemas/api-service-Currency-apiv4"
    api-service-DiscountedUnitPrice-apiv4:
      required:
        - amount
        - currency
      description: Price after discounts
      type: object
      properties:
        amount:
          type: number
          minimum: 0
          description: The amount of currency
        currency:
          $ref: "#/components/schemas/api-service-Currency-apiv4"
    api-service-FinalUnitPrice-apiv4:
      description: Final price per unit. This value must be multiplied by `quantity` and added to `revenue`.
      required:
        - amount
        - currency
      type: object
      properties:
        amount:
          type: number
          minimum: 0
          description: The price of the items
          example: 3.25
        currency:
          $ref: "#/components/schemas/api-service-Currency-apiv4"
    api-service-inBodyResourceUrl-apiv4:
      type: string
      description: URL address of the resource
    api-service-ItemSku-apiv4:
      type: string
      example: "189784563455"
      description: SKU of the item
    api-service-ClientCartEventRequest-apiv4:
      allOf:
        - $ref: "#/components/schemas/api-service-EventBase-apiv4"
        - required:
            - params
          type: object
          properties:
            params:
              type: object
              description: |
                Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

                Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

                  <span style="color:red"><strong>WARNING:</strong></span>
                  - If you want to send the `email` param, it must be exactly the same as the email of the profile who generated the event.
                  - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
                  <code>modifiedBy</code><br>
                  <code>apiKey</code><br>
                  <code>eventUUID</code><br>
                  <code>ip</code><br>
                  <code>time</code><br>
                  <code>businessProfileId</code>
              required:
                - sku
                - source
                - finalUnitPrice
                - quantity
              properties:
                sku:
                  $ref: "#/components/schemas/api-service-ItemSku-apiv4"
                name:
                  $ref: "#/components/schemas/api-service-ItemName-apiv4"
                category:
                  $ref: "#/components/schemas/api-service-ItemCategory-apiv4"
                categories:
                  $ref: "#/components/schemas/api-service-ItemCategories-apiv4"
                offline:
                  $ref: "#/components/schemas/api-service-Offline-apiv4"
                source:
                  $ref: "#/components/schemas/api-service-eventSource-apiv4"
                regularUnitPrice:
                  $ref: "#/components/schemas/api-service-RegularUnitPrice-apiv4"
                discountedUnitPrice:
                  $ref: "#/components/schemas/api-service-DiscountedUnitPrice-apiv4"
                finalUnitPrice:
                  $ref: "#/components/schemas/api-service-FinalUnitPrice-apiv4"
                ItemUrlAddress:
                  $ref: "#/components/schemas/api-service-ItemUrlAddress-apiv4"
                producer:
                  $ref: "#/components/schemas/api-service-Producer-apiv4"
                quantity:
                  $ref: "#/components/schemas/api-service-Quantity-apiv4"
              additionalProperties: true
    api-service-inBodyClientDeviceId-apiv4:
      type: string
      description: Unique Android or iOS device ID
    api-service-eventLabel-apiv4:
      type: string
      example: Human-readable label
      minLength: 1
      description: This parameter is required, but not saved in the database. It can't be used in Analytics, Automations, and so on.
    api-service-Time-apiv4:
      type: string
      description: |
        Time when the event occurred, in [ISO 8601](https://wikipedia.org/wiki/ISO_8601). 

        This time isn't affected and doesn't affect the timezone of your workspace - you can send events with a timezone different than that of the workspace. Synerise calculates the times into UTC standard when saving events in the database.

        If not defined, the backend inserts the time of receiving the event.

        A time with a "Z" at the end (for example, `2022-10-14T12:02:06Z`) denotes a time in the UTC standard.

        If you want to send time in a different timezone, you can do this by appending `{+|-}hh:mm` at the end of the string.  

        Note that if the timezone is ahead (+) of UTC, the UTC time is calculated by subtraction. When the timezone is behind (-) UTC, the UTC time is calculated by addition.  
        For example:
          - if your timezone is UTC+1, append `+01:00`. When you send `2022-10-14T15:00:000+01:00`, it is saved in the database as `2022-10-14T14:00:000Z`
          - if your timezone is UTC-8, append `-08:00`. When you send `2022-10-14T22:00:000-08:00`, it is saved in the database as `2022-10-15T06:00:000Z` (note that the date also changes between timezones in this example)

        **IMPORTANT**: If you send an event with a future time, the parameter is rejected and the time of receiving the event is saved as the occurrence time. For example, if your timezone is UTC+1 and you send the event at 15:00 local time, future times are:  
        - later than 15:00 local time
        - later than 14:00 UTC

        When you retrieve an event, its time is always shown as UTC. The original time string that you sent (even if it was a future time and was rejected) can be retrieved with the [activities](https://developers.synerise.com/DataManagement/DataManagement.html#tag/Activities) endpoints, as `snr-original-time`.
      example: 2019-02-07T09:53:56.999+00:00
    api-service-ApplicationstartedRequest-apiv4:
      allOf:
        - $ref: "#/components/schemas/api-service-EventBase-apiv4"
        - required:
            - params
          type: object
          properties:
            params:
              $ref: "#/components/schemas/api-service-ClientApplicationStartedEventParams-apiv4"
    api-service-GetClientevents-HTTP200-apiv4:
      type: object
      properties:
        time:
          type: string
          description: |
            Time when the event occurred. 

            This is the time that:
            - is sent as `recordedAt` to **v4/transactions/** endpoints
            - is sent as `time` to **v4/events/** endpoints
            - is the occurrence time of system events

            If the event had no time provided when sending, the time of saving in the database is used.

            If the event had a future time when sending, it was rejected and the time of saving in the database is used.

            This is the value that needs to be used as `time` (`recordedAt` in v4/transactions endpoints) when overwriting events by using eventSalt.
        action:
          type: string
          example: client.updateData
          description: The system name for the action
        label:
          $ref: "#/components/schemas/api-service-eventLabel-apiv4"
        client:
          $ref: "#/components/schemas/api-service-Client-apiv4"
        params:
          type: object
          properties:
            eventCreateTime:
              type: string
              description: |
                Time when the event was received. If the event had no time or a future time, this value is used as the time when the event occurred.

                This parameter does not exist in system events.

                When you overwrite an event with eventSalt, this value changes to the time of overwriting.
              format: date-time
              example: 2022-11-23T18:39:26.789Z
            ip:
              description: IP of the source device. This parameter does not exist in system events.
          additionalProperties:
            description: Additional properties depending on event type and custom parameters.
          description: |
            Details of the event, depending on event type and the requirements of your own system. This can be almost any type of data.

              <span style="color:red"><strong>WARNING:</strong></span>
              - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
              - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:
              <details><summary>Click to expand the list of reserved params</summary>
              <code>modifiedBy</code><br>
              <code>apiKey</code><br>
              <code>eventUUID</code><br>
              <code>ip</code><br>
              <code>time</code><br>
              <code>businessProfileId</code>
              </details>
    api-service-LinkaClientdeviceRequest-apiv4:
      type: object
      required:
        - deviceId
        - type
        - registrationId
      properties:
        deviceId:
          $ref: "#/components/schemas/api-service-inBodyClientDeviceId-apiv4"
        registrationId:
          type: string
          description: Registration ID for [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging/)
        type:
          type: string
          description: Device type
          enum:
            - android
            - ios
            - windows
        bluetoothAddress:
          type: string
          description: Bluetooth MAC address of the device
        macAddress:
          type: string
          description: MAC address of the network adapter
        manufacturer:
          type: string
          description: Manufacturer of the device
        model:
          type: string
          description: Model of the device
        osVersion:
          type: string
          description: Operating system of the device
        product:
          type: string
          description: Additional information about the OS on the device
          example: a51ul_htc_europe
        screenHeight:
          type: integer
          format: int32
          description: Screen height in pixels
        screenWidth:
          type: integer
          format: int32
          description: Screen width in pixels
        publicKey:
          type: string
          description: Public key used to encrypt push messages
    api-service-inBodyClientCompany-apiv4:
      type: string
      description: |
        Profiles's company

        The value:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
        - can't include the "null" control character (`\u0000`)
    api-service-inBodyClientBirthDate-apiv4:
      type: string
      description: "Date of birth in the profile. Must be in `yyyy-mm-dd` format and later than `1900-01-01`. Must be a date in the past. <br>**IMPORTANT**: Months and days must be zero-padded. For example: May 3, 1993 is `1993-05-03`."
      example: 1987-10-24
    api-service-inBodyClientAvatarUrl-apiv4:
      type: string
      nullable: true
      description: |
        URL of the profile's avatar picture

        The value:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
        - can't include the "null" control character (`\u0000`)
    api-service-inBodyClientDisplayName-apiv4:
      type: string
      description: Currently unused
    api-service-inBodyClientLastName-apiv4:
      type: string
      description: |
        Profile's last name

        The value:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
        - can't include the "null" control character (`\u0000`)
    api-service-inBodyClientCustomId-apiv4:
      type: string
      description: |
        A custom ID for the Profile. It is a unique identifier.

        The value can't include any characters that match the pattern (ECMA flavor): `/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\r\n\u2028\u2029\u00AD]|[\uFE00-\uFE0F]|[\u0000])/`
    api-service-inBodyClientPhone-apiv4:
      type: string
      description: |
        Phone number of the profile

        - Must match the pattern (ECMA flavor): `/(^\+[0-9 \-()/]{6,19}$)|(^[0-9 \-()/]{6,20}$)/`  
        - The value can't include any characters that match the pattern (ECMA flavor): `/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\r\n\u2028\u2029\u00AD]|[\uFE00-\uFE0F]|[\u0000])/`
      example: "+48111222333"
    api-service-inBodyClientEmail-apiv4:
      type: string
      description: |
        The profile's e-mail address. 

        - Must match the pattern (ECMA flavor): `/^(([^<>()[\]\\.,;:\s@\\"]+(\.[^<>()[\]\\.,;:\s@\\"]+)*)|(\\".+\\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/`  
        - The value can't include any characters that match the pattern (ECMA flavor): `/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\r\n\u2028\u2029\u00AD]|[\uFE00-\uFE0F]|[\u0000])/`

        By default, email is a unique identifier.

        If [non-unique emails](https://hub.synerise.com/docs/settings/configuration/non-unique-emails/) are enabled, this field should not be used. It is no longer an identifier. The configuration of non-unique emails includes creating an email parameter for communication.
    api-service-inBodyClientFirstName-apiv4:
      type: string
      description: |
        Profile's first name.

        The value:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
          - can't include the "null" control character (`\u0000`)
    api-service-inBodyClientUuid-apiv4:
      type: string
      description: |
        UUID of the Profile. It is a unique identifier.

        The value can't include any characters that match the pattern (ECMA flavor): `/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\r\n\u2028\u2029\u00AD]|[\uFE00-\uFE0F]|[\u0000])/`
      example: 07243772-008a-42e1-ba37-c3807cebde8f
    api-service-inBodyClientCity-apiv4:
      type: string
      description: |
        Profile's city of residence.

        The value:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
        - can't include the "null" control character (`\u0000`)
    api-service-inBodyClientAddress-apiv4:
      type: string
      description: |
        Profile's street address.

        The value:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
        - can't include the "null" control character (`\u0000`)
    api-service-inBodyClientZipCode-apiv4:
      type: string
      description: |
        Profile's zip code

        The value:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
        - can't include the "null" control character (`\u0000`)
    api-service-inBodyClientProvince-apiv4:
      type: string
      description: |
        Profile's province of residence

        The value:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
        - can't include the "null" control character (`\u0000`)
    api-service-inBodyClientCountryCode-apiv4:
      type: string
      description: Code of profile's country of residence in accordance with the ISO 3166 format
      example: PL
    api-service-inBodyClientSex-apiv4:
      type: string
      description: Profile's sex
      enum:
        - FEMALE
        - MALE
        - NOT_SPECIFIED
        - OTHER
    api-service-CreateClientRequestBody-apiv4:
      type: object
      properties:
        email:
          $ref: "#/components/schemas/api-service-inBodyClientEmail-apiv4"
        phone:
          $ref: "#/components/schemas/api-service-inBodyClientPhone-apiv4"
        customId:
          $ref: "#/components/schemas/api-service-inBodyClientCustomId-apiv4"
        firstName:
          $ref: "#/components/schemas/api-service-inBodyClientFirstName-apiv4"
        lastName:
          $ref: "#/components/schemas/api-service-inBodyClientLastName-apiv4"
        displayName:
          $ref: "#/components/schemas/api-service-inBodyClientDisplayName-apiv4"
        uuid:
          $ref: "#/components/schemas/api-service-inBodyClientUuid-apiv4"
        avatarUrl:
          $ref: "#/components/schemas/api-service-inBodyClientAvatarUrl-apiv4"
        birthDate:
          $ref: "#/components/schemas/api-service-inBodyClientBirthDate-apiv4"
        company:
          $ref: "#/components/schemas/api-service-inBodyClientCompany-apiv4"
        city:
          $ref: "#/components/schemas/api-service-inBodyClientCity-apiv4"
        address:
          $ref: "#/components/schemas/api-service-inBodyClientAddress-apiv4"
        zipCode:
          $ref: "#/components/schemas/api-service-inBodyClientZipCode-apiv4"
        province:
          $ref: "#/components/schemas/api-service-inBodyClientProvince-apiv4"
        countryCode:
          $ref: "#/components/schemas/api-service-inBodyClientCountryCode-apiv4"
        sex:
          $ref: "#/components/schemas/api-service-inBodyClientSex-apiv4"
        agreements:
          $ref: "#/components/schemas/api-service-Agreements-apiv4"
        attributes:
          $ref: "#/components/schemas/api-service-Attributes-apiv4-apiv4"
        tags:
          $ref: "#/components/schemas/api-service-Tags-apiv4"
    api-service-Tags-apiv4:
      type: array
      description: |
        Tags can be used to group profiles.

        Tag names (strings):
        - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
        - can't include the "null" control character (`\u0000`)
      items:
        type: string
        description: |
          Tag names (strings):
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
          - can't include the "null" control character (`\u0000`)
    api-service-Attributes-apiv4-apiv4:
      type: object
      description: |
        This object contains custom attributes that can have any name (except for reserved attributes, see warning below) and data type, as required by your integration.

        The attribute names can't include any characters that match the pattern (ECMA flavor): `/[\r\n\u2028\u2029\u00AD\u0000\uFE00-\uFE0F]/`

        String values:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
          - can't include the "null" control character (`\u0000`)

        If you want to send a date/time attribute for use in analytics, take the following into account:
        - The date/time should be formatted according to ISO 8601.
        - The time zone of the workspace affects dates/times in the attributes that DON'T have a defined timezone. Example:
            - `2023-10-09T12:00:00` doesn't have a timezone indicator and will be considered as a time in the workspace's time zone.
            - `2023-10-09T12:00:00+02:00` has a timezone indicator (`+02:00`), so the timezone of the workspace doesn't affect it.
            - `2023-10-09T12:00:00Z` is a time in the UTC time zone (denoted by the `Z` at the end), so the timezone of the workspace doesn't affect it.

        <strong><span style="color:red">WARNING<span></strong>: Some attributes cannot be sent in this object and will be ignored. Some of these are reserved for system use, and others must be sent as properties of the profile in the root object of the request body instead of inside the `attributes` object.

        <details><summary><span style="background:red;color:white">Click to expand the list of reserved attributes</span></summary>
        <code>email</code><br><code>id</code><br><code>clientId</code><br><code>phone</code><br><code>customId</code><br><code>uuid</code><br><code>firstName</code><br><code>lastName</code><br>
        <code>displayName</code><br><code>company</code><br><code>address</code><br><code>city</code><br><code>province</code><br><code>zipCode</code><br><code>countryCode</code><br>
        <code>birthDate</code><br><code>sex</code><br><code>avatarUrl</code><br><code>anonymous</code><br><code>agreements</code><br><code>tags</code><br><code>businessProfileId</code><br>
        <code>time</code><br><code>ip</code><br><code>source</code><br><code>newsletter_agreement</code><br><code>custom_identify</code><br><code>firstname</code><br>
        <code>lastname</code><br><code>created</code><br><code>updated</code><br><code>last_activity_date</code><br><code>birthdate</code><br><code>external_avatar_url</code><br>
        <code>displayname</code><br><code>receive_smses</code><br><code>receive_push_messages</code><br><code>receive_webpush_messages</code><br>
        <code>receive_btooth_messages</code><br><code>receive_rfid_messages</code><br><code>receive_wifi_messages</code><br>
        <code>zipCode</code><br><code>anonymous_type</code><br><code>country_id</code><br><code>geo_loc_country</code><br><code>geo_loc_isp</code><br>
        <code>geo_loc_lat</code><br><code>geo_loc_lon</code><br><code>club_card_id</code><br><code>type</code><br><code>confirmed</code><br><code>facebookId</code><br><code>deletedAt</code><br><code>deleted_unique</code><br><code>status</code><br><code>recognized</code><br><code>previous_clients</code><br><code>testProfile</code><br>
        <code>apikey</code><br><code>apiKey</code><br><code>ApiKey</code><br><code>Apikey</code><br><code>tracker</code><br><code>snr_sdk_version</code><br><code>eventCreateTime</code><br><code>correlationId</code>
        </details>
      additionalProperties:
        description: |
          The attribute names can't include any characters that match the pattern (ECMA flavor): `/[\r\n\u2028\u2029\u00AD\u0000\uFE00-\uFE0F]/`

          String values:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
          - can't include the "null" control character (`\u0000`)
    api-service-Agreements-apiv4:
      description: |-
        This object contains the marketing agreements of the Profile.

        You can also pass the values as strings (`"true"`;`"True"`/`"false"`;`"False"`) or integers (`1` for true and `0` for false).
      type: object
      properties:
        email:
          type: boolean
          description: Permission to receive marketing information by e-mail. This field has no effect if [email is not a unique identifier](https://hub.synerise.com/docs/settings/configuration/non-unique-emails/).
          default: false
        sms:
          type: boolean
          description: Permission to receive marketing information by SMS
          default: false
        push:
          type: boolean
          description: Permission to receive push notifications
          default: false
        webPush:
          type: boolean
          description: Permission to receive webpush notifications
          default: false
        bluetooth:
          type: boolean
          deprecated: true
          description: This field is ignored when sent.
          default: false
        rfid:
          type: boolean
          deprecated: true
          description: This field is ignored when sent.
          default: false
        wifi:
          type: boolean
          deprecated: true
          description: This field is ignored when sent.
          default: false
    api-service-inResponseClientDetailsArray-apiv4:
      type: array
      items:
        $ref: "#/components/schemas/api-service-inResponseClientDetails-apiv4"
    api-service-inResponseClientDetails-apiv4:
      type: object
      properties:
        clientId:
          $ref: "#/components/schemas/api-service-ClientId-apiv4"
        email:
          $ref: "#/components/schemas/api-service-inBodyClientEmail-apiv4"
        phone:
          $ref: "#/components/schemas/api-service-inBodyClientPhone-apiv4"
        customId:
          $ref: "#/components/schemas/api-service-inBodyClientCustomId-apiv4"
        uuid:
          $ref: "#/components/schemas/api-service-inBodyClientUuid-apiv4"
        firstName:
          $ref: "#/components/schemas/api-service-inBodyClientFirstName-apiv4"
        lastName:
          $ref: "#/components/schemas/api-service-inBodyClientLastName-apiv4"
        displayName:
          $ref: "#/components/schemas/api-service-inBodyClientDisplayName-apiv4"
        company:
          $ref: "#/components/schemas/api-service-inBodyClientCompany-apiv4"
        address:
          $ref: "#/components/schemas/api-service-inBodyClientAddress-apiv4"
        city:
          $ref: "#/components/schemas/api-service-inBodyClientCity-apiv4"
        province:
          $ref: "#/components/schemas/api-service-inBodyClientProvince-apiv4"
        zipCode:
          $ref: "#/components/schemas/api-service-inBodyClientZipCode-apiv4"
        countryCode:
          $ref: "#/components/schemas/api-service-inBodyClientCountryCode-apiv4"
        birthDate:
          $ref: "#/components/schemas/api-service-inBodyClientBirthDate-apiv4"
        sex:
          $ref: "#/components/schemas/api-service-inBodyClientSex-apiv4"
        avatarUrl:
          $ref: "#/components/schemas/api-service-inBodyClientAvatarUrl-apiv4"
        anonymous:
          description: Information if the profile is anonymous
          type: boolean
          example: false
        agreements:
          $ref: "#/components/schemas/api-service-Agreements-apiv4"
        attributes:
          $ref: "#/components/schemas/api-service-Attributes-apiv4-apiv4"
        tags:
          $ref: "#/components/schemas/api-service-Tags-apiv4"
        previousClients:
          $ref: "#/components/schemas/api-service-PreviousClients-apiv4"
        lastActivityDate:
          deprecated: true
          type: string
          example: 2019-03-19T14:05:39Z
          description: "**Don't use** the values from this field. The last activity calculation mechanism is disabled and the value is always the profile's creation date. The field will be removed in a future release."
    api-service-PreviousClients-apiv4:
      type: array
      description: |
        - When retrieving profile data, this field is always empty.
        - In the response after a profile merge, the format depends on the merge type.  
              This field only provides information about the last merge. If a profile in the last merge was the result of another merge in the past, the data of the previous merge isn't included.
      items:
        oneOf:
          - type: integer
            title: Merged by ID
            description: IDs of the profiles which were merged into the target profile
          - type: object
            title: Merged by customId
            description: Profiles which were merged into the target profile
            properties:
              customId:
                type: string
                description: customId of a profile merged into the target profile
    api-service-CreateatransactionRequest-apiv4:
      required:
        - client
        - orderId
        - paymentInfo
        - products
        - revenue
        - value
        - source
      type: object
      properties:
        client:
          $ref: "#/components/schemas/api-service-Client-apiv4"
        discountAmount:
          description: How much the total cost decreased
          type: object
          nullable: true
          properties:
            amount:
              type: number
              description: The discount amount
              minimum: 0
            currency:
              $ref: "#/components/schemas/api-service-Currency-apiv4"
        metadata:
          $ref: "#/components/schemas/api-service-TransactionMeta-apiv4"
        orderId:
          $ref: "#/components/schemas/api-service-OrderId-apiv4"
        paymentInfo:
          $ref: "#/components/schemas/api-service-PaymentInfo-apiv4"
        products:
          type: array
          items:
            $ref: "#/components/schemas/api-service-Product-apiv4"
          description: |
            A list of items in the transaction.

            Each item creates a `product.buy` event. The UUID of that event is generated from a combination of:
              - the UUID of the `transaction.charge` event created by the transaction
              - the position of the item in this array. This has an effect on updating transaction events. 

            This means that when you update a transaction (a transaction can only be updated if it has an `eventSalt` and the same timestamp as the original), you must keep the original order of items in the array. Otherwise, you may accidentally overwrite a `product.buy` event with another item's event. The system does NOT recognize the item by SKU in this case.

            **Example**:
              1. You create a transaction with items A, B and C (in that order).
              2. You update the transaction and the items are now A, B, D, and C (in that order).
              3. Because item D took the position of C in the event, it has the same UUID as C had earlier. The event of D overwrites the event of C, and C is generated as a new event.

            Additionally, because events can't be deleted from the database, cancelled items remain as events in a Profile's history. You can use a custom free-form property to tag items as cancelled. This way, you can keep cancelled items in `products` when updating a transaction without breaking the order of items. You can also use the property to filter cancelled items out in Analytics.
        recordedAt:
          $ref: "#/components/schemas/api-service-Time-apiv4"
        revenue:
          required:
            - amount
            - currency
          type: object
          description: Transaction revenue (amount after taxation). This field is not calculated automatically by the backend, you must provide the value by summing up the results of `finalUnitPrice * quantity` from all items in the `products` array.
          properties:
            amount:
              type: number
              minimum: 0
              description: The total amount
              example: 64.25
            currency:
              $ref: "#/components/schemas/api-service-Currency-apiv4"
        value:
          required:
            - amount
            - currency
          type: object
          description: If you want to display the price before taxation, use this object. If you only want to display the price after taxation, set the values to the same as in `revenue`.
          properties:
            amount:
              type: number
              minimum: 0
              description: The total amount
              example: 112.25
            currency:
              $ref: "#/components/schemas/api-service-Currency-apiv4"
        source:
          $ref: "#/components/schemas/api-service-eventSource-apiv4"
        eventSalt:
          $ref: "#/components/schemas/api-service-EventSalt-apiv4"
    api-service-EventSalt-apiv4:
      type: string
      example: 972346context.action2019-02-07T09:53:56.999+00:00
      description: |
        When an event has an `eventSalt`, it can be overwritten by sending another event. The event's UUID stays the same.

        `eventSalt` must be unique in a workspace. An example of creating a salt is by generating a UUID or concatenating the profile ID, event's name, and timestamp, including milliseconds. This creates a value whose possibility of being duplicated is practically zero.

        To overwrite an event with another one, the new event MUST:
        - have the same `eventSalt` as the original event
        - have the same date and time as the original event (If the date and time don't match the original event, event salt doesn't have any effect.)
        - belong to the same `clientId` as the original event
        - have the same action (event name) as the original event

        ------
        **IMPORTANT**:  
        - DO NOT send the same `eventSalt` to different profiles!
        - DO NOT send the same `eventSalt` with a different action!
        - Pay attention to timezones - more details in the description of the `time` property (in v4/transactions events, it's called `recordedAt`).
        - If you send a future time in an event, it is rejected and the current time is assigned automatically. This means it's impossible to use event salt with future times.
        - An event without an `eventSalt` can't be overwritten. The parameter cannot be added to an event at a later time.
        - The parameter can't be retrieved later. You must keep track of the values that you send.  
        - In Automations that use the overwritten event as a trigger, the **automation is triggered if the new event is sent more than 72 hours after the original**. This is because the event UUID stays the same, and Automation treats events with the same UUID within 72 hours as duplicates that were sent due to an error.
    api-service-HTTP400-apiv4:
      type: object
      properties:
        error:
          type: string
          description: Summary of the error
        status:
          type: integer
          format: int32
          description: Status code
        timestamp:
          type: string
          description: Time when the message was sent
        path:
          type: string
          description: URL of the requested resource
        message:
          type: string
          description: Description of the problem
        errors:
          type: array
          description: Additional details of the errors, if applicable
          items:
            $ref: "#/components/schemas/api-service-Error-apiv4"
    api-service-PaymentInfo-apiv4:
      description: Payment details
      required:
        - method
      type: object
      properties:
        method:
          description: Payment method
          type: string
          example: CASH
    api-service-Product-apiv4:
      required:
        - finalUnitPrice
        - quantity
        - sku
      type: object
      additionalProperties:
        description: Additional, free-form properties of the item
      properties:
        finalUnitPrice:
          description: Total final price of the item per unit, including tax and discounts
          required:
            - amount
            - currency
          type: object
          properties:
            amount:
              type: number
              minimum: 0
              description: The price of the items
              example: 3.25
            currency:
              $ref: "#/components/schemas/api-service-Currency-apiv4"
        name:
          type: string
          example: Soft drink
          description: Name of the item
        sku:
          $ref: "#/components/schemas/api-service-ItemSku-apiv4"
        categories:
          type: array
          description: A list of the item's categories
          items:
            type: string
        image:
          type: string
          description: URL of the item's image
        url:
          type: string
          description: URL of the item's page
        netUnitPrice:
          required:
            - amount
            - currency
          type: object
          description: Price before taxation (before or after discounts, depending on your implementation and discount type)
          properties:
            amount:
              type: number
              minimum: 0
              description: The amount of money
              example: 3.25
            currency:
              $ref: "#/components/schemas/api-service-Currency-apiv4"
        tax:
          type: number
          format: float
          description: Tax as a percentage
        quantity:
          type: number
          example: 2.5
          description: The number or amount of purchased items
        regularPrice:
          description: Regular price of the item after taxation, before discounts
          required:
            - amount
            - currency
          type: object
          properties:
            amount:
              type: number
              minimum: 0
              description: The amount of money
              example: 3.25
            currency:
              $ref: "#/components/schemas/api-service-Currency-apiv4"
        discountPrice:
          description: Discount as an amount. For example, if the regular price is 500, and the final price is 450, the discount amount is 50.
          type: object
          properties:
            amount:
              type: number
              minimum: 0
              description: The amount of money
              example: 15.5
            currency:
              $ref: "#/components/schemas/api-service-Currency-apiv4"
        discountPercent:
          type: number
          format: float
          description: Discount as a percentage
    api-service-Client-apiv4:
      type: object
      description: You must provide at least one of those profile identifiers.
      properties:
        customId:
          $ref: "#/components/schemas/api-service-inBodyClientCustomId-apiv4"
        id:
          $ref: "#/components/schemas/api-service-ClientId-apiv4"
        uuid:
          $ref: "#/components/schemas/api-service-inBodyClientUuid-apiv4"
        email:
          $ref: "#/components/schemas/api-service-inBodyClientEmail-apiv4"
    api-service-eventSource-apiv4:
      type: string
      enum:
        - WEB_DESKTOP
        - WEB_MOBILE
        - MOBILE_APP
        - POS
        - MOBILE
        - DESKTOP
      description: |
        Source of the event. 
      example: MOBILE
    api-service-Tag-apiv4:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/api-service-TagId-apiv4"
        name:
          $ref: "#/components/schemas/api-service-TagName-apiv4"
        color:
          $ref: "#/components/schemas/api-service-TagColor-apiv4"
    api-service-TagCreate-apiv4:
      type: object
      required:
        - name
      properties:
        name:
          $ref: "#/components/schemas/api-service-TagName-apiv4"
        color:
          $ref: "#/components/schemas/api-service-TagColor-apiv4"
    api-service-TagUpdate-apiv4:
      type: object
      properties:
        color:
          $ref: "#/components/schemas/api-service-TagColor-apiv4"
    api-service-TagResponse-apiv4:
      type: object
      properties:
        businessProfileId:
          type: integer
          description: ID of the Workspace where the tag was created
          example: 100005
        id:
          $ref: "#/components/schemas/api-service-TagId-apiv4"
        name:
          $ref: "#/components/schemas/api-service-TagName-apiv4"
        color:
          $ref: "#/components/schemas/api-service-TagColor-apiv4"
    api-service-TagId-apiv4:
      description: ID of the tag
      type: integer
      format: int32
      example: 645
    api-service-TagColor-apiv4:
      description: Display color of the tag; hexadecimal value
      type: string
      example: "#0768ff"
    api-service-TagName-apiv4:
      description: Name of the tag
      type: string
      example: nice tag
    api-service-EventBase-apiv4:
      type: object
      required:
        - label
        - client
      properties:
        label:
          $ref: "#/components/schemas/api-service-eventLabel-apiv4"
        client:
          $ref: "#/components/schemas/api-service-Client-apiv4"
        time:
          $ref: "#/components/schemas/api-service-Time-apiv4"
        eventSalt:
          $ref: "#/components/schemas/api-service-EventSalt-apiv4"
    api-service-DiscountAmount-apiv4:
      description: How much the total cost decreased
      type: object
      nullable: true
      properties:
        amount:
          type: number
          description: The discount amount
          minimum: 0
        currency:
          $ref: "#/components/schemas/api-service-Currency-apiv4"
    api-service-DiscountPercent-apiv4:
      description: Discount as a percentage
      type: number
      format: float
    api-service-DiscountCode-apiv4:
      description: Discount code
      type: string
    api-service-OrderStatus-apiv4:
      description: Status of the order
      type: string
    api-service-Value-apiv4:
      required:
        - amount
        - currency
      type: object
      description: If you want to display the price without tax, use this object. If you only want to display the total price of the transaction, set the values to the same as in `revenue`.
      properties:
        amount:
          type: number
          minimum: 0
          description: The total amount
          example: 112.25
        currency:
          $ref: "#/components/schemas/api-service-Currency-apiv4"
    api-service-Revenue-apiv4:
      required:
        - amount
        - currency
      type: object
      description: Transaction revenue (`net + taxes - discounts`). This field is not calculated automatically by the backend, you must provide the value by summing up the results of `finalUnitPrice * quantity` from all items in the `products` array.
      properties:
        amount:
          type: number
          minimum: 0
          description: The total amount
          example: 64.25
        currency:
          $ref: "#/components/schemas/api-service-Currency-apiv4"
    api-service-Products-apiv4:
      type: array
      items:
        $ref: "#/components/schemas/api-service-Product-apiv4"
      description: A list of items in the transaction
    api-service-ItemName-apiv4:
      type: string
      description: Item name
      example: Soft drink
    api-service-ItemCategory-apiv4:
      type: string
      description: Item category
      example: Beverages
    api-service-ItemCategories-apiv4:
      type: array
      items:
        type: string
      description: If an item belongs to more than one category, include the categories in an array
    api-service-Offline-apiv4:
      type: boolean
      description: Set to `true` if the event occurred outside a website, for example in a cash register
    api-service-ItemUrlAddress-apiv4:
      type: string
      description: URL address of the item page
    api-service-Producer-apiv4:
      type: string
      description: Manufacturer of the item
    api-service-Quantity-apiv4:
      description: The amount of goods
      type: number
    api-service-FromRecommendation-apiv4:
      type: boolean
      description: Set to `true` if the event is triggered by an element from a recommendation.
    api-service-CampaignHash-apiv4:
      type: string
      description: If the event results from a recommendation, this is the from the `x-Correlation-Id` header of AI Recommendations download
      example: 21e0d4b0-bd4e-497b-817b-4fr660284918
    api-service-DefaultParamSource-apiv4:
      type: object
      description: |
        Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

        If you want to send a date/time param for use in analytics, take the following into account:
        - The date/time should be formatted according to ISO 8601.
        - The time zone of the workspace affects dates/times in the params that DON'T have a defined timezone. Example:
            - `2023-10-09T12:00:00` doesn't have a timezone indicator and will be considered as a time in the workspace's time zone.
            - `2023-10-09T12:00:00+02:00` has a timezone indicator (`+02:00`), so the timezone of the workspace doesn't affect it.
            - `2023-10-09T12:00:00Z` is a time in the UTC time zone (denoted by the `Z` at the end), so the timezone of the workspace doesn't affect it.

        Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

        <span style="color:red"><strong>WARNING:</strong></span>
        - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
        - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
        <code>modifiedBy</code><br>
        <code>apiKey</code><br>
        <code>eventUUID</code><br>
        <code>ip</code><br>
        <code>time</code><br>
        <code>businessProfileId</code>
      additionalProperties: true
    api-service-ClientApplicationStartedEventParams-apiv4:
      type: object
      description: |
        Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

        Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

        <span style="color:red"><strong>WARNING:</strong></span>
        - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
        - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
        <code>modifiedBy</code><br>
        <code>apiKey</code><br>
        <code>eventUUID</code><br>
        <code>ip</code><br>
        <code>time</code><br>
        <code>businessProfileId</code>
      required:
        - applicationName
        - version
      properties:
        applicationName:
          $ref: "#/components/schemas/api-service-ApplicationName-apiv4"
        version:
          $ref: "#/components/schemas/api-service-Version-apiv4"
      additionalProperties: true
    api-service-ApplicationName-apiv4:
      type: string
      description: Name of the application which sends the event
    api-service-Version-apiv4:
      type: string
      description: Version of the application which sends the event
    api-service-EventAction-apiv4:
      type: string
      example: context.action
      pattern: ^[a-zA-Z0-9\.\-_]{2,64}$
      description: |
        For custom events, enter your own action name. For pre-defined events, omit this field.<br>The action name can be up to 32 characters long and must match the following regular expression (ECMA flavor): `^[a-zA-Z0-9\\.\\-_]{2,64}$`
    api-service-EventType-apiv4:
      type: string
      description: |
        The type of event. If custom event, use `custom`.

        If other type, use the value that corresponds to the single event's endpoint.(for example, "content shared" events, which use the `/v4/events/shared` endpoint when sent as single events, have the type set to `shared`).
    api-service-CorrelationId-apiv4:
      type: string
      description: |
        `correlationId` of the request which this event relates to, for example a recommendation or search request (the parameter is included in the response to that request).
    api-service-CampaignId-apiv4:
      type: string
      description: ID of the campaign related to the event
    api-service-RecommendationItems-apiv4:
      type: array
      description: An array of items included in the recommendation. The items are identified by their `itemId` (also called `sku`, `productId`, and `retailer_part_no` in other APIs and SDKs)
      minItems: 0
      items:
        $ref: "#/components/schemas/api-service-Item-apiv4"
    api-service-Item-apiv4:
      type: string
      description: itemId (also called `sku`, `productId`, and `retailer_part_no` in other APIs and SDKs) of the item
    api-service-ItemPosition-apiv4:
      type: integer
      description: Position of the clicked item in the result list (count starts with 1)
    api-service-SearchType-apiv4:
      type: string
      description: Type of the search
      enum:
        - full-text-search
        - autocomplete
        - listing
        - visual
    api-service-Suggestion-apiv4:
      type: string
      description: Suggestion name
    automation-brain-DiagramStatus:
      type: string
      description: The status of a diagram
      enum:
        - Draft
        - Pending
        - Running
        - Paused
        - Stopped
    automation-brain-PointerSource:
      type: object
      description: Source of the problem
      properties:
        pointer:
          type: string
        value:
          type: string
      required:
        - pointer
    automation-brain-ErrorDetails:
      type: object
      description: Additional details
      additionalProperties:
        type: string
    automation-brain-Error:
      type: object
      properties:
        httpStatus:
          type: integer
          description: HTTP status code of error
        errorCode:
          type: string
          description: Synerise error code. See [API error reference](https://developers.synerise.com/errors.html)
        message:
          type: string
          description: A description of the problem
        timestamp:
          type: string
          format: date-time
          description: Time when the problem occurred
        help:
          type: string
          description: Link to the error reference
        traceId:
          type: string
          description: Trace ID for troubleshooting
        errors:
          type: array
          description: Array of errors
          items:
            $ref: "#/components/schemas/automation-brain-Error"
        source:
          $ref: "#/components/schemas/automation-brain-PointerSource"
        details:
          $ref: "#/components/schemas/automation-brain-ErrorDetails"
        field:
          type: string
          description: JSON field which caused a problem
      required:
        - errorCode
        - httpStatus
        - message
    automation-brain-AutomationContext:
      description: |
        Context of the workflow.
        - `Client` workflows are triggered by "Profile Event"; "Data Changed"; and "Audience" nodes.
        - `Business` workflows are triggered by "Business Event" and "Scheduled Run" nodes.
        - `Undefined` workflows have no trigger and can't be started until their configuration is finished.
      type: string
      enum:
        - Client
        - Business
        - Undefined
    automation-brain-PaginatedDiagrams:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: array
          description: An array of workflows
          items:
            $ref: "#/components/schemas/automation-brain-DiagramDetails"
        meta:
          $ref: "#/components/schemas/automation-brain-Pagination"
    automation-brain-PaginatedDiagramsV2:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: array
          description: An array of workflows
          items:
            $ref: "#/components/schemas/automation-brain-DiagramDetails"
        meta:
          $ref: "#/components/schemas/automation-brain-PaginationV2"
    automation-brain-DiagramDetails:
      type: object
      description: Details of the workflow
      required:
        - diagramId
        - author
        - listingAuthor
        - name
        - created
        - updated
        - status
        - scheduleStatus
        - configuration
        - catalogId
        - context
        - tags
        - description
        - hasTransformation
        - businessProfileId
      properties:
        diagramId:
          description: UUID of the workflow
          type: string
          example: 030a9be3-8ccc-44c7-b20b-27768816cab7
        author:
          description: Author of the workflow
          type: string
          example: example@synerise.com
        listingAuthor:
          type: object
          properties:
            userId:
              type: number
            clientId:
              type: number
            clientApiHash:
              type: string
            businessProfileApiHash:
              type: string
        name:
          description: Name of the workflow
          type: string
          example: Example name
        created:
          description: Creation time
          type: string
          format: date-time
          example: 2019-01-04T13:17:18.315Z
        updated:
          description: Last update time
          type: string
          format: date-time
          example: 2019-01-04T13:17:18.315Z
        status:
          $ref: "#/components/schemas/automation-brain-DiagramStatus"
        scheduleStatus:
          description: Workflow schedule status
          type: string
          enum:
            - On
            - Off
            - NoSchedule
        configuration:
          $ref: "#/components/schemas/automation-brain-DiagramConfiguration"
        catalogId:
          description: UUID of the catalog where the workflow is saved
          type: string
          example: 030a9be3-8ccc-44c7-b20b-27768816cab7
        context:
          $ref: "#/components/schemas/automation-brain-AutomationContext"
        tags:
          description: Tags associated with this workflow
          type: array
          items:
            $ref: "#/components/schemas/automation-brain-TagDetails"
        description:
          description: Workflow description
          type: string
          example: Sample workflow description
        hasTransformation:
          type: boolean
          description: "`true` if the workflow contains Data Transformation nodes"
        businessProfileId:
          type: number
    automation-brain-DiagramConfiguration:
      description: Workflow configuration
      type: object
      properties:
        capping:
          $ref: "#/components/schemas/automation-brain-LimitConfiguration"
        multipleJourneys:
          type: boolean
          description: Diagram has multiple journeys enabled
          default: false
    automation-brain-LimitConfiguration:
      type: object
      description: Capping configuration of the workflow
      required:
        - limit
        - period
      properties:
        limit:
          type: number
          description: The maximum number of times the a journey for a single profile within the limits defined in `period`
        period:
          type: object
          description: The time period for the quantitative limit defined in `limit`
          required:
            - type
          properties:
            type:
              type: string
              description: |-
                The type of time limit. `Time` is the only type available for workflows. A journey can be started X times in a period defined by `timeSeconds`.
                X is defined by the `limit` field.
              enum:
                - Time
            timeSeconds:
              type: number
              description: The length of the limit, in seconds (the limit is always calculated into seconds, even if another unit of time is used in the Synerise Web Application).
    automation-brain-TagDetails:
      type: object
      required:
        - hash
        - value
        - color
      properties:
        hash:
          type: string
          example: 030a9be3-8ccc-44c7-b20b-27768816cab7
          description: Unique ID of the tag
        value:
          type: string
          description: Name of the tag
        color:
          type: string
          description: Color of the tag, hexadecimal
          example: "#0b68ff"
        description:
          type: string
          description: Description of the tag
        icon:
          type: string
          description: URL of the tag's icon
    automation-brain-Pagination:
      type: object
      description: Pagination data
      required:
        - limit
        - page
        - totalPages
        - totalCount
      properties:
        limit:
          type: number
          example: 3
          description: Maximum number of items per page
        page:
          type: number
          example: 1
          description: Current page number
        totalPages:
          type: number
          example: 10
          description: Total number of pages
        totalCount:
          description: Total number of workflows on all pages
          type: number
          example: 29
    automation-brain-PaginationV2:
      type: object
      description: Pagination data
      required:
        - limit
        - links
      properties:
        limit:
          type: number
          example: 3
          description: Maximum number of items per page
        links:
          type: array
          items:
            $ref: "#/components/schemas/automation-brain-ListingLink"
    automation-brain-ListingLink:
      type: object
      required:
        - rel
        - url
      properties:
        rel:
          type: string
          example: first
        url:
          type: string
          example: http://automation-brain/v2/diagrams?page=1&limit=10
    automation-brain-ExternalBlockStatsWithInfo:
      type: object
      description: The name of this object is the UUID of the node
      required:
        - type
        - entered
      properties:
        name:
          type: string
          description: Name of the node, if defined
        type:
          type: string
          description: Node type
          example: EventTrigger
        entered:
          type: integer
          format: int64
          description: The number of profiles which entered this node
        executed:
          type: integer
          format: int64
          description: "The number of profiles which completed this node. NOT available for: Trigger nodes, End nodes, ABx Test nodes, Split Path nodes, and Merge Paths nodes."
      additionalProperties:
        type: integer
        description: Additional statistics, depending on node type. See the [User guide](https://hub.synerise.com/docs/automation/automation-activity-tracking/#statistics-reference) for a list.
        format: int64
    automation-brain-ExternalDiagramStatsWithInfo:
      type: object
      required:
        - started
        - finished
        - inProgress
        - blocks
      properties:
        started:
          type: integer
          format: int64
          description: The number of times a workdlow was started (a trigger node was activated)
        finished:
          type: integer
          format: int64
          description: The number of times an "End" node was reached.
        inProgress:
          type: integer
          format: int64
          description: The number of profiles currently in the workflow.
        blocks:
          type: object
          description: Statistics for individual nodes.
          additionalProperties:
            $ref: "#/components/schemas/automation-brain-ExternalBlockStatsWithInfo"
    automation-brain-HTTP400:
      type: object
      properties:
        error:
          type: string
          description: Summary of the error
        status:
          type: integer
          format: int32
          description: Status code
        timestamp:
          type: string
          description: Time when the message was sent
        message:
          type: string
          description: Description of the problem
    automation-brain-DiagramActionRequest:
      type: object
      properties:
        scheduleAction:
          type: string
          enum:
            - On
            - Off
            - NoAction
    boxes-v2-designHideLabel:
      type: boolean
      description: When true, the label is not displayed
    boxes-v2-designPlaceholder:
      type: string
      description: Placeholder text displayed until the user fills in a value
    boxes-v2-designDescription:
      type: string
      description: The description appears under the field.
    boxes-v2-designTooltip:
      type: string
      description: Tooltip text is displayed when the user hovers over the information icon.
    boxes-v2-designTabIndex:
      type: number
      description: Tab index defines the order of field display when the user uses the **TAB** key to navigate the form.
    boxes-v2-designInitialFocus:
      type: boolean
      description: If true, the field becomes the initially focused element when the form is opened.
    boxes-v2-validationRequired:
      type: boolean
      description: When true, the field must be filled in before the form can be submitted.
    boxes-v2-validationUnique:
      type: boolean
      description: When true, the form cannot be sent if the field contains the same data that was sent before (for example, if a user is trying to send a record with a clientUUID that already exists in another record).
    boxes-v2-validationRegexPattern:
      type: string
      description: A regular expression that the entered value must match
    boxes-v2-validationErrorMessage:
      type: string
      description: The message to display if a validation error occurs
    boxes-v2-Label:
      type: string
      description: A descriptive label for the field, displayed in the UI
    boxes-v2-DataSourceDefaultValue:
      type: string
      enum:
        - FIRST
        - LAST
      description: Defines which option is initially selected when the form is opened
    boxes-v2-ValuesDataSource:
      type: object
      description: Definition of available values
      required:
        - type
        - data
      properties:
        type:
          type: string
          enum:
            - VALUES
          description: Used when the selection is from a list of values.
        data:
          type: object
          description: Value-related data
          required:
            - values
          properties:
            values:
              type: array
              description: An array of values
              items:
                $ref: "#/components/schemas/boxes-v2-LabelValue"
    boxes-v2-RelationDataSource:
      type: object
      description: Definition of relations
      required:
        - type
        - data
      properties:
        type:
          type: string
          enum:
            - RELATION
          description: Used for defining relations
        data:
          type: object
          description: Relation definition
          required:
            - rhsSchemaId
            - relationType
          properties:
            rhsSchemaId:
              type: string
              example: 0790bd7c-8c2b-4e31-b01a-eee434331800
              description: UUID of the schema that the relation refers to, called a Right-Hand Schema (RHS)
            relationType:
              type: string
              enum:
                - many_to_one
                - one_to_many
                - many_to_many
                - one_to_one
              description: |
                
                *Origin schema* is the schema where this relation is defined.
                *RHS* is the schema identified by `rhsSchemaId`.
                - `one_to_many`: origin schema record can store multiple references to RHS records; RHS record can store one reference to origin schema record.
                - `many_to_one`: origin schema record can store one reference to RHS record; RHS record can store multiple references to origin schema records.
                - `many_to_many`: origin schema record can store multiple references to RHS records; RHS records can store multiple references to origin schema records.
                - `one_to_one`: origin schema record can store one reference to RHS record; RHS record can store one reference to origin schema record.
            displayField:
              type: string
              example: field1
              description: Unique name of the field whose value should represent the related record
    boxes-v2-LabelValue:
      type: object
      required:
        - label
        - value
      properties:
        label:
          type: string
          description: HTML `<label>` tag of the option
        value:
          type: string
          description: HTML `value` attribute of the option
    boxes-v2-ValueType:
      description: |
        This object represents a field that can be used for storing data.

        The name of a field (this object) cannot contain spaces or special characters other than the underscore `_`,dash `-`, or dot `.`

        This name is the ID of the field and must be unique across the schema.
      oneOf:
        - $ref: "#/components/schemas/boxes-v2-TextValueType"
        - $ref: "#/components/schemas/boxes-v2-PasswordValueType"
        - $ref: "#/components/schemas/boxes-v2-ButtonValueType"
        - $ref: "#/components/schemas/boxes-v2-SelectValueType"
        - $ref: "#/components/schemas/boxes-v2-NumberValueType"
        - $ref: "#/components/schemas/boxes-v2-CheckboxGroupValueType"
        - $ref: "#/components/schemas/boxes-v2-SwitchValueType"
        - $ref: "#/components/schemas/boxes-v2-RadioValueType"
        - $ref: "#/components/schemas/boxes-v2-FileValueType"
      discriminator:
        propertyName: type
        mapping:
          TEXT: "#/components/schemas/boxes-v2-TextValueType"
          PASSWORD: "#/components/schemas/boxes-v2-PasswordValueType"
          BUTTON: "#/components/schemas/boxes-v2-ButtonValueType"
          SELECT: "#/components/schemas/boxes-v2-SelectValueType"
          NUMBER: "#/components/schemas/boxes-v2-NumberValueType"
          CHECKBOX_GROUP: "#/components/schemas/boxes-v2-CheckboxGroupValueType"
          SWITCH: "#/components/schemas/boxes-v2-SwitchValueType"
          RADIO_GROUP: "#/components/schemas/boxes-v2-RadioValueType"
          FILE: "#/components/schemas/boxes-v2-FileValueType"
    boxes-v2-ButtonValueType:
      type: object
      title: Button value type
      required:
        - type
        - design
        - layout
      properties:
        type:
          type: string
          description: This field type renders an action button.
          enum:
            - BUTTON
        design:
          $ref: "#/components/schemas/boxes-v2-TextValueTypeDesign"
        layout:
          $ref: "#/components/schemas/boxes-v2-TypeLayout"
    boxes-v2-PasswordValueTypeDesign:
      allOf:
        - $ref: "#/components/schemas/boxes-v2-TextValueTypeDesign"
    boxes-v2-PasswordValueTypeValidation:
      allOf:
        - $ref: "#/components/schemas/boxes-v2-TextValueTypeValidation"
    boxes-v2-PasswordValueType:
      type: object
      title: Password value type
      required:
        - type
        - design
        - validation
        - layout
      properties:
        type:
          type: string
          description: This field type accepts password values.
          enum:
            - PASSWORD
        design:
          $ref: "#/components/schemas/boxes-v2-PasswordValueTypeDesign"
        validation:
          $ref: "#/components/schemas/boxes-v2-PasswordValueTypeValidation"
        layout:
          $ref: "#/components/schemas/boxes-v2-TypeLayout"
    boxes-v2-TextValueTypeDesign:
      type: object
      title: Text value type design
      description: Field design
      required:
        - label
        - hideLabel
        - initialFocus
      properties:
        label:
          $ref: "#/components/schemas/boxes-v2-Label"
        hideLabel:
          $ref: "#/components/schemas/boxes-v2-designHideLabel"
        placeholder:
          $ref: "#/components/schemas/boxes-v2-designPlaceholder"
        description:
          $ref: "#/components/schemas/boxes-v2-designDescription"
        tooltip:
          $ref: "#/components/schemas/boxes-v2-designTooltip"
        tabIndex:
          $ref: "#/components/schemas/boxes-v2-designTabIndex"
        initialFocus:
          $ref: "#/components/schemas/boxes-v2-designInitialFocus"
    boxes-v2-TextValueTypeValidation:
      type: object
      description: Text value type validation
      required:
        - required
        - unique
      properties:
        required:
          $ref: "#/components/schemas/boxes-v2-validationRequired"
        unique:
          $ref: "#/components/schemas/boxes-v2-validationUnique"
        minimumLength:
          type: number
          description: The minimum number of characters
        maximumLength:
          type: number
          description: The maximum number of characters
        regexPattern:
          $ref: "#/components/schemas/boxes-v2-validationRegexPattern"
        errorMessage:
          $ref: "#/components/schemas/boxes-v2-validationErrorMessage"
    boxes-v2-TextValueType:
      type: object
      title: Text value type
      required:
        - type
        - design
        - validation
        - layout
      properties:
        type:
          type: string
          description: This field type accepts text values.
          enum:
            - TEXT
        design:
          $ref: "#/components/schemas/boxes-v2-TextValueTypeDesign"
        validation:
          $ref: "#/components/schemas/boxes-v2-TextValueTypeValidation"
        layout:
          $ref: "#/components/schemas/boxes-v2-TypeLayout"
    boxes-v2-FileValueTypeDesign:
      type: object
      title: File value type design
      description: Field design
      required:
        - label
        - hideLabel
        - initialFocus
      properties:
        label:
          $ref: "#/components/schemas/boxes-v2-Label"
        hideLabel:
          $ref: "#/components/schemas/boxes-v2-designHideLabel"
        description:
          $ref: "#/components/schemas/boxes-v2-designDescription"
        tooltip:
          $ref: "#/components/schemas/boxes-v2-designTooltip"
        tabIndex:
          $ref: "#/components/schemas/boxes-v2-designTabIndex"
        initialFocus:
          $ref: "#/components/schemas/boxes-v2-designInitialFocus"
    boxes-v2-FileValueTypeData:
      type: object
      description: File value type data
      additionalProperties: true
    boxes-v2-FileValueTypeValidation:
      type: object
      description: File value type validation
      additionalProperties: true
    boxes-v2-FileValueType:
      type: object
      title: File value type
      required:
        - type
        - design
        - data
        - validation
        - layout
      properties:
        type:
          type: string
          description: This field type accepts file values.
          enum:
            - FILE
        design:
          $ref: "#/components/schemas/boxes-v2-FileValueTypeDesign"
        data:
          $ref: "#/components/schemas/boxes-v2-FileValueTypeData"
        validation:
          $ref: "#/components/schemas/boxes-v2-FileValueTypeValidation"
        layout:
          $ref: "#/components/schemas/boxes-v2-TypeLayout"
    boxes-v2-SelectValueTypeDesign:
      type: object
      title: Select value design
      description: Field design
      required:
        - label
        - hideLabel
        - initialFocus
      properties:
        label:
          $ref: "#/components/schemas/boxes-v2-Label"
        hideLabel:
          $ref: "#/components/schemas/boxes-v2-designHideLabel"
        placeholder:
          $ref: "#/components/schemas/boxes-v2-designPlaceholder"
        description:
          $ref: "#/components/schemas/boxes-v2-designDescription"
        tooltip:
          $ref: "#/components/schemas/boxes-v2-designTooltip"
        tabIndex:
          $ref: "#/components/schemas/boxes-v2-designTabIndex"
        initialFocus:
          $ref: "#/components/schemas/boxes-v2-designInitialFocus"
    boxes-v2-SelectValueTypeData:
      type: object
      description: Select value type data or details of the relation between schemas
      required:
        - source
      properties:
        source:
          $ref: "#/components/schemas/boxes-v2-SelectValueTypeDataSource"
    boxes-v2-SelectValueTypeDataSource:
      description: Defines the source of values or relations available for selection.
      oneOf:
        - $ref: "#/components/schemas/boxes-v2-ValuesDataSource"
        - $ref: "#/components/schemas/boxes-v2-RelationDataSource"
      discriminator:
        propertyName: type
        mapping:
          VALUES: "#/components/schemas/boxes-v2-ValuesDataSource"
          RELATION: "#/components/schemas/boxes-v2-RelationDataSource"
    boxes-v2-SelectValueTypeValidation:
      type: object
      description: Select value type validation
      required:
        - required
        - unique
      properties:
        required:
          $ref: "#/components/schemas/boxes-v2-validationRequired"
        unique:
          $ref: "#/components/schemas/boxes-v2-validationUnique"
        errorMessage:
          $ref: "#/components/schemas/boxes-v2-validationErrorMessage"
    boxes-v2-SelectValueType:
      type: object
      title: Select value type
      required:
        - type
        - design
        - data
        - validation
        - layout
      properties:
        type:
          type: string
          description: This field type accepts select values and is also used for creating relations between schemas.
          enum:
            - SELECT
        design:
          $ref: "#/components/schemas/boxes-v2-SelectValueTypeDesign"
        data:
          $ref: "#/components/schemas/boxes-v2-SelectValueTypeData"
        validation:
          $ref: "#/components/schemas/boxes-v2-SelectValueTypeValidation"
        layout:
          $ref: "#/components/schemas/boxes-v2-TypeLayout"
    boxes-v2-NumberValueTypeDesign:
      type: object
      title: Number value type design
      description: Field design
      required:
        - label
        - hideLabel
        - initialFocus
      properties:
        label:
          $ref: "#/components/schemas/boxes-v2-Label"
        hideLabel:
          $ref: "#/components/schemas/boxes-v2-designHideLabel"
        placeholder:
          $ref: "#/components/schemas/boxes-v2-designPlaceholder"
        description:
          $ref: "#/components/schemas/boxes-v2-designDescription"
        tooltip:
          $ref: "#/components/schemas/boxes-v2-designTooltip"
        tabIndex:
          $ref: "#/components/schemas/boxes-v2-designTabIndex"
        initialFocus:
          $ref: "#/components/schemas/boxes-v2-designInitialFocus"
    boxes-v2-NumberValueTypeData:
      type: object
      description: Number value type data
      required:
        - decimalPlaces
      properties:
        decimalPlaces:
          type: number
          description: Number of digits after the decimal separator
    boxes-v2-NumberValueTypeValidation:
      type: object
      description: Number value type validation
      required:
        - required
        - unique
      properties:
        required:
          $ref: "#/components/schemas/boxes-v2-validationRequired"
        unique:
          $ref: "#/components/schemas/boxes-v2-validationUnique"
        minimumValue:
          type: number
          description: The minimum value
        maximumValue:
          type: number
          description: The maximum value
        regexPattern:
          $ref: "#/components/schemas/boxes-v2-validationRegexPattern"
        errorMessage:
          $ref: "#/components/schemas/boxes-v2-validationErrorMessage"
    boxes-v2-NumberValueType:
      type: object
      title: Number value type
      required:
        - type
        - design
        - data
        - validation
        - layout
      properties:
        type:
          type: string
          description: This field type accepts number fields.
          enum:
            - NUMBER
        design:
          $ref: "#/components/schemas/boxes-v2-NumberValueTypeDesign"
        data:
          $ref: "#/components/schemas/boxes-v2-NumberValueTypeData"
        validation:
          $ref: "#/components/schemas/boxes-v2-NumberValueTypeValidation"
        layout:
          $ref: "#/components/schemas/boxes-v2-TypeLayout"
    boxes-v2-CheckboxGroupValueTypeDesign:
      type: object
      title: CheckboxGroup value type design
      description: Field design
      required:
        - label
        - hideLabel
        - initialFocus
      properties:
        label:
          $ref: "#/components/schemas/boxes-v2-Label"
        hideLabel:
          $ref: "#/components/schemas/boxes-v2-designHideLabel"
        description:
          $ref: "#/components/schemas/boxes-v2-designDescription"
        tooltip:
          $ref: "#/components/schemas/boxes-v2-designTooltip"
        tabIndex:
          $ref: "#/components/schemas/boxes-v2-designTabIndex"
        initialFocus:
          $ref: "#/components/schemas/boxes-v2-designInitialFocus"
    boxes-v2-CheckboxGroupValueTypeData:
      type: object
      description: Checkbox value data source
      required:
        - source
      properties:
        source:
          $ref: "#/components/schemas/boxes-v2-ValuesDataSource"
    boxes-v2-CheckboxGroupValueTypeValidation:
      type: object
      description: Checkbox Group value type validation
      required:
        - required
      properties:
        required:
          $ref: "#/components/schemas/boxes-v2-validationRequired"
        minimumAmount:
          type: number
          description: The minimal allowed number of check boxes
        maximumAmount:
          type: number
          description: The maximal allowed number of check boxes
        errorMessage:
          $ref: "#/components/schemas/boxes-v2-validationErrorMessage"
    boxes-v2-CheckboxGroupValueType:
      type: object
      title: Checkbox group value type
      required:
        - type
        - design
        - data
        - validation
        - layout
      properties:
        type:
          type: string
          enum:
            - CHECKBOX_GROUP
          description: This field type creates checkboxes.
        design:
          $ref: "#/components/schemas/boxes-v2-CheckboxGroupValueTypeDesign"
        data:
          $ref: "#/components/schemas/boxes-v2-CheckboxGroupValueTypeData"
        validation:
          $ref: "#/components/schemas/boxes-v2-CheckboxGroupValueTypeValidation"
        layout:
          $ref: "#/components/schemas/boxes-v2-TypeLayout"
    boxes-v2-SwitchValueTypeDesign:
      type: object
      title: Switch value type design
      description: Field design
      required:
        - label
        - hideLabel
        - initialFocus
      properties:
        label:
          $ref: "#/components/schemas/boxes-v2-Label"
        hideLabel:
          $ref: "#/components/schemas/boxes-v2-designHideLabel"
        description:
          $ref: "#/components/schemas/boxes-v2-designDescription"
        tooltip:
          $ref: "#/components/schemas/boxes-v2-designTooltip"
        tabIndex:
          $ref: "#/components/schemas/boxes-v2-designTabIndex"
        initialFocus:
          $ref: "#/components/schemas/boxes-v2-designInitialFocus"
    boxes-v2-SwitchValueTypeData:
      type: object
      description: Switch value type data
      required:
        - defaultValue
      properties:
        defaultValue:
          type: boolean
          description: If true, the default state of the switch (toggle) when opening the form is ON.
    boxes-v2-SwitchValueType:
      type: object
      title: Switch value type
      required:
        - type
        - data
        - design
        - layout
      properties:
        type:
          type: string
          description: This field type creates switches (toggles).
          enum:
            - SWITCH
        design:
          $ref: "#/components/schemas/boxes-v2-SwitchValueTypeDesign"
        data:
          $ref: "#/components/schemas/boxes-v2-SwitchValueTypeData"
        layout:
          $ref: "#/components/schemas/boxes-v2-TypeLayout"
    boxes-v2-RadioValueTypeDesign:
      type: object
      title: Radio value type design
      description: Field design
      required:
        - label
        - hideLabel
        - initialFocus
      properties:
        label:
          $ref: "#/components/schemas/boxes-v2-Label"
        hideLabel:
          $ref: "#/components/schemas/boxes-v2-designHideLabel"
        description:
          $ref: "#/components/schemas/boxes-v2-designDescription"
        tooltip:
          $ref: "#/components/schemas/boxes-v2-designTooltip"
        tabIndex:
          $ref: "#/components/schemas/boxes-v2-designTabIndex"
        initialFocus:
          $ref: "#/components/schemas/boxes-v2-designInitialFocus"
    boxes-v2-RadioValueTypeData:
      type: object
      description: Radio value type data
      required:
        - defaultValue
        - source
      properties:
        defaultValue:
          $ref: "#/components/schemas/boxes-v2-DataSourceDefaultValue"
        source:
          $ref: "#/components/schemas/boxes-v2-ValuesDataSource"
    boxes-v2-RadioValueType:
      type: object
      title: Radio value type
      required:
        - type
        - data
        - design
        - layout
      properties:
        type:
          type: string
          description: This field type creates radio buttons.
          enum:
            - RADIO_GROUP
        design:
          $ref: "#/components/schemas/boxes-v2-RadioValueTypeDesign"
        data:
          $ref: "#/components/schemas/boxes-v2-RadioValueTypeData"
        layout:
          $ref: "#/components/schemas/boxes-v2-TypeLayout"
    boxes-v2-TypeLayout:
      type: object
      description: Layout of the item within its parent element
      required:
        - marginTop
        - marginRight
        - marginBottom
        - marginLeft
      properties:
        marginTop:
          type: string
          description: Top margin of the element
          example: 15px
        marginRight:
          type: string
          description: Right margin of the element
          example: 1cm
        marginBottom:
          type: string
          description: Bottom margin of the element
          example: 12pt
        marginLeft:
          type: string
          description: Left margin of the element
          example: 1.0em
    boxes-v2-Value:
      description: Each object is named after the corresponding field in the schema or the relation it refers to.
      oneOf:
        - $ref: "#/components/schemas/boxes-v2-TextValue"
        - $ref: "#/components/schemas/boxes-v2-SelectValue"
        - $ref: "#/components/schemas/boxes-v2-NumberValue"
        - $ref: "#/components/schemas/boxes-v2-CheckboxGroupValue"
        - $ref: "#/components/schemas/boxes-v2-SwitchValue"
        - $ref: "#/components/schemas/boxes-v2-RadioValue"
        - $ref: "#/components/schemas/boxes-v2-RelationValue"
    boxes-v2-TextValue:
      type: object
      title: Text
      properties:
        value:
          type: string
          example: This is my first task
          description: Text input
    boxes-v2-SelectValue:
      type: object
      title: Select
      properties:
        value:
          type: string
          example: Selected value
          description: Select value
        recordId:
          type: string
          format: uuid
          description: UUID of the related record (single relation)
        recordIds:
          type: array
          description: An array of related record UUIDs (multiple relations)
          items:
            type: string
            format: uuid
    boxes-v2-NumberValue:
      type: object
      title: Number
      properties:
        value:
          type: string
          example: "33"
          description: Numerical input. **The value is sent as a string.**
    boxes-v2-CheckboxGroupValue:
      type: object
      title: Checkbox
      properties:
        values:
          type: array
          items:
            type: string
          description: The checkboxes that were selected
    boxes-v2-SwitchValue:
      type: object
      title: Switch
      required:
        - value
      properties:
        value:
          type: boolean
          description: When `true`, the toggle is switched on.
          example: "false"
    boxes-v2-RadioValue:
      type: object
      title: Radio
      properties:
        value:
          type: string
          example: my favourite hobby
          description: Selected radio value
    boxes-v2-RelationValue:
      type: object
      title: Relation
      required:
        - recordId
      properties:
        recordId:
          type: string
          format: uuid
          description: Related record ID
    boxes-v2-CustomCssClass:
      type: string
      description: CSS class to assign to the element
    boxes-v2-SingleLayout:
      type: object
      title: Input field
      required:
        - type
        - fieldName
      properties:
        type:
          type: string
          enum:
            - SINGLE
          example: SINGLE
          description: The "single" layout must be the final element in each layout structure. It is the only layout that allows the display of fields.
        fieldName:
          type: string
          description: The input field is identified by the name of that field's object (not the `label` property).
    boxes-v2-ColumnsLayout:
      type: object
      title: Columns layout
      required:
        - type
        - columns
        - design
      properties:
        type:
          type: string
          enum:
            - COLUMNS
          example: COLUMNS
          description: This element defines a two-column layout. A column layout may include other layouts, allowing you to build complex structures.
        columns:
          type: array
          description: An array of columns. Each column may contain a number of layouts or fields.
          items:
            type: array
            items:
              $ref: "#/components/schemas/boxes-v2-LayoutItem"
        design:
          $ref: "#/components/schemas/boxes-v2-ColumnDesign"
    boxes-v2-ColumnDesign:
      type: object
      title: Column design
      description: Columns design
      required:
        - display
        - layout
      properties:
        display:
          $ref: "#/components/schemas/boxes-v2-ColumnDisplay"
        layout:
          $ref: "#/components/schemas/boxes-v2-TypeLayout"
    boxes-v2-ColumnDisplay:
      type: object
      title: Column display
      description: Columns display configuration
      required:
        - customCssClass
        - columnProperties
        - columnGap
      properties:
        customCssClass:
          $ref: "#/components/schemas/boxes-v2-CustomCssClass"
        columnProperties:
          type: array
          title: Column properties
          description: Column properties
          default: []
          items:
            $ref: "#/components/schemas/boxes-v2-ColumnProperty"
        columnGap:
          type: string
          description: The width of the gap between columns
          example: 24px
    boxes-v2-ColumnProperty:
      type: object
      title: Columns property
      required:
        - column
        - width
      properties:
        column:
          type: number
          description: Column number (left to right, starting with 1)
        width:
          type: string
          description: Column width
          example: 20%
    boxes-v2-TableLayout:
      type: object
      title: Table layout
      required:
        - type
        - cells
        - design
      properties:
        type:
          type: string
          enum:
            - TABLE
          example: TABLE
          description: This element defines a table layout. A table layout may include other layouts, allowing you to build complex structures.
        cells:
          type: array
          description: An array of table cells. Each cell may contain a number of layouts or fields.
          items:
            type: array
            items:
              type: array
              items:
                $ref: "#/components/schemas/boxes-v2-LayoutItem"
        design:
          $ref: "#/components/schemas/boxes-v2-TableDesign"
    boxes-v2-TableDesign:
      type: object
      title: Table design
      description: Table design
      required:
        - display
        - layout
      properties:
        display:
          $ref: "#/components/schemas/boxes-v2-TableDisplay"
        layout:
          $ref: "#/components/schemas/boxes-v2-TypeLayout"
    boxes-v2-TableDisplay:
      type: object
      title: Table display
      description: Table display configuration
      required:
        - customCssClass
        - isStriped
        - isBordered
        - isHover
        - isCondensed
      properties:
        customCssClass:
          $ref: "#/components/schemas/boxes-v2-CustomCssClass"
        isStriped:
          type: boolean
          description: Defines if the table is striped (every second row has a colored background for better readability).
        isBordered:
          type: boolean
          description: Defines if the table has borders.
        isHover:
          type: boolean
          description: Defines if rows are highlighted when hovered.
        isCondensed:
          type: boolean
          description: Condenses the size of the table.
    boxes-v2-Layout:
      type: array
      title: Layout
      description: The graphical layout of the schema. The layouts are displayed according to their order in the array.
      items:
        $ref: "#/components/schemas/boxes-v2-LayoutItem"
    boxes-v2-LayoutItem:
      title: Input field, column layout, or table layout
      oneOf:
        - $ref: "#/components/schemas/boxes-v2-SingleLayout"
        - $ref: "#/components/schemas/boxes-v2-ColumnsLayout"
        - $ref: "#/components/schemas/boxes-v2-TableLayout"
      discriminator:
        propertyName: type
        mapping:
          SINGLE: "#/components/schemas/boxes-v2-SingleLayout"
          COLUMNS: "#/components/schemas/boxes-v2-ColumnsLayout"
          TABLE: "#/components/schemas/boxes-v2-TableLayout"
    boxes-v2-Fields:
      type: object
      description: The fields define the data that can be entered into a record.
      additionalProperties:
        $ref: "#/components/schemas/boxes-v2-ValueType"
    boxes-v2-EqualFieldValueRelationConstraint:
      type: object
      description: Field of one record is equal to second one.
      required:
        - type
        - schemaFieldName
        - relatedSchemaFieldName
      properties:
        type:
          type: string
          enum:
            - equal
          description: This value is used when a record of this schema has to have field equal to record related by relation.
        schemaFieldName:
          type: string
          description: Name of record of this schema's field.
        relatedSchemaFieldName:
          type: string
          description: Name of record of related schema's field.
    boxes-v2-FieldValueGreaterThanRelationConstraint:
      type: object
      description: Field of related record is greater than provided value.
      required:
        - type
        - value
        - relatedSchemaFieldName
      properties:
        type:
          type: string
          enum:
            - greater_than
          description: This value is used when a related record field's value should be greater than provided value.
        value:
          type: string
          description: Provided value.
        relatedSchemaFieldName:
          type: string
          description: Name of record of related schema's field.
    boxes-v2-FieldValueGreaterThanOrEqualRelationConstraint:
      type: object
      description: Field of related record is greater than or equal to provided value.
      required:
        - type
        - value
        - relatedSchemaFieldName
      properties:
        type:
          type: string
          enum:
            - greater_than_or_equal
          description: This value is used when a related record field's value should be greater than or equal to provided value.
        value:
          type: string
          description: Provided value.
        relatedSchemaFieldName:
          type: string
          description: Name of record of related schema's field.
    boxes-v2-FieldValueLessThanRelationConstraint:
      type: object
      description: Field of related record is less than provided value.
      required:
        - type
        - value
        - relatedSchemaFieldName
      properties:
        type:
          type: string
          enum:
            - less_than
          description: This value is used when a related record field's value should be less than provided value.
        value:
          type: string
          description: Provided value.
        relatedSchemaFieldName:
          type: string
          description: Name of record of related schema's field.
    boxes-v2-FieldValueLessThanOrEqualRelationConstraint:
      type: object
      description: Field of related record have value that is less than or equal to provided value.
      required:
        - type
        - value
        - relatedSchemaFieldName
      properties:
        type:
          type: string
          enum:
            - less_than_or_equal
          description: This value is used when a related record field's value should be less than or equal to provided value.
        value:
          type: string
          description: Provided value.
        relatedSchemaFieldName:
          type: string
          description: Name of record of related schema's field.
    boxes-v2-FieldValueBetweenRelationConstraint:
      type: object
      description: Field of related record is less than or equal to provided value.
      required:
        - type
        - from
        - to
        - relatedSchemaFieldName
      properties:
        type:
          type: string
          enum:
            - between
          description: This value is used when a related record field's value should be between provided values.
        from:
          type: string
          description: Provided value (from).
        to:
          type: string
          description: Provided value (to).
        relatedSchemaFieldName:
          type: string
          description: Name of record of related schema's field.
    boxes-v2-FieldValueEqualToConstantRelationConstraint:
      type: object
      description: Field of related record is equal to provided value.
      required:
        - type
        - value
        - relatedSchemaFieldName
      properties:
        type:
          type: string
          enum:
            - equal_to_constant
          description: This value is used when a related record field's value should be equal to provided value.
        value:
          type: string
          description: Provided value.
        relatedSchemaFieldName:
          type: string
          description: Name of record of related schema's field.
    boxes-v2-SchemaRelationConstraint:
      title: Schema relation constraint.
      oneOf:
        - $ref: "#/components/schemas/boxes-v2-EqualFieldValueRelationConstraint"
        - $ref: "#/components/schemas/boxes-v2-FieldValueGreaterThanRelationConstraint"
        - $ref: "#/components/schemas/boxes-v2-FieldValueGreaterThanOrEqualRelationConstraint"
        - $ref: "#/components/schemas/boxes-v2-FieldValueLessThanRelationConstraint"
        - $ref: "#/components/schemas/boxes-v2-FieldValueLessThanOrEqualRelationConstraint"
        - $ref: "#/components/schemas/boxes-v2-FieldValueBetweenRelationConstraint"
        - $ref: "#/components/schemas/boxes-v2-FieldValueEqualToConstantRelationConstraint"
    boxes-v2-SchemaRelationOne:
      title: One relation per record
      type: object
      required:
        - type
        - schemaId
      properties:
        type:
          type: string
          enum:
            - one
          description: This value is used when a record of this schema can be related to one record of the schema identified by `schemaId`.
        schemaId:
          type: string
          example: 0790bd7c-8c2b-4e31-b01a-eee434331800
          description: UUID of the schema that the relation refers to
        constraints:
          type: array
          description: An array of relation constraints.
          items:
            $ref: "#/components/schemas/boxes-v2-SchemaRelationConstraint"
    boxes-v2-SchemaRelationMany:
      title: Many relations per record
      type: object
      required:
        - type
        - schemaId
      properties:
        type:
          type: string
          enum:
            - many
          description: This value is used when a record of this schema can be related to more than one record of the schema identified by `schemaId`.
        schemaId:
          type: string
          example: 0790bd7c-8c2b-4e31-b01a-eee434331800
          description: UUID of the schema that the relation refers to
        constraints:
          type: array
          description: An array of relation constraints.
          items:
            $ref: "#/components/schemas/boxes-v2-SchemaRelationConstraint"
    boxes-v2-SchemaRelationItem:
      description: Each object is named after the relation it refers to.
      oneOf:
        - $ref: "#/components/schemas/boxes-v2-SchemaRelationOne"
        - $ref: "#/components/schemas/boxes-v2-SchemaRelationMany"
    boxes-v2-SchemaRelations:
      type: object
      description: This object stores information (as objects) about relations to other schemas.
      additionalProperties:
        $ref: "#/components/schemas/boxes-v2-SchemaRelationItem"
    boxes-v2-RecordRelationOne:
      title: One relation
      type: object
      required:
        - type
        - recordId
      properties:
        type:
          type: string
          enum:
            - one
          description: This value is used when a record can store relations to only one other record.
        recordId:
          type: string
          example: 0790bd7c-8c2b-4e31-b01a-eee434331800
          description: UUID of the related record
    boxes-v2-RecordRelationMany:
      title: Many relations
      type: object
      required:
        - type
        - recordIds
      properties:
        type:
          type: string
          enum:
            - many
          description: This value is used when a record can store relations to more than one other record.
        recordIds:
          type: array
          description: An array of related record UUIDs
          items:
            $ref: "#/components/schemas/boxes-v2-RecordId"
    boxes-v2-RecordRelationItem:
      title: Relation
      description: Each object is named after the relation it references.
      discriminator:
        propertyName: type
        mapping:
          one: "#/components/schemas/boxes-v2-RecordRelationOne"
          many: "#/components/schemas/boxes-v2-RecordRelationMany"
      oneOf:
        - $ref: "#/components/schemas/boxes-v2-RecordRelationOne"
        - $ref: "#/components/schemas/boxes-v2-RecordRelationMany"
    boxes-v2-RecordRelations:
      type: object
      description: This objects stores information (as objects) about relations to other records. Each object is named after the relation. For an example of relation usage, see the description of [this endpoint](#operation/addRelationToSchema)
      additionalProperties:
        $ref: "#/components/schemas/boxes-v2-RecordRelationItem"
    boxes-v2-SchemaInput:
      type: object
      required:
        - schemaName
        - layout
        - fields
      properties:
        schemaName:
          $ref: "#/components/schemas/boxes-v2-SchemaName"
        primaryKey:
          $ref: "#/components/schemas/boxes-v2-SchemaPrimaryKey"
        fields:
          $ref: "#/components/schemas/boxes-v2-Fields"
        layout:
          $ref: "#/components/schemas/boxes-v2-Layout"
        tags:
          $ref: "#/components/schemas/boxes-v2-SchemaTags"
    boxes-v2-SchemaPrimaryKey:
      oneOf:
        - $ref: "#/components/schemas/boxes-v2-SchemaPrimaryKeyAuto"
        - $ref: "#/components/schemas/boxes-v2-SchemaPrimaryKeySingleField"
      discriminator:
        propertyName: type
        mapping:
          auto_pk: "#/components/schemas/boxes-v2-SchemaPrimaryKeyAuto"
          single_field_pk: "#/components/schemas/boxes-v2-SchemaPrimaryKeySingleField"
    boxes-v2-SchemaPrimaryKeyAuto:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - auto_pk
    boxes-v2-SchemaPrimaryKeySingleField:
      type: object
      required:
        - type
        - fieldName
      properties:
        type:
          type: string
          enum:
            - single_field_pk
        fieldName:
          type: string
          description: Name of field of valid type in schema
    boxes-v2-SchemaTags:
      type: array
      description: Tags assigned to the schema
      items:
        type: string
        description: Name of the tag
    boxes-v2-SchemaName:
      type: string
      example: firstSchema
      description: Name of the schema
    boxes-v2-Schema:
      type: object
      required:
        - businessProfileId
        - primaryKey
        - schemaName
        - schemaId
        - createdAt
        - createdBy
        - modifiedAt
        - modifiedBy
        - fields
        - layout
        - relations
        - tags
        - permissionStatus
      properties:
        businessProfileId:
          type: integer
          example: "48"
          description: Workspace ID
        primaryKey:
          $ref: "#/components/schemas/boxes-v2-SchemaPrimaryKey"
        schemaName:
          $ref: "#/components/schemas/boxes-v2-SchemaName"
        schemaId:
          type: string
          format: uuid
          example: 86403a7d-1120-491a-a789-3d328d91193d
          description: UUID of the schema
        createdAt:
          type: string
          example: 2020-07-07T09:03:13.390101Z
          description: Time of schema creation
        createdBy:
          type: number
          example: "1234"
          description: ID of the user who created the schema
        modifiedAt:
          type: string
          example: 2020-07-07T09:03:13.390101Z
          description: Time of last modification of the schema
        modifiedBy:
          type: number
          example: "1234"
          description: ID of the user who modified the schema
        deletedAt:
          type: string
          example: 2020-07-07T09:03:13.390101Z
          description: Time of schema deletion
        deletedBy:
          type: number
          example: "1234"
          description: ID of the user who deleted the schema
        fields:
          $ref: "#/components/schemas/boxes-v2-Fields"
        layout:
          $ref: "#/components/schemas/boxes-v2-Layout"
        relations:
          $ref: "#/components/schemas/boxes-v2-SchemaRelations"
        tags:
          $ref: "#/components/schemas/boxes-v2-SchemaTags"
        permissionStatus:
          $ref: "#/components/schemas/boxes-v2-PermissionStatus"
    boxes-v2-SchemaProjection:
      type: object
      required:
        - schemaId
        - schemaName
      properties:
        schemaId:
          type: string
          format: uuid
          example: 4da878bc-ed5d-4d32-b31c-b6f7cc68936f
          description: UUID of the schema
        schemaName:
          type: string
          example: schema1
          description: Name of the schema
    boxes-v2-PaginatedSchema:
      type: object
      required:
        - data
        - pagination
      properties:
        data:
          type: array
          description: A list of schemas
          items:
            $ref: "#/components/schemas/boxes-v2-Schema"
        pagination:
          $ref: "#/components/schemas/boxes-v2-Pagination"
    boxes-v2-PaginatedSchemaProjection:
      type: object
      required:
        - data
        - pagination
      properties:
        data:
          type: array
          description: A list of schema names
          items:
            $ref: "#/components/schemas/boxes-v2-SchemaProjection"
        pagination:
          $ref: "#/components/schemas/boxes-v2-Pagination"
    boxes-v2-RulePredicate:
      oneOf:
        - $ref: "#/components/schemas/boxes-v2-RulePredicateOr"
        - $ref: "#/components/schemas/boxes-v2-RulePredicateAnd"
        - $ref: "#/components/schemas/boxes-v2-RulePredicateNeg"
        - $ref: "#/components/schemas/boxes-v2-RulePredicateId"
      discriminator:
        propertyName: type
        mapping:
          OR: "#/components/schemas/boxes-v2-RulePredicateOr"
          AND: "#/components/schemas/boxes-v2-RulePredicateAnd"
          NEG: "#/components/schemas/boxes-v2-RulePredicateNeg"
          ID: "#/components/schemas/boxes-v2-RulePredicateId"
    boxes-v2-RulePredicateOr:
      type: object
      required:
        - type
        - left
        - right
      properties:
        type:
          type: string
          enum:
            - OR
        left:
          $ref: "#/components/schemas/boxes-v2-RulePredicate"
        right:
          $ref: "#/components/schemas/boxes-v2-RulePredicate"
    boxes-v2-RulePredicateAnd:
      type: object
      required:
        - type
        - left
        - right
      properties:
        type:
          type: string
          enum:
            - AND
        left:
          $ref: "#/components/schemas/boxes-v2-RulePredicate"
        right:
          $ref: "#/components/schemas/boxes-v2-RulePredicate"
    boxes-v2-RulePredicateNeg:
      type: object
      required:
        - type
        - pred
      properties:
        type:
          type: string
          enum:
            - NEG
        pred:
          $ref: "#/components/schemas/boxes-v2-RulePredicate"
    boxes-v2-RulePredicateId:
      type: object
      required:
        - type
        - pred
      properties:
        type:
          type: string
          enum:
            - ID
        pred:
          $ref: "#/components/schemas/boxes-v2-RuleSinglePredicate"
    boxes-v2-RuleSinglePredicate:
      oneOf:
        - $ref: "#/components/schemas/boxes-v2-RuleSchemaPredicate"
        - $ref: "#/components/schemas/boxes-v2-RuleRecordPredicate"
      discriminator:
        propertyName: resourceType
        mapping:
          schema: "#/components/schemas/boxes-v2-RuleSchemaPredicate"
          record: "#/components/schemas/boxes-v2-RuleRecordPredicate"
    boxes-v2-RuleSchemaPredicate:
      type: object
      required:
        - resourceType
        - fieldName
        - propertyPath
        - expression
      properties:
        resourceType:
          type: string
          enum:
            - schema
        fieldName:
          type: string
        propertyPath:
          type: array
          items:
            type: string
        expression:
          type: object
    boxes-v2-RuleRecordPredicate:
      type: object
      required:
        - resourceType
        - fieldName
        - propertyPath
        - expression
      properties:
        resourceType:
          type: string
          enum:
            - record
        fieldName:
          type: string
        propertyPath:
          type: array
          items:
            type: string
        expression:
          type: object
    boxes-v2-RecordInput:
      type: object
      required:
        - fields
      properties:
        fields:
          $ref: "#/components/schemas/boxes-v2-RecordFields"
    boxes-v2-RelativeUpdateInput:
      type: object
      required:
        - actions
      properties:
        actions:
          type: object
          additionalProperties:
            $ref: "#/components/schemas/boxes-v2-NumberValueRelativeUpdate"
    boxes-v2-NumberValueRelativeUpdate:
      type: object
      properties:
        changeBy:
          type: number
          description: The value is the number to add/subtract.
      required:
        - changeBy
    boxes-v2-RecordFields:
      type: object
      description: Fields and their values. Each field is an array of value objects (even if the field type requires only a single value).
      additionalProperties:
        $ref: "#/components/schemas/boxes-v2-Value"
    boxes-v2-RecordId:
      type: string
      example: 10c681d9-5afc-4ea1-ac97-dd1d22c7b045
      description: UUID of the record
    boxes-v2-Record:
      type: object
      description: Details of a record
      required:
        - schemaId
        - recordId
        - fields
        - relations
        - createdAt
        - createdBy
        - modifiedAt
        - modifiedBy
        - businessProfileId
        - permissionStatus
      properties:
        schemaId:
          type: string
          format: uuid
          example: 10c681d9-5afc-4ea1-ac97-dd1d22c7b045
          description: Id of the schema that was used to create this record
        recordId:
          $ref: "#/components/schemas/boxes-v2-RecordId"
        businessProfileId:
          type: integer
          example: "48"
          description: Workspace ID
        createdAt:
          type: string
          example: 2020-07-07T09:03:13.390101Z
          description: Time of record creation
        createdBy:
          type: number
          example: "1234"
          description: ID of the user who created the record
        modifiedAt:
          type: string
          example: 2020-07-07T09:03:13.390101Z
          description: Time of record last modification
        modifiedBy:
          type: number
          example: "1234"
          description: ID of the user who modified the record
        deletedAt:
          type: string
          example: 2020-07-07T09:03:13.390101Z
          description: Time of record deletion
        deletedBy:
          type: number
          example: "1234"
          description: ID of the user who deleted the record
        fields:
          $ref: "#/components/schemas/boxes-v2-RecordFields"
        relations:
          $ref: "#/components/schemas/boxes-v2-RecordRelations"
        permissionStatus:
          $ref: "#/components/schemas/boxes-v2-PermissionStatus"
    boxes-v2-PermissionStatus:
      type: string
      enum:
        - private
        - restricted
        - public
        - read_only
      example: private
      description: Permission status of a record
    boxes-v2-PaginatedRecord:
      type: object
      required:
        - data
        - pagination
      properties:
        data:
          type: array
          description: A list of records
          items:
            $ref: "#/components/schemas/boxes-v2-Record"
        pagination:
          $ref: "#/components/schemas/boxes-v2-Pagination"
    boxes-v2-PaginatedDocumentation:
      type: object
      required:
        - data
        - pagination
      properties:
        data:
          type: array
          description: An array of paths that can be used to retrieve schema specifications.
          items:
            type: string
        pagination:
          $ref: "#/components/schemas/boxes-v2-Pagination"
    boxes-v2-Pagination:
      type: object
      description: Pagination metadata
      required:
        - limit
        - page
        - pages
        - total
      properties:
        limit:
          type: number
          example: 3
          description: The number of entries per page
        page:
          type: number
          example: 1
          description: The current page
        pages:
          type: number
          example: "10"
          description: The total number of pages
        total:
          type: number
          example: "29"
          description: The total number of entries on all pages
    brickworks-service-SchemaPagingResult:
      type: object
      x-class-name: SchemaPagingResult
      x-interface-name-ts: SchemaPagingResult
      required:
        - meta
        - data
      properties:
        meta:
          $ref: "#/components/schemas/brickworks-service-Meta"
        data:
          type: array
          description: Array of schemas
          items:
            $ref: "#/components/schemas/brickworks-service-Schema"
    brickworks-service-Schema:
      type: object
      x-class-name: Schema
      x-interface-name-ts: Schema
      description: Schema object
      required:
        - id
        - appId
        - displayName
        - createdBy
        - updatedBy
        - createdAt
        - updatedAt
        - audience
      properties:
        id:
          $ref: "#/components/schemas/brickworks-service-SchemaId"
        appId:
          $ref: "#/components/schemas/brickworks-service-SchemaAppId"
        displayName:
          $ref: "#/components/schemas/brickworks-service-SchemaDisplayName"
        description:
          $ref: "#/components/schemas/brickworks-service-SchemaDescription"
        fields:
          $ref: "#/components/schemas/brickworks-service-FieldsObject"
        displayConfiguration:
          $ref: "#/components/schemas/brickworks-service-SchemaDisplayConfiguration"
        createdBy:
          $ref: "#/components/schemas/brickworks-service-CreatedBy"
        updatedBy:
          $ref: "#/components/schemas/brickworks-service-UpdatedBy"
        publishedBy:
          $ref: "#/components/schemas/brickworks-service-PublishedBy"
        deletedBy:
          $ref: "#/components/schemas/brickworks-service-DeletedBy"
        createdAt:
          $ref: "#/components/schemas/brickworks-service-CreatedAt"
        updatedAt:
          $ref: "#/components/schemas/brickworks-service-UpdatedAt"
        publishedAt:
          $ref: "#/components/schemas/brickworks-service-PublishedAt"
        deletedAt:
          $ref: "#/components/schemas/brickworks-service-DeletedAt"
        version:
          $ref: "#/components/schemas/brickworks-service-SchemaVersion"
        audience:
          $ref: "#/components/schemas/brickworks-service-Audience"
        schemaType:
          $ref: "#/components/schemas/brickworks-service-SchemaType"
        fieldContextConfig:
          $ref: "#/components/schemas/brickworks-service-FieldContextConfig"
    brickworks-service-SchemaPreviewData:
      type: object
      x-class-name: SchemaPreviewData
      x-interface-name-ts: SchemaPreviewData
      description: Schema preview data
      required:
        - schemaType
      properties:
        fields:
          $ref: "#/components/schemas/brickworks-service-FieldsObject"
        audience:
          $ref: "#/components/schemas/brickworks-service-Audience"
        schemaType:
          $ref: "#/components/schemas/brickworks-service-SchemaType"
    brickworks-service-SchemaId:
      type: string
      format: uuid
      description: Unique ID of the schema, generated automatically.
    brickworks-service-SchemaAppId:
      type: string
      description: |
        App ID of the schema. This is used as the identifier of the schema and must be unique. This ID cannot be changed after the schema is created.  
        In the Synerise Portal, this parameter is called **API name**. 
    brickworks-service-SchemaDisplayName:
      type: string
      description: Schema name shown to users in the Synerise Portal
    brickworks-service-SchemaDescription:
      type: string
      description: Schema description
    brickworks-service-FieldsObject:
      type: object
      x-class-name: FieldsObject
      x-interface-name-ts: FieldsObject
      description: The content of the schema.
      properties:
        type:
          type: string
          description: The root field of the schema is always an object, and it includes all the other fields.
          enum:
            - object
        properties:
          $ref: "#/components/schemas/brickworks-service-FieldFormMap"
        required:
          type: array
          description: A list of fields (field key names) that must have a value in the record.
          items:
            type: string
        allOf:
          type: array
          description: |
            
            Additional validation for the fields. To learn more about conditionals, see the [JSON Schema documentation](https://json-schema.org/understanding-json-schema/reference/conditionals#ifthenelse).

            The Synerise Web Portal only supports making a field available and required when another field meets a condition. Using other configurations works in the API, but may cause issues when trying to use the Synerise Web Portal.  

            The following example is a condition supported by the Portal: the `accountNumber` field becomes available (and must be filled) when `paymentType` is `transfer`.
            ```
            "fields": {
                "allOf": [
                    {
                        "if": {
                            "required": [
                                "paymentType"
                            ],
                            "properties": {
                                "paymentType": {
                                    "const": "transfer"
                                }
                            }
                        },
                        "then": {
                            "required": [
                                "accountNumber"
                            ],
                            "properties": {}
                        }
                    }
                ],
            ...
            }
            ```
            For Portal compatibility, you can only change the field condition (`const` in the above example) to a different one. The `pattern` condition and `else` statements are currently not supported by the Portal.  
          items:
            $ref: "#/components/schemas/brickworks-service-ValidationConditions"
        additionalProperties:
          type: boolean
          description: System parameter, generated automatically. Don't send this in requests.
      required:
        - type
        - properties
        - required
    brickworks-service-SchemaDisplayConfiguration:
      type: object
      x-class-name: SchemaDisplayConfiguration
      x-interface-name-ts: SchemaDisplayConfiguration
      description: The layout details of the schema
      properties:
        ordering:
          type: object
          description: Order of the fields. If not included, the backend creates the ordering in alphabetical order.
          additionalProperties:
            description: The name of the field is the key in this object and the value is its position in the schema (`0` is displayed first in the Synerise Portal).
            type: integer
            minimum: 0
            format: int32
        metadata:
          type: object
          description: Configuration of displaying the fields in the editor
          additionalProperties:
            $ref: "#/components/schemas/brickworks-service-FieldMetadata"
      required:
        - ordering
        - metadata
    brickworks-service-CreatedBy:
      type: integer
      format: int64
      description: ID of the user who created the resource. If created by a workspace, the value is `0`.
    brickworks-service-UpdatedBy:
      type: integer
      format: int64
      description: ID of the user who last updated the resource. If last updated by a workspace, the value is `0`.
    brickworks-service-PublishedBy:
      type: integer
      format: int64
      nullable: true
      description: ID of the user who published the resource. If published by a workspace, the value is `0`.
    brickworks-service-DeletedBy:
      type: integer
      format: int64
      nullable: true
      description: ID of the user who deleted the resource. If deleted by a workspace, the value is `0`.
    brickworks-service-CreatedAt:
      type: string
      format: date-time
      description: Time when the resource was created
    brickworks-service-UpdatedAt:
      type: string
      format: date-time
      description: Time when the resource was last updated
    brickworks-service-PublishedAt:
      type: string
      format: date-time
      nullable: true
      description: Time when the resource was published
    brickworks-service-DeletedAt:
      type: string
      format: date-time
      nullable: true
      description: Time when the resource was deleted
    brickworks-service-SchemaVersion:
      type: integer
      format: int32
      description: Schema version ID. For simple schemas, this is always `1`. When a schema is updated, the ID increases by 1.
    brickworks-service-Audience:
      type: object
      x-class-name: Audience
      x-interface-name-ts: Audience
      description: Definition of the profiles which can access content created from this schema.
      properties:
        targetType:
          type: string
          enum:
            - SEGMENT
            - QUERY
            - ALL
          description: |
            - ALL: Available to all profiles
            - SEGMENT: Available to a segmentation or segmentations of profiles, listed in `segments`
            - QUERY: Available to a segmentation of profiles defined with `query`
        segments:
          type: array
          description: Used when `targetType` is `SEGMENT`. This is a list of existing segmentations (identified by UUID) which define the audience.
          items:
            type: string
            format: uuid
            description: Segmentation UUID
        query:
          type: string
          description: Used when `targetType` is `QUERY`. This is a raw `analysis` object sent to the Analytics service, converted into a string. For details on how to create the analysis object, see the [API reference for creating segmentations](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#tag/Segmentations/operation/analytics2-segmentations-create).
          example: '{\"analysis\":{\"title\":\"notempty\",\"segments\":[{\"title\":\"notempty\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"exampleBool\"}}]}}]}}]}}'
    brickworks-service-SchemaType:
      type: string
      x-class-name: SchemaType
      x-interface-name-ts: SchemaType
      enum:
        - SIMPLE
        - VERSIONED
        - SINGLETON
      description: |
        - SIMPLE: a schema in which records can only have the PUBLISHED status.
        - VERSIONED: a schema in which records can be saved as drafts; and you can also access the version history.
        - SINGLETON: a schema which has no records. All fields must have default values. Values can still be inserted dynamically with Jinjava.
    brickworks-service-FieldForm:
      type: object
      x-class-name: FieldForm
      x-interface-name-ts: FieldForm
      description: Each key is the name of a field (called "API name" in the Synerise Portal).
      oneOf:
        - $ref: "#/components/schemas/brickworks-service-NumberForm"
        - $ref: "#/components/schemas/brickworks-service-BooleanForm"
        - $ref: "#/components/schemas/brickworks-service-StringForm"
        - $ref: "#/components/schemas/brickworks-service-IntegerForm"
        - $ref: "#/components/schemas/brickworks-service-EnumForm"
        - $ref: "#/components/schemas/brickworks-service-DateForm"
        - $ref: "#/components/schemas/brickworks-service-DateTimeForm"
        - $ref: "#/components/schemas/brickworks-service-ArrayForm"
        - $ref: "#/components/schemas/brickworks-service-UUIDForm"
        - $ref: "#/components/schemas/brickworks-service-JinJavaForm"
        - $ref: "#/components/schemas/brickworks-service-CatalogItemField"
        - $ref: "#/components/schemas/brickworks-service-KeyValueObject"
        - $ref: "#/components/schemas/brickworks-service-ExternalHttpSource"
        - $ref: "#/components/schemas/brickworks-service-ReferenceForm"
        - $ref: "#/components/schemas/brickworks-service-OneToManyForm"
        - $ref: "#/components/schemas/brickworks-service-MetricField"
        - $ref: "#/components/schemas/brickworks-service-AggregateField"
        - $ref: "#/components/schemas/brickworks-service-ExpressionField"
        - $ref: "#/components/schemas/brickworks-service-PromotionField"
        - $ref: "#/components/schemas/brickworks-service-FileField"
        - $ref: "#/components/schemas/brickworks-service-ImageField"
        - $ref: "#/components/schemas/brickworks-service-RecommendationField"
        - $ref: "#/components/schemas/brickworks-service-VoucherField"
        - $ref: "#/components/schemas/brickworks-service-UntypedJson"
        - $ref: "#/components/schemas/brickworks-service-UntypedArray"
        - $ref: "#/components/schemas/brickworks-service-UntypedForm"
        - $ref: "#/components/schemas/brickworks-service-ProfileAttributeField"
        - $ref: "#/components/schemas/brickworks-service-OneToManyFilterForm"
      discriminator:
        propertyName: subtype
        mapping:
          boolean: "#/components/schemas/brickworks-service-BooleanForm"
          string: "#/components/schemas/brickworks-service-StringForm"
          integer: "#/components/schemas/brickworks-service-IntegerForm"
          number: "#/components/schemas/brickworks-service-NumberForm"
          enum: "#/components/schemas/brickworks-service-EnumForm"
          date: "#/components/schemas/brickworks-service-DateForm"
          date-time: "#/components/schemas/brickworks-service-DateTimeForm"
          typed_array: "#/components/schemas/brickworks-service-ArrayForm"
          uuid: "#/components/schemas/brickworks-service-UUIDForm"
          jinjava: "#/components/schemas/brickworks-service-JinJavaForm"
          one_to_one: "#/components/schemas/brickworks-service-ReferenceForm"
          catalog_item: "#/components/schemas/brickworks-service-CatalogItemField"
          key_value: "#/components/schemas/brickworks-service-KeyValueObject"
          external_source: "#/components/schemas/brickworks-service-ExternalHttpSource"
          one_to_many: "#/components/schemas/brickworks-service-OneToManyForm"
          metric: "#/components/schemas/brickworks-service-MetricField"
          expression: "#/components/schemas/brickworks-service-ExpressionField"
          aggregate: "#/components/schemas/brickworks-service-AggregateField"
          promotion: "#/components/schemas/brickworks-service-PromotionField"
          file: "#/components/schemas/brickworks-service-FileField"
          image: "#/components/schemas/brickworks-service-ImageField"
          recommendation: "#/components/schemas/brickworks-service-RecommendationField"
          voucher: "#/components/schemas/brickworks-service-VoucherField"
          untyped_object: "#/components/schemas/brickworks-service-UntypedJson"
          untyped_array: "#/components/schemas/brickworks-service-UntypedArray"
          json: "#/components/schemas/brickworks-service-UntypedForm"
          client_attribute: "#/components/schemas/brickworks-service-ProfileAttributeField"
          filter: "#/components/schemas/brickworks-service-OneToManyFilterForm"
    brickworks-service-NumberForm:
      type: object
      title: Number
      x-class-name: NumberForm
      x-interface-name-ts: NumberForm
      description: This field type accepts static numeric values. `number` is used for floating-point values.
      properties:
        type:
          $ref: "#/components/schemas/brickworks-service-NumberType"
        subtype:
          $ref: "#/components/schemas/brickworks-service-NumberSubtype"
        minimum:
          type: number
          format: float
          description: Minimum value
        maximum:
          type: number
          format: float
          description: Maximum value
        unique:
          $ref: "#/components/schemas/brickworks-service-FieldUnique"
        searchable:
          $ref: "#/components/schemas/brickworks-service-FieldSearchable"
        default:
          type: number
          nullable: true
          description: The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record.
        isConstantField:
          $ref: "#/components/schemas/brickworks-service-IsConstantField"
      required:
        - type
        - subtype
    brickworks-service-BooleanForm:
      type: object
      title: Boolean
      x-class-name: BooleanForm
      x-interface-name-ts: BooleanForm
      properties:
        type:
          $ref: "#/components/schemas/brickworks-service-BooleanType"
        subtype:
          $ref: "#/components/schemas/brickworks-service-BooleanSubtype"
        unique:
          $ref: "#/components/schemas/brickworks-service-FieldUnique"
        searchable:
          $ref: "#/components/schemas/brickworks-service-FieldSearchable"
        default:
          nullable: true
          type: boolean
          description: The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record.
        isConstantField:
          $ref: "#/components/schemas/brickworks-service-IsConstantField"
      required:
        - type
        - subtype
    brickworks-service-StringForm:
      type: object
      title: String
      x-class-name: StringForm
      x-interface-name-ts: StringForm
      properties:
        type:
          $ref: "#/components/schemas/brickworks-service-StringType"
        subtype:
          $ref: "#/components/schemas/brickworks-service-StringSubtype"
        minLength:
          type: number
          format: int32
          description: Minimum number of characters in the string
        maxLength:
          type: number
          format: int32
          description: Maximum number of characters in the string
        pattern:
          type: string
          description: Regular expression that the string must match
        unique:
          $ref: "#/components/schemas/brickworks-service-FieldUnique"
        searchable:
          $ref: "#/components/schemas/brickworks-service-FieldSearchable"
        default:
          type: string
          nullable: true
          description: The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record.
        isConstantField:
          $ref: "#/components/schemas/brickworks-service-IsConstantField"
      required:
        - type
        - subtype
    brickworks-service-IntegerForm:
      type: object
      title: Integer
      x-class-name: IntegerForm
      x-interface-name-ts: IntegerForm
      properties:
        type:
          $ref: "#/components/schemas/brickworks-service-IntegerType"
        subtype:
          $ref: "#/components/schemas/brickworks-service-IntegerSubtype"
        minimum:
          type: number
          format: int32
          description: Minimum value
        maximum:
          type: number
          format: int32
          description: Maximum value
        unique:
          $ref: "#/components/schemas/brickworks-service-FieldUnique"
        searchable:
          $ref: "#/components/schemas/brickworks-service-FieldSearchable"
        default:
          type: number
          nullable: true
          description: The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record.
        isConstantField:
          $ref: "#/components/schemas/brickworks-service-IsConstantField"
      required:
        - type
        - subtype
    brickworks-service-EnumForm:
      type: object
      title: Enumeration
      x-class-name: EnumForm
      x-interface-name-ts: EnumForm
      description: This type of field defines a list of strings which can be used as the value. Only one of the allowed values can be saved in the record.
      properties:
        type:
          $ref: "#/components/schemas/brickworks-service-StringType"
        subtype:
          $ref: "#/components/schemas/brickworks-service-EnumSubtype"
        enum:
          type: array
          description: A list of strings which can be selected as the value
          items:
            type: string
        names:
          type: object
          description: |
            A mapping of the field values and their names displayed in the record.

            For example, if `enum` contains the value `exampleValue` and you want the UI to show `Example Value` on the list, set:
            ```
            "names": {
              "exampleValue": "Example Value"
            }
            ```
          additionalProperties:
            type: string
        default:
          type: string
          nullable: true
          description: The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record.
        isConstantField:
          $ref: "#/components/schemas/brickworks-service-IsConstantField"
      required:
        - type
        - subtype
        - enum
        - names
    brickworks-service-DateForm:
      type: object
      title: Date
      x-class-name: DateForm
      x-interface-name-ts: DateForm
      properties:
        type:
          $ref: "#/components/schemas/brickworks-service-StringType"
        subtype:
          $ref: "#/components/schemas/brickworks-service-DateSubtype"
        default:
          type: string
          format: date
          nullable: true
          description: The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record.
        isConstantField:
          $ref: "#/components/schemas/brickworks-service-IsConstantField"
      required:
        - type
        - subtype
    brickworks-service-DateTimeForm:
      type: object
      title: Date and time
      x-class-name: DateTimeForm
      x-interface-name-ts: DateTimeForm
      properties:
        type:
          $ref: "#/components/schemas/brickworks-service-StringType"
        subtype:
          $ref: "#/components/schemas/brickworks-service-DateTimeSubtype"
        default:
          type: string
          format: date-time
          nullable: true
          description: The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record.
        isConstantField:
          $ref: "#/components/schemas/brickworks-service-IsConstantField"
      required:
        - type
        - subtype
    brickworks-service-ArrayForm:
      type: object
      title: Array
      x-class-name: ArrayForm
      x-interface-name-ts: ArrayForm
      description: This type of field accepts an array of values. The type of values is defined in `items`
      properties:
        type:
          $ref: "#/components/schemas/brickworks-service-ArrayType"
        subtype:
          $ref: "#/components/schemas/brickworks-service-TypedArraySubtype"
        items:
          type: object
          description: The definition of the type of value allowed in the array. All values must be of the same type.
          oneOf:
            - $ref: "#/components/schemas/brickworks-service-NumberForm"
            - $ref: "#/components/schemas/brickworks-service-IntegerForm"
            - $ref: "#/components/schemas/brickworks-service-BooleanForm"
            - $ref: "#/components/schemas/brickworks-service-StringForm"
            - $ref: "#/components/schemas/brickworks-service-EnumForm"
          discriminator:
            propertyName: subtype
            mapping:
              number: "#/components/schemas/brickworks-service-NumberForm"
              integer: "#/components/schemas/brickworks-service-IntegerForm"
              boolean: "#/components/schemas/brickworks-service-BooleanForm"
              string: "#/components/schemas/brickworks-service-StringForm"
              enum: "#/components/schemas/brickworks-service-EnumForm"
        maxItems:
          type: number
          format: int32
          description: The maximum number of items allowed in the array
        uniqueItems:
          type: boolean
          description: When `true`, the values in the array must be unique
        default:
          type: array
          nullable: true
          description: The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record.
          items: {}
        isConstantField:
          $ref: "#/components/schemas/brickworks-service-IsConstantField"
      required:
        - type
        - items
        - subtype
    brickworks-service-UUIDForm:
      type: object
      title: UUID
      x-class-name: UUIDForm
      x-interface-name-ts: UUIDForm
      properties:
        type:
          $ref: "#/components/schemas/brickworks-service-StringType"
        subtype:
          $ref: "#/components/schemas/brickworks-service-UuidSubtype"
        default:
          type: string
          format: uuid
          title: UUID default
          x-class-name: UUIDFormDefault
          x-interface-name-ts: UUIDFormDefault
        isConstantField:
          $ref: "#/components/schemas/brickworks-service-IsConstantField"
      required:
        - type
        - subtype
    brickworks-service-JinJavaForm:
      type: object
      title: Jinjava
      x-class-name: JinJavaForm
      x-interface-name-ts: JinJavaForm
      properties:
        type:
          $ref: "#/components/schemas/brickworks-service-StringType"
        subtype:
          $ref: "#/components/schemas/brickworks-service-JinJavaSubtype"
        default:
          type: string
          nullable: true
          description: The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record.
        settings:
          $ref: "#/components/schemas/brickworks-service-JinJavaSettings"
        isConstantField:
          $ref: "#/components/schemas/brickworks-service-IsConstantField"
      required:
        - type
        - subtype
    brickworks-service-CatalogItemField:
      type: object
      title: Catalog
      x-class-name: CatalogItemField
      x-interface-name-ts: CatalogItemField
      properties:
        type:
          $ref: "#/components/schemas/brickworks-service-ObjectType"
        subtype:
          $ref: "#/components/schemas/brickworks-service-CatalogItemSubtype"
        properties:
          type: object
          title: CatalogItemFieldProperties
          description: |
            The data of the catalog. `id` is the default catalogId and `itemKey` is the default unique identifier of an item. You can override both when creating/updating a record.
          properties:
            id:
              $ref: "#/components/schemas/brickworks-service-StringForm"
            itemKey:
              oneOf:
                - $ref: "#/components/schemas/brickworks-service-StringForm"
                - $ref: "#/components/schemas/brickworks-service-JinJavaForm"
              discriminator:
                propertyName: subtype
                mapping:
                  jinjava: "#/components/schemas/brickworks-service-JinJavaForm"
                  string: "#/components/schemas/brickworks-service-StringForm"
            nullOnFail:
              $ref: "#/components/schemas/brickworks-service-BooleanForm"
          required:
            - id
            - itemKey
        default:
          type: object
          title: Catalog default
          x-class-name: CatalogFieldDefault
          x-interface-name-ts: CatalogFieldDefault
          description: |
            The default value of the field.
              - This object overrides the defaults from the `properties` object.
              - **To set no default, send this object empty**. `"default": null` overrides `properties` with a null value.
              - This object is required when `isConstantField = true`
          properties:
            id:
              type: string
              description: Unique ID of a catalog
            itemKey:
              type: string
              description: Static string or Jinjava that inserts the unique ID of an item in the catalog
        isConstantField:
          $ref: "#/components/schemas/brickworks-service-IsConstantField"
      required:
        - type
        - subtype
        - properties
    brickworks-service-KeyValueObject:
      type: object
      title: Key and value
      x-class-name: KeyValueObject
      x-interface-name-ts: KeyValueObject
      description: A key/value map.
      properties:
        type:
          $ref: "#/components/schemas/brickworks-service-ObjectType"
        subtype:
          $ref: "#/components/schemas/brickworks-service-KeyValueSubtype"
        properties:
          $ref: "#/components/schemas/brickworks-service-FieldFormMap"
        default:
          type: object
          title: Key and value default
          x-class-name: KeyValueObjectDefault
          x-interface-name-ts: KeyValueObjectDefault
        isConstantField:
          $ref: "#/components/schemas/brickworks-service-IsConstantField"
        additionalProperties:
          type: boolean
      required:
        - type
        - subtype
    brickworks-service-ExternalHttpSource:
      type: object
      title: External source
      x-class-name: ExternalSourceField
      x-interface-name-ts: ExternalSourceField
      properties:
        type:
          $ref: "#/components/schemas/brickworks-service-ObjectType"
        subtype:
          $ref: "#/components/schemas/brickworks-service-ExternalSourceSubtype"
        sourceType:
          type: string
          enum:
            - http
        sourceId:
          type: string
          description: Unique ID of the external source definition
          format: uuid
        headers:
          $ref: "#/components/schemas/brickworks-service-KeyValueObject"
        params:
          $ref: "#/components/schemas/brickworks-service-KeyValueObject"
        body:
          $ref: "#/components/schemas/brickworks-service-FieldForm"
        properties:
          $ref: "#/components/schemas/brickworks-service-ExternalSourceFieldProperties"
        default:
          type: object
          title: External source default
          x-class-name: ExternalHttpSourceDefault
          x-interface-name-ts: ExternalHttpSourceDefault
          nullable: true
          properties:
            headers:
              type: object
              description: Request headers
              additionalProperties: true
            params:
              type: object
              description: The url parameters
              additionalProperties: true
            body:
              type: object
              description: Request body
              additionalProperties: true
            properties:
              type: object
              title: External source properties
              x-class-name: ExternalHttpSourcePropertiesValues
              x-interface-name-ts: ExternalHttpSourcePropertiesValues
              properties:
                nullOnFail:
                  type: boolean
        isConstantField:
          $ref: "#/components/schemas/brickworks-service-IsConstantField"
      required:
        - type
        - subtype
        - sourceType
        - sourceId
    brickworks-service-ReferenceForm:
      type: object
      title: Record reference
      x-class-name: ReferenceForm
      x-interface-name-ts: ReferenceForm
      description: Definition of a reference to another schema
      properties:
        type:
          $ref: "#/components/schemas/brickworks-service-StringType"
        subtype:
          $ref: "#/components/schemas/brickworks-service-OneToOneSubtype"
        referenceId:
          type: string
          description: Unique identifier of the schema you want to access a record from. When creating a record with this field, you will provide the UUID of the referenced record from that schema.
        default:
          type: string
          format: uuid
          description: The default record to reference. In "one to many" fields, use the `default` array in the parent object instead of this property.
        isConstantField:
          $ref: "#/components/schemas/brickworks-service-IsConstantField"
      required:
        - type
        - subtype
    brickworks-service-OneToManyForm:
      type: object
      title: Multiple record reference
      x-class-name: OneToManyForm
      x-interface-name-ts: OneToManyForm
      description: This type of field allows you to reference multiple records from another schema. `items` defines the target schema.
      properties:
        type:
          $ref: "#/components/schemas/brickworks-service-ArrayType"
        subtype:
          $ref: "#/components/schemas/brickworks-service-OneToManySubtype"
        items:
          $ref: "#/components/schemas/brickworks-service-ReferenceForm"
        maxItems:
          type: number
          minimum: 1
          maximum: 100
          default: 20
          description: The maximum number of records that can be referenced.
        default:
          type: array
          description: An array of default record references (record UUIDs)
          items:
            type: string
            format: uuid
        isConstantField:
          $ref: "#/components/schemas/brickworks-service-IsConstantField"
      required:
        - type
        - items
        - subtype
    brickworks-service-MetricField:
      type: object
      description: Reference to a Synerise analysis
      title: Metric
      x-class-name: MetricField
      x-interface-name-ts: MetricField
      properties:
        type:
          $ref: "#/components/schemas/brickworks-service-ObjectType"
        subtype:
          $ref: "#/components/schemas/brickworks-service-MetricSubtype"
        properties:
          type: object
          description: |
            - `id` is the default ID of an metric.
            - `variables` is a set of variables to pass when the analysis has dynamic fields.
            - `includeDetails` defines if the generated object includes just the result of the analysis (true) or additional details such as the ID of the analysis and profile ID for which the analysis was made (false). This can't be changed per record.
          properties:
            id:
              $ref: "#/components/schemas/brickworks-service-StringForm"
            variables:
              $ref: "#/components/schemas/brickworks-service-KeyValueObject"
            includeDetails:
              $ref: "#/components/schemas/brickworks-service-BooleanForm"
            nullOnFail:
              $ref: "#/components/schemas/brickworks-service-BooleanForm"
          required:
            - id
        default:
          type: object
          title: Metric default
          x-class-name: MetricFieldDefault
          x-interface-name-ts: MetricFieldDefault
          nullable: true
          description: |
            The default value of the field.
              - This object overrides the defaults from the `properties` object.
              - **To set no default, send this object empty**. `"default": null` overrides `properties` with a null value.
              - This object is required when `isConstantField = true`
          properties:
            id:
              type: string
              description: UUID of an analysis
            variables:
              type: object
              additionalProperties:
                description: Values of dynamic keys in the analysis
            includeDetails:
              type: boolean
              description: Defines if the generated object includes just the result of the analysis (true) or additional details such as the ID of the analysis and profile ID for which the analysis was made (false). This can't be changed per record.
        isConstantField:
          $ref: "#/components/schemas/brickworks-service-IsConstantField"
      required:
        - type
        - subtype
        - properties
    brickworks-service-AggregateField:
      type: object
      description: Reference to a Synerise analysis
      title: Aggregate
      x-class-name: AggregateField
      x-interface-name-ts: AggregateField
      properties:
        type:
          $ref: "#/components/schemas/brickworks-service-ObjectType"
        subtype:
          $ref: "#/components/schemas/brickworks-service-AggregateSubtype"
        properties:
          type: object
          description: |
            - `id` is the default ID of an analysis.
            - `variables` is a set of variables to pass when the analysis has dynamic fields.
            - `includeDetails` defines if the generated object includes just the result of the analysis (true) or additional details such as the ID of the analysis and profile ID for which the analysis was made (false). This can't be changed per record.
          properties:
            id:
              $ref: "#/components/schemas/brickworks-service-StringForm"
            variables:
              $ref: "#/components/schemas/brickworks-service-KeyValueObject"
            includeDetails:
              $ref: "#/components/schemas/brickworks-service-BooleanForm"
            nullOnFail:
              $ref: "#/components/schemas/brickworks-service-BooleanForm"
          required:
            - id
        default:
          type: object
          title: Aggregate default
          x-class-name: AggregateFieldDefault
          x-interface-name-ts: AggregateFieldDefault
          nullable: true
          description: |
            The default value of the field.
              - This object overrides the defaults from the `properties` object.
              - **To set no default, send this object empty**. `"default": null` overrides `properties` with a null value.
              - This object is required when `isConstantField = true`
          properties:
            id:
              type: string
              description: UUID of an analysis
            variables:
              type: object
              additionalProperties:
                description: Values of dynamic keys in the analysis
            includeDetails:
              type: boolean
              description: Defines if the generated object includes just the result of the analysis (true) or additional details such as the ID of the analysis and profile ID for which the analysis was made (false). This can't be changed per record.
        isConstantField:
          $ref: "#/components/schemas/brickworks-service-IsConstantField"
      required:
        - type
        - subtype
        - properties
    brickworks-service-ExpressionField:
      type: object
      description: Reference to a Synerise analysis
      title: Expression
      x-class-name: ExpressionField
      x-interface-name-ts: ExpressionField
      properties:
        type:
          $ref: "#/components/schemas/brickworks-service-ObjectType"
        subtype:
          $ref: "#/components/schemas/brickworks-service-ExpressionSubtype"
        properties:
          type: object
          description: |
            - `id` is the default ID of an expression.
            - `variables` is a set of variables to pass when the analysis has dynamic fields.
            - `includeDetails` defines if the generated object includes just the result of the analysis (true) or additional details such as the ID of the analysis and profile ID for which the analysis was made (false). This can't be changed per record.
          properties:
            id:
              $ref: "#/components/schemas/brickworks-service-StringForm"
            variables:
              $ref: "#/components/schemas/brickworks-service-KeyValueObject"
            includeDetails:
              $ref: "#/components/schemas/brickworks-service-BooleanForm"
            nullOnFail:
              $ref: "#/components/schemas/brickworks-service-BooleanForm"
          required:
            - id
        default:
          type: object
          x-class-name: ExpressionFieldDefault
          x-interface-name-ts: ExpressionFieldDefault
          title: Expression default
          nullable: true
          description: |
            The default value of the field.
              - This object overrides the defaults from the `properties` object.
              - **To set no default, send this object empty**. `"default": null` overrides `properties` with a null value.
              - This object is required when `isConstantField = true`
          properties:
            id:
              type: string
              description: UUID of an analysis
            variables:
              type: object
              additionalProperties:
                description: Values of dynamic keys in the analysis
            includeDetails:
              type: boolean
              description: Defines if the generated object includes just the result of the analysis (true) or additional details such as the ID of the analysis and profile ID for which the analysis was made (false). This can't be changed per record.
        isConstantField:
          $ref: "#/components/schemas/brickworks-service-IsConstantField"
      required:
        - type
        - subtype
        - properties
    brickworks-service-PromotionField:
      type: object
      title: Promotion
      x-class-name: PromotionField
      x-interface-name-ts: PromotionField
      description: Reference to a promotion
      properties:
        type:
          $ref: "#/components/schemas/brickworks-service-ObjectType"
        subtype:
          $ref: "#/components/schemas/brickworks-service-PromotionSubtype"
        properties:
          $ref: "#/components/schemas/brickworks-service-PromotionFieldProperties"
        default:
          type: object
          title: Promotion default
          x-class-name: PromotionFieldDefault
          x-interface-name-ts: PromotionFieldDefault
          description: |
            The default value of the field.
              - This object overrides the defaults from the `properties` object.
              - **To set no default, send this object empty**. `"default": null` overrides `properties` with a null value.
              - This object is required when `isConstantField = true`
          properties:
            id:
              type: string
              description: ID of a promotion campaign
        isConstantField:
          $ref: "#/components/schemas/brickworks-service-IsConstantField"
      required:
        - type
        - subtype
        - properties
    brickworks-service-FileField:
      type: object
      title: File
      x-class-name: FileField
      x-interface-name-ts: FileField
      properties:
        type:
          $ref: "#/components/schemas/brickworks-service-ObjectType"
        subtype:
          $ref: "#/components/schemas/brickworks-service-FileSubtype"
        properties:
          $ref: "#/components/schemas/brickworks-service-FileFieldProperties"
        default:
          type: object
          title: File default
          x-class-name: FileFieldDefault
          x-interface-name-ts: FileFieldDefault
          description: |
            The default value of the field.
              - This object overrides the defaults from the `properties` object.
              - **To set no default, send this object empty**. `"default": null` overrides `properties` with a null value.
              - This object is required when `isConstantField = true`
          properties:
            id:
              type: string
              description: Unique identifier of an image/file in the File Explorer
        isConstantField:
          $ref: "#/components/schemas/brickworks-service-IsConstantField"
      required:
        - type
        - subtype
        - properties
    brickworks-service-ImageField:
      type: object
      title: Image
      x-class-name: ImageField
      x-interface-name-ts: ImageField
      properties:
        type:
          $ref: "#/components/schemas/brickworks-service-ObjectType"
        subtype:
          $ref: "#/components/schemas/brickworks-service-ImageSubtype"
        properties:
          $ref: "#/components/schemas/brickworks-service-FileFieldProperties"
        default:
          type: object
          title: Image default
          x-class-name: ImageFieldDefault
          x-interface-name-ts: ImageFieldDefault
          description: |
            The default value of the field.
              - This object overrides the defaults from the `properties` object.
              - **To set no default, send this object empty**. `"default": null` overrides `properties` with a null value.
              - This object is required when `isConstantField = true`
          properties:
            id:
              type: string
              description: Unique identifier of an image/file in the File Explorer
        isConstantField:
          $ref: "#/components/schemas/brickworks-service-IsConstantField"
      required:
        - type
        - subtype
        - properties
    brickworks-service-RecommendationField:
      type: object
      title: Recommendation
      x-class-name: RecommendationField
      x-interface-name-ts: RecommendationField
      description: Reference to a recommendation campaign
      properties:
        type:
          $ref: "#/components/schemas/brickworks-service-ObjectType"
        subtype:
          $ref: "#/components/schemas/brickworks-service-RecommendationSubtype"
        properties:
          type: object
          title: Recommendation properties
          x-class-name: RecommendationFieldProperties
          x-interface-name-ts: RecommendationFieldProperties
          description: |
            - `id.default` defines the default recommendation campaign to generate a recommendation from.  
            - In `params.itemId`, you can add a default item context (required by some recommendation types):
              ```
              "itemId": {
                "type": "string",
                "subtype": "string"
                "default": "defaultItemIdForItemContext"
                }
              ```
          properties:
            id:
              $ref: "#/components/schemas/brickworks-service-StringForm"
            params:
              $ref: "#/components/schemas/brickworks-service-KeyValueObject"
            nullOnFail:
              $ref: "#/components/schemas/brickworks-service-BooleanForm"
          required:
            - id
        default:
          type: object
          title: Recommendation default
          x-class-name: RecommendationFieldDefault
          x-interface-name-ts: RecommendationFieldDefault
          description: |
            The default value of the field.
              - This object overrides the defaults from the `properties` object.
              - **To set no default, send this object empty**. `"default": null` overrides `properties` with a null value.
              - This object is required when `isConstantField = true`
          properties:
            id:
              type: string
              description: UUID of a recommendation campaign
            params:
              type: object
              title: Recommendation default params
              x-class-name: RecommendationFieldDefaultParams
              x-interface-name-ts: RecommendationFieldDefaultParams
              description: Item context
              properties:
                itemId:
                  type: string
                  description: Unique ID of an item context (required for some recommendation types)
        isConstantField:
          $ref: "#/components/schemas/brickworks-service-IsConstantField"
      required:
        - type
        - subtype
        - properties
    brickworks-service-VoucherField:
      type: object
      title: Voucher
      x-class-name: VoucherField
      x-interface-name-ts: VoucherField
      description: Reference to a voucher
      properties:
        type:
          $ref: "#/components/schemas/brickworks-service-ObjectType"
        subtype:
          $ref: "#/components/schemas/brickworks-service-VoucherSubtype"
        properties:
          type: object
          title: Voucher properties
          x-class-name: VoucherFieldProperties
          x-interface-name-ts: VoucherFieldProperties
          description: |
            - in `id.default`, enter the UUID of the voucher pool. It can be changed per record.
            - in `assign.default`:
                - `false` means that once a code from a given pool is retrieved to a profile, it becomes assigned to the profile and is always returned in subsequent requests.
                - `true` means that a different code is retrieved for a profile with every request. This can't be changed per record.
          properties:
            id:
              $ref: "#/components/schemas/brickworks-service-StringForm"
            assign:
              $ref: "#/components/schemas/brickworks-service-BooleanForm"
            nullOnFail:
              $ref: "#/components/schemas/brickworks-service-BooleanForm"
          required:
            - id
            - assign
        default:
          type: object
          title: Voucher default
          x-class-name: VoucherFieldDefault
          x-interface-name-ts: VoucherFieldDefault
          nullable: true
          description: |
            The default value of the field.
              - This object overrides the defaults from the `properties` object.
              - **To set no default, send this object empty**. `"default": null` overrides `properties` with a null value.
              - This object is required when `isConstantField = true`
          properties:
            id:
              type: string
              description: ID of the voucher
            assign:
              type: boolean
              description: |
                - `false` means that once a code from a given pool is retrieved to a profile, it becomes assigned to the profile and is always returned in subsequent requests.
                - `true` means that a different code is retrieved for a profile with every request. This can't be changed per record.
        isConstantField:
          $ref: "#/components/schemas/brickworks-service-IsConstantField"
      required:
        - type
        - subtype
        - properties
    brickworks-service-UntypedJson:
      type: object
      title: Untyped JSON
      x-class-name: UntypedJson
      x-interface-name-ts: UntypedJson
      properties:
        type:
          $ref: "#/components/schemas/brickworks-service-ObjectType"
        subtype:
          $ref: "#/components/schemas/brickworks-service-UntypedObjectSubtype"
        default:
          type: object
          nullable: true
          description: The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record.
          additionalProperties: true
        isConstantField:
          $ref: "#/components/schemas/brickworks-service-IsConstantField"
      required:
        - type
        - subtype
    brickworks-service-UntypedArray:
      type: object
      title: Untyped array
      x-class-name: UntypedArray
      x-interface-name-ts: UntypedArray
      description: This type of field accepts an array of values. The values can be of any data type.
      properties:
        type:
          $ref: "#/components/schemas/brickworks-service-ArrayType"
        subtype:
          $ref: "#/components/schemas/brickworks-service-UntypedArraySubtype"
        default:
          type: array
          nullable: true
          description: The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record.
          items: {}
        maxItems:
          type: number
          format: int32
        isConstantField:
          $ref: "#/components/schemas/brickworks-service-IsConstantField"
      required:
        - type
        - subtype
    brickworks-service-UntypedForm:
      type: object
      x-class-name: UntypedForm
      x-interface-name-ts: UntypedForm
      description: Field without typed structure
      properties:
        anyOf:
          type: array
          minItems: 2
          maxItems: 2
          items:
            oneOf:
              - $ref: "#/components/schemas/brickworks-service-UntypedJson"
              - $ref: "#/components/schemas/brickworks-service-UntypedArray"
        subtype:
          $ref: "#/components/schemas/brickworks-service-UntypedFormSubtype"
        default:
          type: object
          additionalProperties: true
        isConstantField:
          $ref: "#/components/schemas/brickworks-service-IsConstantField"
      required:
        - anyOf
        - subtype
    brickworks-service-ProfileAttributeField:
      type: object
      title: Profile attribute field
      x-class-name: ProfileAttributeField
      x-interface-name-ts: ProfileAttributeField
      properties:
        type:
          $ref: "#/components/schemas/brickworks-service-ObjectType"
        subtype:
          $ref: "#/components/schemas/brickworks-service-ProfileAttributeSubtype"
        settings:
          $ref: "#/components/schemas/brickworks-service-ProfileAttributeSettings"
        properties:
          $ref: "#/components/schemas/brickworks-service-ProfileAttributeProperties"
        default:
          type: object
          title: ProfileAttributeFieldDefault
          x-class-name: ProfileAttributeFieldDefault
          x-interface-name-ts: ProfileAttributeFieldDefault
          description: |
            The default value of the field.
              - This object overrides the defaults from the `properties` object.
              - **To set no default, send this object empty**. `"default": null` overrides `properties` with a null value.
              - This object is required when `isConstantField = true`
          properties:
            attributeName:
              type: string
              description: The name of the profile attribute to retrieve a value from when generating content from a record
        isConstantField:
          $ref: "#/components/schemas/brickworks-service-IsConstantField"
        additionalProperties:
          type: boolean
          description: Always false, don't send in requests
      required:
        - type
        - subtype
        - properties
    brickworks-service-OneToManyFilterForm:
      type: object
      title: Record reference filter
      x-class-name: OneToManyFilterForm
      x-interface-name-ts: OneToManyFilterForm
      properties:
        type:
          $ref: "#/components/schemas/brickworks-service-ObjectType"
        subtype:
          $ref: "#/components/schemas/brickworks-service-OneToManyFilterSubtype"
        schemaId:
          $ref: "#/components/schemas/brickworks-service-SchemaId"
        properties:
          $ref: "#/components/schemas/brickworks-service-OneToManyFilterProperties"
        default:
          type: object
          title: One to many filter form default
          description: Default filter settings
          x-class-name: OneToManyFilterFormDefault
          x-interface-name-ts: OneToManyFilterFormDefault
          properties:
            query:
              type: string
              description: RSQL query to filter the records
            sortBy:
              type: string
              description: The property to sort by
              enum:
                - id
                - createdAt
                - updatedAt
            sortDirection:
              type: string
              description: Sorting direction
              enum:
                - asc
                - desc
        isConstantField:
          $ref: "#/components/schemas/brickworks-service-IsConstantField"
        additionalProperties:
          type: boolean
          description: Field generated automatically, don't send in requests.
      required:
        - type
        - subtype
        - schemaId
        - properties
    brickworks-service-OneToManyFilterProperties:
      type: object
      title: One to many filter properties
      description: |
        Definitions of the values allowed in the filter settings. If your integration flow involves using the Synerise Web Portal, you shouldn't use this object.  

        You can sort by these parameters:
        - `id`
        - `createdAt`
        - `updatedAt`
      x-class-name: OneToManyFilterProperties
      x-interface-name-ts: OneToManyFilterProperties
      properties:
        query:
          $ref: "#/components/schemas/brickworks-service-StringForm"
        sortBy:
          $ref: "#/components/schemas/brickworks-service-StringForm"
        sortDirection:
          $ref: "#/components/schemas/brickworks-service-StringForm"
      required:
        - query
        - sortBy
        - sortDirection
    brickworks-service-FieldUnique:
      type: boolean
      description: When true, the value in this field must be unique between all records created from this schema. This parameter can't be set on a field when more than 5 records exist for the schema.
    brickworks-service-FieldSearchable:
      type: boolean
      description: When true, the value in this field can be used to search and sort records.
    brickworks-service-IsConstantField:
      type: boolean
      default: false
      description: |
        When true:
        - you must set a default value.
        - that default value applies to all records and can't be overwritten in record create/update requests.
    brickworks-service-JinJavaSettings:
      type: object
      x-class-name: JinJavaSettings
      x-interface-name-ts: JinJavaSettings
      nullable: true
      description: Settings for casting the Jinjava result to a data type. Casting may not be successful - set the `strict` setting to decide how to proceed in that case.
      properties:
        castType:
          type: string
          description: The data type to try casting the Jinjava result to
          x-class-name: JinJavaCastType
          x-interface-name-ts: JinJavaCastType
          enum:
            - boolean
            - integer
            - number
            - json
        strict:
          type: boolean
          description: |
            Defines what happens when casting is not successful:
            - `true` throws an error in generating an object from a record
            - `false` sets the value to null
        removeWhitespaces:
          type: boolean
          description: |
            When `true`, all whitespace characters (e.g. `\r`, `\n`, spaces, tabs) are removed from the Jinjava render result before casting.
      required:
        - strict
        - castType
    brickworks-service-ExternalSourceFieldProperties:
      type: object
      x-class-name: ExternalSourceFieldProperties
      x-interface-name-ts: ExternalSourceFieldProperties
      properties:
        nullOnFail:
          $ref: "#/components/schemas/brickworks-service-BooleanForm"
      required:
        - nullOnFail
    brickworks-service-PromotionFieldProperties:
      type: object
      x-class-name: PromotionFieldProperties
      x-interface-name-ts: PromotionFieldProperties
      description: "`id` defines the promotion to access. In `default`, enter the default promotion UUID."
      properties:
        id:
          $ref: "#/components/schemas/brickworks-service-StringForm"
        nullOnFail:
          $ref: "#/components/schemas/brickworks-service-BooleanForm"
      required:
        - id
    brickworks-service-FileFieldProperties:
      type: object
      x-class-name: FileFieldProperties
      x-interface-name-ts: FileFieldProperties
      description: "`id` defines the unique ID of a [file uploaded to Synerise](https://hub.synerise.com/docs/assets/files-explorer/). In `default`, enter the default file ID."
      properties:
        id:
          $ref: "#/components/schemas/brickworks-service-StringForm"
    brickworks-service-ProfileAttributeSettings:
      type: object
      x-class-name: ProfileAttributeSettings
      x-interface-name-ts: ProfileAttributeSettings
      description: Additional settings of the field
      properties:
        id:
          $ref: "#/components/schemas/brickworks-service-StringForm"
        castType:
          type: string
          description: The data type to try casting the attribute to
          enum:
            - none
            - boolean
            - number
            - integer
            - string
        strict:
          description: |
            Defines what happens when casting is not successful:
            - `true` throws an error in generating an object from a record
            - `false` sets the value to null
      required:
        - castType
        - strict
    brickworks-service-ProfileAttributeProperties:
      type: object
      x-class-name: ProfileAttributeProperties
      x-interface-name-ts: ProfileAttributeProperties
      description: In `attributeName.default`, enter the default name of the profile attribute to retrieve a value from when generating content from a record
      properties:
        attributeName:
          $ref: "#/components/schemas/brickworks-service-StringForm"
        nullOnFail:
          $ref: "#/components/schemas/brickworks-service-BooleanForm"
      required:
        - attributeName
    brickworks-service-FieldMetadata:
      type: object
      x-class-name: FieldMetadata
      x-interface-name-ts: FieldMetadata
      description: The object name is the name of a field in the schema
      properties:
        title:
          type: string
          description: Display name of the field, shown in the editor
          default: empty title
        description:
          type: string
          nullable: true
          description: Description of the field, shown in the editor
        useAsRecordName:
          type: boolean
          nullable: true
          default: false
          description: When `true`, the value of this field can be used as the record name. This only happens when the record name is not explicitly defined in its `name` parameter.If multiple fields can be used as the record name, they are checked starting with the highest `ordering` and the first non-empty field is used.
    brickworks-service-CreateSchemaRequest:
      type: object
      x-class-name: CreateSchemaRequest
      x-interface-name-ts: CreateSchemaRequest
      description: Create schema request body
      required:
        - appId
        - displayName
      properties:
        appId:
          $ref: "#/components/schemas/brickworks-service-SchemaAppId"
        displayName:
          $ref: "#/components/schemas/brickworks-service-SchemaDisplayName"
        description:
          $ref: "#/components/schemas/brickworks-service-SchemaDescription"
        fields:
          $ref: "#/components/schemas/brickworks-service-FieldsObject"
        displayConfiguration:
          $ref: "#/components/schemas/brickworks-service-SchemaDisplayConfiguration"
        audience:
          $ref: "#/components/schemas/brickworks-service-Audience"
        schemaType:
          $ref: "#/components/schemas/brickworks-service-SchemaType"
    brickworks-service-NumberSubtype:
      type: string
      x-class-name: NumberSubtype
      x-interface-name-ts: NumberSubtype
      enum:
        - number
    brickworks-service-BooleanSubtype:
      type: string
      x-class-name: BooleanSubtype
      x-interface-name-ts: BooleanSubtype
      enum:
        - boolean
    brickworks-service-StringSubtype:
      type: string
      title: String subtype
      x-class-name: StringSubtype
      x-interface-name-ts: StringSubtype
      enum:
        - string
    brickworks-service-IntegerSubtype:
      type: string
      x-class-name: IntegerSubtype
      x-interface-name-ts: IntegerSubtype
      enum:
        - integer
    brickworks-service-EnumSubtype:
      type: string
      x-class-name: EnumSubtype
      x-interface-name-ts: EnumSubtype
      enum:
        - enum
    brickworks-service-DateSubtype:
      type: string
      x-class-name: DateSubtype
      x-interface-name-ts: DateSubtype
      enum:
        - date
    brickworks-service-DateTimeSubtype:
      type: string
      x-class-name: DateTimeSubtype
      x-interface-name-ts: DateTimeSubtype
      enum:
        - date-time
    brickworks-service-TypedArraySubtype:
      type: string
      x-class-name: TypedArraySubtype
      x-interface-name-ts: TypedArraySubtype
      enum:
        - typed_array
    brickworks-service-UuidSubtype:
      type: string
      x-class-name: UUIDSubtype
      x-interface-name-ts: UUIDSubtype
      enum:
        - uuid
    brickworks-service-JinJavaSubtype:
      type: string
      x-class-name: JinJavaSubtype
      x-interface-name-ts: JinJavaSubtype
      enum:
        - jinjava
    brickworks-service-CatalogItemSubtype:
      type: string
      x-class-name: CatalogItemSubtype
      x-interface-name-ts: CatalogItemSubtype
      enum:
        - catalog_item
    brickworks-service-KeyValueSubtype:
      type: string
      x-class-name: KeyValueSubtype
      x-interface-name-ts: KeyValueSubtype
      description: |
        This type of field is a reference to an external source. The request to an external source is made when you generate content from a record.

        **NOTE**: The `headers`, `params`, and `body` properties are not currently supported by the Synerise Portal.
      enum:
        - key_value
    brickworks-service-ExternalSourceSubtype:
      type: string
      x-class-name: ExternalSourceSubtype
      x-interface-name-ts: ExternalSourceSubtype
      enum:
        - external_source
    brickworks-service-OneToOneSubtype:
      type: string
      x-class-name: OneToOneSubtype
      x-interface-name-ts: OneToOneSubtype
      description: |
        This field type lets you include references to a record from another schema. To generate an object, the referenced record must be published. Its content (for example, an expression field in the referenced record) will be processed when generating an object.
      enum:
        - one_to_one
    brickworks-service-OneToManySubtype:
      type: string
      x-class-name: OneToManySubtype
      x-interface-name-ts: OneToManySubtype
      enum:
        - one_to_many
    brickworks-service-MetricSubtype:
      type: string
      x-class-name: MetricSubtype
      x-interface-name-ts: MetricSubtype
      enum:
        - metric
    brickworks-service-AggregateSubtype:
      type: string
      x-class-name: AggregateSubtype
      x-interface-name-ts: AggregateSubtype
      enum:
        - aggregate
    brickworks-service-ExpressionSubtype:
      type: string
      x-class-name: ExpressionSubtype
      x-interface-name-ts: ExpressionSubtype
      enum:
        - expression
    brickworks-service-PromotionSubtype:
      type: string
      x-class-name: PromotionSubtype
      x-interface-name-ts: PromotionSubtype
      enum:
        - promotion
    brickworks-service-FileSubtype:
      type: string
      x-class-name: FileSubtype
      x-interface-name-ts: FileSubtype
      description: This type of field lets you store links to [files uploaded to Synerise](https://hub.synerise.com/docs/assets/files-explorer/).
      enum:
        - file
    brickworks-service-ImageSubtype:
      type: string
      description: This type of field lets you store links to images.
      enum:
        - image
    brickworks-service-RecommendationSubtype:
      type: string
      x-class-name: RecommendationSubtype
      x-interface-name-ts: RecommendationSubtype
      description: This type of field lets you retrieve the result of a recommendation campaign.
      enum:
        - recommendation
    brickworks-service-VoucherSubtype:
      type: string
      x-class-name: VoucherSubtype
      x-interface-name-ts: VoucherSubtype
      description: This type of fields lets you retrieve a voucher from a pool. The voucher is retrieved when you generate an object from the record.
      enum:
        - voucher
    brickworks-service-UntypedObjectSubtype:
      type: string
      x-class-name: UntypedObjectSubtype
      x-interface-name-ts: UntypedObjectSubtype
      description: This type of field lets you save any JSON data in the record, without validating it against any schema
      enum:
        - untyped_object
    brickworks-service-UntypedArraySubtype:
      type: string
      x-class-name: UntypedArraySubtype
      x-interface-name-ts: UntypedArraySubtype
      enum:
        - untyped_array
    brickworks-service-UntypedFormSubtype:
      type: string
      x-class-name: UntypedFormSubtype
      x-interface-name-ts: UntypedFormSubtype
      enum:
        - json
    brickworks-service-ProfileAttributeSubtype:
      type: string
      x-class-name: ProfileAttributeSubtype
      x-interface-name-ts: ProfileAttributeSubtype
      description: This type of field references an attribute by name and retrieves its value.
      enum:
        - client_attribute
    brickworks-service-OneToManyFilterSubtype:
      type: string
      x-class-name: OneToManyFilterSubtype
      x-interface-name-ts: OneToManyFilterSubtype
      enum:
        - filter
      description: This field type allows you to retrieve records from another schema and filter/sort them
    brickworks-service-FieldFormMap:
      type: object
      x-class-name: FieldFormMap
      x-interface-name-ts: FieldFormMap
      description: Fields in the schema
      additionalProperties:
        $ref: "#/components/schemas/brickworks-service-FieldForm"
      x-typescript-type: "{ [key: string]: FieldForm }"
    brickworks-service-UpdateSchemaRequest:
      type: object
      x-class-name: UpdateSchemaRequest
      x-interface-name-ts: UpdateSchemaRequest
      description: Schema update request body
      required:
        - displayName
      properties:
        displayName:
          $ref: "#/components/schemas/brickworks-service-SchemaDisplayName"
        description:
          $ref: "#/components/schemas/brickworks-service-SchemaDescription"
        fields:
          $ref: "#/components/schemas/brickworks-service-FieldsObject"
        displayConfiguration:
          $ref: "#/components/schemas/brickworks-service-SchemaDisplayConfiguration"
        audience:
          $ref: "#/components/schemas/brickworks-service-Audience"
    brickworks-service-Meta:
      type: object
      description: Pagination metadata
      x-class-name: Meta
      x-interface-name-ts: Meta
      properties:
        links:
          type: array
          description: Links to the neighboring pages and the first page
          items:
            $ref: "#/components/schemas/brickworks-service-Link"
        limit:
          type: integer
          format: int32
          description: Limit of items per page
        count:
          type: integer
          nullable: true
          description: Currently unused
    brickworks-service-Link:
      type: object
      x-class-name: Link
      x-interface-name-ts: Link
      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
    brickworks-service-ObjectsError:
      type: object
      x-class-name: ObjectsError
      x-interface-name-ts: ObjectsError
      required:
        - httpStatus
        - errorCode
        - timestamp
        - message
      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)
        httpStatus:
          type: integer
          description: Error's HTTP status code
        message:
          type: string
          description: Description of the problem
        traceId:
          type: string
          description: Unique identifier of the request, useful for tracing logs
        errors:
          type: array
          items:
            $ref: "#/components/schemas/brickworks-service-ObjectsError"
        source:
          type: object
          x-class-name: ObjectErrorSource
          x-interface-name-ts: ObjectErrorSource
          required:
            - pointer
          properties:
            pointer:
              type: string
              description: JSON Pointer for invalid body path
            value:
              type: string
              description: Value that caused the validation error
        details:
          type: object
          x-class-name: ObjectsErrorDetails
          x-interface-name-ts: ObjectsErrorDetails
          additionalProperties:
            type: object
          description: Additional structured error information
        field:
          type: string
          description: Name of the field that caused the error
    brickworks-service-RecordPagingResult:
      type: object
      x-class-name: RecordPagingResult
      x-interface-name-ts: RecordPagingResult
      required:
        - meta
        - data
      properties:
        meta:
          $ref: "#/components/schemas/brickworks-service-Meta"
        data:
          type: array
          description: Array of records
          items:
            $ref: "#/components/schemas/brickworks-service-ListRecordView"
    brickworks-service-ListRecordView:
      type: object
      x-class-name: ListRecordView
      x-interface-name-ts: RecordWithoutFields
      description: Record object
      required:
        - id
        - schemaId
        - createdBy
        - updatedBy
        - createdAt
        - updatedAt
        - status
        - recordVersion
      properties:
        id:
          $ref: "#/components/schemas/brickworks-service-RecordId"
        name:
          $ref: "#/components/schemas/brickworks-service-RecordName"
        schemaId:
          $ref: "#/components/schemas/brickworks-service-SchemaId"
        createdBy:
          $ref: "#/components/schemas/brickworks-service-CreatedBy"
        updatedBy:
          $ref: "#/components/schemas/brickworks-service-UpdatedBy"
        publishedBy:
          $ref: "#/components/schemas/brickworks-service-PublishedBy"
        deletedBy:
          $ref: "#/components/schemas/brickworks-service-DeletedBy"
        createdAt:
          $ref: "#/components/schemas/brickworks-service-CreatedAt"
        updatedAt:
          $ref: "#/components/schemas/brickworks-service-UpdatedAt"
        publishedAt:
          $ref: "#/components/schemas/brickworks-service-PublishedAt"
        deletedAt:
          $ref: "#/components/schemas/brickworks-service-DeletedAt"
        slug:
          $ref: "#/components/schemas/brickworks-service-RecordSlug"
        status:
          $ref: "#/components/schemas/brickworks-service-RecordStatus"
        values:
          $ref: "#/components/schemas/brickworks-service-RecordValues"
        schemaVersion:
          type: integer
          format: int32
          description: The ID of the schema version that was used when this record was last updated. For simple schemas, this is always `1`.
        recordVersion:
          $ref: "#/components/schemas/brickworks-service-RecordVersionNumber"
        schedule:
          $ref: "#/components/schemas/brickworks-service-ScheduleEntry"
    brickworks-service-RecordId:
      type: string
      format: uuid
      description: |
        Unique identifier of a record, generated by the system. Can't be changed.

        This identifier is common to all versions of the record, even when the slug changes.

        In singleton-type schemas, use the schema's `appId` or `id` in place of record identifiers for generating content.
    brickworks-service-RecordSlug:
      type: string
      minLength: 6
      maxLength: 40
      pattern: ^([a-zA-Z0-9\-]|_[a-zA-Z0-9\-])[\w\-]*
      description: |
        Unique (within a schema) identifier of a record. Can't be a UUID.

        In singleton-type schemas, use the schema's `appId` or `id` in place of record identifiers for generating content.
    brickworks-service-RecordName:
      type: string
      maxLength: 255
      minLength: 1
      nullable: true
      description: The name of the record. If not defined and there are no fields with `useAsRecordName = true`, GET requests return `Unnamed`.
    brickworks-service-RecordStatus:
      type: string
      x-class-name: RecordStatus
      x-interface-name-ts: RecordStatus
      description: |
        Status of the record. When generating an object from a record, the last published version is used.  
        - In simple schemas, a record can only be published. Updates overwrite the record without changing the version number.
        - In versioned schemas:
            - A published record can't be edited directly. You need to send an update which changes to the draft status (this increases the version number, and the existing published version isn't modified), and then publish again.
            - An unpublished record can't be published immediately. It must receive the draft status first.
            - When unpublishing a record, you can't edit any data in the record.
      enum:
        - DRAFT
        - SCHEDULED
        - PUBLISHED
        - UNPUBLISHED
    brickworks-service-ScheduleType:
      type: string
      x-class-name: ScheduleType
      x-interface-name-ts: ScheduleType
      enum:
        - PUBLISH
    brickworks-service-ScheduleEntry:
      type: object
      x-class-name: ScheduleEntry
      x-interface-name-ts: ScheduleEntry
      description: Time when the record is published - for example, every Monday, from 12:00 to 14:00
      properties:
        timezone:
          type: string
          description: Timezone of the schedule, as `UTC+offset` or according to the [tz database](https://en.wikipedia.org/wiki/Tz_database).
          example: UTC+01:00
        startType:
          type: string
          description: If `NOW`, the record is published immediately upon saving.
          enum:
            - NOW
            - SCHEDULED
        startDate:
          type: string
          description: Time when the schedule becomes active. If `startType` is NOW, this field is null.
          format: date-time
        endType:
          type: string
          description: Mode of inactivating the schedule
          enum:
            - NEVER
            - DATE
        endDate:
          type: string
          description: Time when the schedule becomes inactive, if `endType = DATE`
          format: date-time
        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.
            - DAILY: schedule is active every day, at specific times
            - 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)
            - WEEKDAY: schedule is applied on specified weekdays of a month; for example on the second Tuesday of each month
          enum:
            - ENTIRE
            - DAILY
            - WEEKLY
            - MONTHLY
            - WEEKDAY
        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/brickworks-service-EntryScheduleRepeatPart"
        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.
      required:
        - timezone
        - startType
        - startDate
        - endType
        - enabled
    brickworks-service-EntryScheduleRepeatPart:
      type: object
      x-class-name: EntryScheduleRepeatPart
      x-interface-name-ts: EntryScheduleRepeatPart
      properties:
        startDay:
          type: integer
          format: int32
          example: 1
          description: |
            If `periodType` is:

            - DAILY, the value is always 1.

            - WEEKLY or WEEKDAY, the values are 1-7 (1 is Monday).

            - MONTHLY, the values are 1-31 (days of the month).

            **Note:**  
            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 `part` object for each time period.
        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: 12:18:03
          description: The hour when the schedule becomes inactive.
        ordinal:
          type: string
          description: |
            
            Applies only if `periodType` is WEEKDAY.

            **Example:**<br/>
            If you want a schedule to be active on every third Tuesday of the month, set `ordinal` to THIRD and `startDay` to 2. 

            **Note:**<br/>
            If you want a schedule to be active on every second and third Tuesday, you must create two separate `part` objects.
          enum:
            - FIRST
            - SECOND
            - THIRD
            - FOURTH
            - FIFTH
            - LAST
      required:
        - startDay
        - startTime
        - endDay
        - endTime
    brickworks-service-RecordVersionNumber:
      type: number
      format: int32
      description: |
        Identifier of the record version. 
        - In simple schemas, this is always `1`
        - In versioned schemas, the versions start with `1` on creation and are increased by 1 when you create a new draft. Publishing from a draft does NOT increase the version number.
    brickworks-service-AddRecordToSchemaRequest:
      type: object
      x-class-name: AddRecordToSchemaRequest
      x-interface-name-ts: AddRecordToSchemaRequest
      required:
        - values
        - status
      properties:
        slug:
          $ref: "#/components/schemas/brickworks-service-RecordSlug"
        values:
          $ref: "#/components/schemas/brickworks-service-RecordValues"
        status:
          $ref: "#/components/schemas/brickworks-service-RecordStatus"
        actionOnSchedule:
          $ref: "#/components/schemas/brickworks-service-ScheduleType"
        schedule:
          $ref: "#/components/schemas/brickworks-service-ScheduleEntry"
        name:
          $ref: "#/components/schemas/brickworks-service-RecordName"
    brickworks-service-RecordValues:
      type: object
      x-class-name: RecordValues
      x-interface-name-ts: RecordValues
      description: |
        Values included in the record. Each key is the name of a field. The value must match the configuration of the field in the schema.

        **Default values aren't explicitly saved in the record** or shown in GET requests which retrieve the record, but are returned when an object is generated from the record.

        Supported value types:
        - Float (number)
        - Integer
        - String
        - Boolean
        - Date (string, format: date)
        - Date-time (string, format: date-time)
        - Profile attribute (object with attributeName)
        - Typed array
        - UUID (string, format: uuid)
        - Jinjava (string)
        - Catalog (object with itemKey, id)
        - Object (free-form)
        - External source (empty object)
        - One-to-one reference (string - record ID)
        - One-to-many reference (array of record IDs)
        - Analysis (string, format: uuid)
        - Promotion (string - promotion ID)
        - File/Image (string - file ID)
        - Recommendation (object with id, params)
        - Voucher (object with id)
        - Untyped JSON (object)
        - Untyped array
      additionalProperties: true
      example:
        stringField: example string
        numberField: 123.45
        integerField: 42
        booleanField: true
        dateField: 2024-01-15
        dateTimeField: 2024-01-15T10:30:00Z
        uuidField: 550e8400-e29b-41d4-a716-446655440000
        arrayField:
          - item1
          - item2
        objectField:
          key: value
        profileAttribute:
          attributeName: email
        catalog:
          itemKey: SKU123
          id: catalog-id
        recommendation:
          id: recommendation-campaign-id
          params:
            itemId: item-123
    brickworks-service-Record:
      x-class-name: Record
      x-interface-name-ts: Record
      allOf:
        - type: object
          required:
            - id
            - schemaId
            - values
            - createdBy
            - updatedBy
            - createdAt
            - updatedAt
            - status
            - recordVersion
          properties:
            id:
              $ref: "#/components/schemas/brickworks-service-RecordId"
            name:
              $ref: "#/components/schemas/brickworks-service-RecordName"
            schemaId:
              $ref: "#/components/schemas/brickworks-service-SchemaId"
            createdBy:
              $ref: "#/components/schemas/brickworks-service-CreatedBy"
            updatedBy:
              $ref: "#/components/schemas/brickworks-service-UpdatedBy"
            publishedBy:
              $ref: "#/components/schemas/brickworks-service-PublishedBy"
            deletedBy:
              $ref: "#/components/schemas/brickworks-service-DeletedBy"
            createdAt:
              $ref: "#/components/schemas/brickworks-service-CreatedAt"
            updatedAt:
              $ref: "#/components/schemas/brickworks-service-UpdatedAt"
            publishedAt:
              $ref: "#/components/schemas/brickworks-service-PublishedAt"
            deletedAt:
              $ref: "#/components/schemas/brickworks-service-DeletedAt"
            slug:
              $ref: "#/components/schemas/brickworks-service-RecordSlug"
            status:
              $ref: "#/components/schemas/brickworks-service-RecordStatus"
            values:
              $ref: "#/components/schemas/brickworks-service-RecordValues"
            schemaVersion:
              type: integer
              format: int32
              description: The ID of the schema version that was used when this record was last updated. For simple schemas, this is always `1`.
            recordVersion:
              $ref: "#/components/schemas/brickworks-service-RecordVersionNumber"
            schedule:
              $ref: "#/components/schemas/brickworks-service-ScheduleEntry"
    brickworks-service-UpdateRecordRequest:
      type: object
      x-class-name: UpdateRecordRequest
      x-interface-name-ts: UpdateRecordRequest
      properties:
        status:
          $ref: "#/components/schemas/brickworks-service-RecordStatus"
        values:
          $ref: "#/components/schemas/brickworks-service-RecordValues"
        actionOnSchedule:
          $ref: "#/components/schemas/brickworks-service-ScheduleType"
        schedule:
          $ref: "#/components/schemas/brickworks-service-ScheduleEntry"
        slug:
          $ref: "#/components/schemas/brickworks-service-RecordSlug"
        lastUpdatedAt:
          type: string
          description: |
            If updating a draft keeping the draft status, you can check if it was updated by another request in the meantime:
              1. Fetch a draft record.
              2. Copy the `updatedAt` property into your update request.
              3. Make other changes in the record.
              4. Send the update.
              5. If the update time you sent is different than the one in the database, it means that the record was updated since you last fetched it. Your update is ignored and error BKW-029 (HTTP 409) is returned.
          format: date-time
        name:
          $ref: "#/components/schemas/brickworks-service-RecordName"
        fromState:
          $ref: "#/components/schemas/brickworks-service-RecordStatus"
    brickworks-service-GenerateRequest:
      type: object
      x-class-name: GenerateRequest
      x-interface-name-ts: GenerateRequest
      required:
        - identifierValue
      properties:
        identifierValue:
          type: string
          description: Value of the profile identifier selected in `identifierType` (profile ID is sent as a string)
        context:
          $ref: "#/components/schemas/brickworks-service-Context"
        fieldContext:
          $ref: "#/components/schemas/brickworks-service-FieldContext"
    brickworks-service-GenerateRequestWithoutIdentifier:
      type: object
      x-class-name: GenerateRequestWithoutIdentifier
      x-interface-name-ts: GenerateRequestWithoutIdentifier
      properties:
        context:
          $ref: "#/components/schemas/brickworks-service-Context"
        fieldContext:
          $ref: "#/components/schemas/brickworks-service-FieldContext"
    brickworks-service-GeneratedObject:
      type: object
      x-class-name: GeneratedObject
      x-interface-name-ts: GeneratedObject
      description: Processed content of a record
      properties:
        __slug:
          $ref: "#/components/schemas/brickworks-service-RecordSlug"
        __recordVersion:
          $ref: "#/components/schemas/brickworks-service-RecordVersionNumber"
        __publishedAt:
          type: string
          format: date-time
          description: Record publishing time
        __updatedAt:
          type: string
          format: date-time
          description: Last record update time
        __schemaId:
          $ref: "#/components/schemas/brickworks-service-SchemaId"
        __id:
          $ref: "#/components/schemas/brickworks-service-RecordId"
        __schemaVersion:
          $ref: "#/components/schemas/brickworks-service-SchemaVersion"
        __createdAt:
          type: string
          format: date-time
          description: Record creation time
        __matchedAudience:
          type: boolean
          description: |
            Indicates whether the client matched the audience defined on the schema. `true` when the client belongs to the target audience (or when no audience is defined), `false` when the client does not match the top-level schema audience.
        __unmatchedAudienceRelations:
          type: array
          description: |
            List of relation field names whose referenced schemas have an audience that the client did not match. These fields are returned as `null` in the response. Only present when at least one relation is audience-restricted for the given client.
          items:
            type: string
      additionalProperties: true
      example:
        __slug: my-record-slug
        __recordVersion: 1
        __publishedAt: 2024-01-15T10:30:00Z
        __updatedAt: 2024-01-15T10:30:00Z
        __schemaId: 550e8400-e29b-41d4-a716-446655440000
        __id: 550e8400-e29b-41d4-a716-446655440001
        __schemaVersion: 1
        __createdAt: 2024-01-15T10:30:00Z
        customStringField: string value
        customNumberField: 123.45
        customBooleanField: true
        customDateField: 2024-01-15
        customArrayField:
          - item1
          - item2
        customObjectField:
          nestedKey: nestedValue
        __matchedAudience: true
        __unmatchedAudienceRelations:
          - deniedRefField
    brickworks-service-Context:
      type: object
      x-class-name: Context
      x-interface-name-ts: Context
      description: Additional context parameters. You can use these parameters in Jinjava fields by calling `{{ context.keyName }}`. The value will be printed as a string.
      additionalProperties:
        description: In Jinjava, you can retrieve the value of a key from this object by `{{ context.keyName }}`
    brickworks-service-FieldContext:
      type: object
      x-class-name: FieldContext
      x-interface-name-ts: FieldContext
      description: Additional context parameters used in recommendation and relation fields.
      additionalProperties:
        $ref: "#/components/schemas/brickworks-service-FieldContextItem"
    brickworks-service-FieldContextItem:
      type: object
      x-class-name: FieldContextItem
      x-interface-name-ts: FieldContextItem
      description: The names of the objects correspond to the names of the fields where the object's data is used
      additionalProperties: true
      example:
        page: 1
        limit: 10
        itemId: item-123
        additionalFilters: custom filter value
    brickworks-service-FieldContextConfig:
      type: object
      x-class-name: FieldContextConfig
      x-interface-name-ts: FieldContextConfig
      required:
        - fields
      properties:
        fields:
          type: array
          items:
            $ref: "#/components/schemas/brickworks-service-FieldContextConfigField"
    brickworks-service-FieldContextConfigField:
      type: object
      x-class-name: FieldContextConfigField
      x-interface-name-ts: FieldContextConfigField
      required:
        - fieldName
        - descriptors
      properties:
        fieldName:
          type: string
        descriptors:
          type: array
          items:
            $ref: "#/components/schemas/brickworks-service-FieldContextDescriptor"
    brickworks-service-FieldContextDescriptor:
      type: object
      x-class-name: FieldContextDescriptor
      x-interface-name-ts: FieldContextDescriptor
      required:
        - name
        - type
      properties:
        name:
          type: string
        type:
          x-class-name: FieldContextDescriptorType
          type: string
          enum:
            - string
            - integer
            - number
            - boolean
            - unknown
    brickworks-service-PreviewRequest:
      type: object
      x-class-name: PreviewRequest
      x-interface-name-ts: PreviewRequest
      required:
        - identifierValue
        - schema
      properties:
        identifierValue:
          type: string
          description: Value of the profile identifier selected in `identifierType` (profile ID is sent as a string)
        context:
          $ref: "#/components/schemas/brickworks-service-Context"
        fieldContext:
          $ref: "#/components/schemas/brickworks-service-FieldContext"
        values:
          $ref: "#/components/schemas/brickworks-service-PreviewValues"
        schema:
          $ref: "#/components/schemas/brickworks-service-SchemaPreviewData"
    brickworks-service-PreviewValues:
      type: object
      x-class-name: PreviewValues
      x-interface-name-ts: PreviewValues
      description: The values for fields in the record, to be used when generating the preview.
      additionalProperties:
        description: Each key in this object corresponds to a field name.
    brickworks-service-PreviewRequestWithoutIdentifier:
      type: object
      x-class-name: PreviewRequestWithoutIdentifier
      x-interface-name-ts: PreviewRequestWithoutIdentifier
      required:
        - schema
      properties:
        context:
          $ref: "#/components/schemas/brickworks-service-Context"
        fieldContext:
          $ref: "#/components/schemas/brickworks-service-FieldContext"
        values:
          $ref: "#/components/schemas/brickworks-service-PreviewValues"
        schema:
          $ref: "#/components/schemas/brickworks-service-SchemaPreviewData"
    brickworks-service-CreateExternalSourceRequest:
      type: object
      x-class-name: CreateExternalSourceRequest
      x-interface-name-ts: CreateExternalSourceRequest
      properties:
        name:
          type: string
        description:
          $ref: "#/components/schemas/brickworks-service-ExternalSourceDescription"
        properties:
          $ref: "#/components/schemas/brickworks-service-ExternalSourceProperties"
        ttl:
          $ref: "#/components/schemas/brickworks-service-ExternalSourceTtl"
      required:
        - name
        - properties
    brickworks-service-ExternalSourceTtl:
      type: number
      format: int32
      description: Cache TTL for connection response, in seconds
    brickworks-service-ExternalSourceName:
      type: string
      description: Human-readable name of the external resource
      maxLength: 255
    brickworks-service-ExternalSourceId:
      type: string
      description: Unique ID of the external source definition
      format: uuid
    brickworks-service-ExternalSourceDescription:
      type: string
      maxLength: 255
      description: Description of the external source
    brickworks-service-ExternalSourceProperties:
      type: object
      x-class-name: ExternalSourceProperties
      x-interface-name-ts: ExternalSourceProperties
      description: The details of the external source configuration
      properties:
        sourceType:
          $ref: "#/components/schemas/brickworks-service-ExternalSourceSourceType"
        url:
          $ref: "#/components/schemas/brickworks-service-ExternalSourceUrl"
        method:
          $ref: "#/components/schemas/brickworks-service-ExternalSourceMethod"
        headers:
          $ref: "#/components/schemas/brickworks-service-ExternalSourceHeaders"
        params:
          $ref: "#/components/schemas/brickworks-service-ExternalSourceParams"
        authType:
          $ref: "#/components/schemas/brickworks-service-ExternalSourceAuthType"
        authId:
          $ref: "#/components/schemas/brickworks-service-ExternalSourceAuthId"
        body:
          $ref: "#/components/schemas/brickworks-service-ExternalSourceBody"
        bodySchema:
          $ref: "#/components/schemas/brickworks-service-ExternalSourceBodySchema"
      required:
        - sourceType
        - url
        - method
    brickworks-service-ExternalSourceSourceType:
      type: string
      x-class-name: ExternalSourceType
      x-interface-name-ts: ExternalSourceType
      enum:
        - http_source
    brickworks-service-ExternalSourceMethod:
      type: string
      description: The HTTP method used in the external request. The `body` and `bodySchema` properties can only be used in POST requests.
      enum:
        - post
        - get
    brickworks-service-ExternalSourceUrl:
      type: string
      description: URL address of the resource, including the `https` protocol. May include Jinjava inserts.
      example: https://example.com/clients/{% customer email %}
    brickworks-service-ExternalSourceHeaders:
      type: object
      x-class-name: ExternalSourceHeaders
      x-interface-name-ts: ExternalSourceHeaders
      description: Headers added to the request
      additionalProperties:
        type: string
        description: Each key is the name of the header, and the value is the header's value.
    brickworks-service-ExternalSourceParams:
      type: object
      x-class-name: ExternalSourceParams
      x-interface-name-ts: ExternalSourceParams
      description: Query parameters added to the URL
      additionalProperties:
        type: string
        description: A key/value pair
    brickworks-service-ExternalSourceAuthType:
      type: string
      x-class-name: ExternalSourceAuthType
      x-interface-name-ts: ExternalSourceAuthType
      enum:
        - basic
        - api_key
        - custom
      description: The mode of authentication used by this external source
    brickworks-service-ExternalSourceAuthId:
      type: string
      format: uuid
      description: Unique identifier of a [connection](https://hub.synerise.com/docs/settings/tool/connections/) used by this external source.
    brickworks-service-ExternalSourceBody:
      type: object
      x-class-name: ExternalSourceBody
      x-interface-name-ts: ExternalSourceBody
      description: The request body sent to the external source
      additionalProperties:
        description: JSON content. If you want to use JinJava in a value, use `bodySchema` to define which fields accept Jinjava.
      example:
        someString: string
        someObject:
          key: "{% customer email %}"
        dynamicField: "{% customer id %}"
    brickworks-service-ExternalSourceBodySchema:
      type: object
      title: External source body schema
      x-class-name: ExternalSourceBodySchema
      x-interface-name-ts: ExternalSourceBodySchema
      description: A schema which defines which fields in the request body have dynamic values inserted with Jinjava. Static parameters don't need to be listed in this schema.
      properties:
        properties:
          description: |
            The properties in the request body. You only need to define dynamic values (jinjava strings), and if they are nested in an object, use the `object` schema to define that structure.
          type: object
          additionalProperties:
            $ref: "#/components/schemas/brickworks-service-BodySchemaEntity"
        type:
          type: string
          description: Objects can include or other objects (recursive schema)
          enum:
            - object
        subtype:
          $ref: "#/components/schemas/brickworks-service-KeyValueSubtype"
        additionalProperties:
          type: boolean
          description: Defines if the object can include other properties than the one listed in the schema
          enum:
            - true
      example:
        type: object
        subtype: key_value
        properties:
          someObject:
            type: object
            subtype: key_value
            properties:
              key:
                type: string
                subtype: jinjava
            additionalProperties: true
          dynamicField:
            type: string
            subtype: jinjava
        additionalProperties: true
    brickworks-service-BodySchemaEntity:
      type: object
      x-class-name: BodySchemaEntity
      x-interface-name-ts: BodySchemaEntity
      description: The object name corresponds to a key name in the request body.
      additionalProperties:
        oneOf:
          - $ref: "#/components/schemas/brickworks-service-ExternalSourceBodySchema"
          - $ref: "#/components/schemas/brickworks-service-BodySchemaString"
        discriminator:
          propertyName: subtype
          mapping:
            jinjava: "#/components/schemas/brickworks-service-BodySchemaString"
            key_value: "#/components/schemas/brickworks-service-ExternalSourceBodySchema"
      x-typescript-type: "{ [key: string]: BodySchemaEntity }"
    brickworks-service-BodySchemaString:
      type: object
      title: String
      x-class-name: BodySchemaString
      x-interface-name-ts: BodySchemaString
      properties:
        type:
          $ref: "#/components/schemas/brickworks-service-StringType"
        subtype:
          $ref: "#/components/schemas/brickworks-service-JinJavaSubtype"
        settings:
          $ref: "#/components/schemas/brickworks-service-JinJavaSettings"
    brickworks-service-ExternalSourceModel:
      type: object
      x-class-name: ExternalSourceModel
      x-interface-name-ts: ExternalSourceModel
      properties:
        id:
          $ref: "#/components/schemas/brickworks-service-ExternalSourceId"
        name:
          $ref: "#/components/schemas/brickworks-service-ExternalSourceName"
        description:
          $ref: "#/components/schemas/brickworks-service-ExternalSourceDescription"
        properties:
          $ref: "#/components/schemas/brickworks-service-ExternalSourceProperties"
        createdBy:
          $ref: "#/components/schemas/brickworks-service-CreatedBy"
        createdAt:
          $ref: "#/components/schemas/brickworks-service-CreatedAt"
        updatedBy:
          $ref: "#/components/schemas/brickworks-service-UpdatedBy"
        updatedAt:
          $ref: "#/components/schemas/brickworks-service-UpdatedAt"
        ttl:
          $ref: "#/components/schemas/brickworks-service-ExternalSourceTtl"
      required:
        - id
        - name
        - properties
        - createdBy
        - createdAt
        - updatedAt
    brickworks-service-UpdateExternalSourceRequest:
      type: object
      x-class-name: UpdateExternalSourceRequest
      x-interface-name-ts: UpdateExternalSourceRequest
      properties:
        name:
          $ref: "#/components/schemas/brickworks-service-ExternalSourceName"
        description:
          $ref: "#/components/schemas/brickworks-service-ExternalSourceDescription"
        properties:
          $ref: "#/components/schemas/brickworks-service-ExternalSourceProperties"
        ttl:
          type: number
          format: int32
    brickworks-service-RecordVersionPagingResult:
      type: object
      x-class-name: RecordVersionPagingResult
      x-interface-name-ts: RecordVersionPagingResult
      required:
        - meta
        - data
      properties:
        meta:
          $ref: "#/components/schemas/brickworks-service-Meta"
        data:
          type: array
          description: Array of record versions
          items:
            $ref: "#/components/schemas/brickworks-service-RecordVersion"
    brickworks-service-RecordVersion:
      x-class-name: RecordVersion
      x-interface-name-ts: RecordVersion
      allOf:
        - type: object
          properties:
            versionId:
              format: uuid
              type: string
              description: Unique identifier of a record version
        - $ref: "#/components/schemas/brickworks-service-Record"
    brickworks-service-ExternalSourcePagingResult:
      type: object
      x-class-name: ExternalSourcePagingResult
      x-interface-name-ts: ExternalSourcePagingResult
      required:
        - meta
        - data
      properties:
        meta:
          $ref: "#/components/schemas/brickworks-service-Meta"
        data:
          type: array
          description: Array of external sources
          items:
            $ref: "#/components/schemas/brickworks-service-ExternalSourceSimplifiedView"
    brickworks-service-ExternalSourceSimplifiedView:
      type: object
      x-class-name: ExternalSourceSimplifiedView
      x-interface-name-ts: ExternalSourceSimplifiedView
      properties:
        id:
          $ref: "#/components/schemas/brickworks-service-ExternalSourceId"
        name:
          $ref: "#/components/schemas/brickworks-service-ExternalSourceName"
        method:
          $ref: "#/components/schemas/brickworks-service-ExternalSourceMethod"
        description:
          $ref: "#/components/schemas/brickworks-service-ExternalSourceDescription"
        sourceType:
          $ref: "#/components/schemas/brickworks-service-ExternalSourceSourceType"
        createdBy:
          $ref: "#/components/schemas/brickworks-service-CreatedBy"
        createdAt:
          $ref: "#/components/schemas/brickworks-service-CreatedAt"
        updatedBy:
          $ref: "#/components/schemas/brickworks-service-UpdatedBy"
        updatedAt:
          $ref: "#/components/schemas/brickworks-service-UpdatedAt"
      required:
        - id
        - name
        - createdBy
        - createdAt
        - updatedAt
    brickworks-service-AsyncRecordRequest:
      type: object
      x-class-name: AsyncRecordRequest
      x-interface-name-ts: AsyncRecordRequest
      description: Async record request
      required:
        - identifier
        - values
      properties:
        identifier:
          type: object
          description: Definition of a unique identifier of a record
          properties:
            name:
              type: string
              description: |
                The name of the identifier. By default, `slug` and `id` are always available. You can also use a field that was configured as `unique`.

                In this field, provide the current identifier. If you want to change the identifier with the request, send it in `values` (for unique fields) or `slug`.
            value:
              description: The value of the selected identifier (slug or a field that was configured as unique)
              oneOf:
                - type: string
                - type: number
                - type: boolean
        values:
          $ref: "#/components/schemas/brickworks-service-RecordValues"
        slug:
          $ref: "#/components/schemas/brickworks-service-RecordSlug"
        name:
          $ref: "#/components/schemas/brickworks-service-RecordName"
    brickworks-service-207ResponseBody:
      type: array
      x-class-name: ResponseBody207
      x-interface-name-ts: ResponseBody207
      items:
        type: object
        properties:
          identifier:
            type: object
            properties:
              name:
                type: string
                description: The name of the identifier you used
              value:
                type: string
                description: The value of the identifier
          errors:
            type: array
            description: Errors that occurred for this record
            items:
              $ref: "#/components/schemas/brickworks-service-ObjectsError"
    brickworks-service-ValidationConditions:
      type: object
      description: Additional validation for the fields. To learn how to use them, see the [JSON Schema documentation](https://json-schema.org/understanding-json-schema/reference/conditionals#ifthenelse).
      x-class-name: ValidationConditions
      x-interface-name-ts: ValidationConditions
      properties:
        if:
          $ref: "#/components/schemas/brickworks-service-ValidationStatement"
        then:
          $ref: "#/components/schemas/brickworks-service-ValidationStatement"
        else:
          $ref: "#/components/schemas/brickworks-service-ValidationStatement"
      required:
        - if
        - then
    brickworks-service-ValidationStatement:
      type: object
      x-class-name: ValidationStatement
      x-interface-name-ts: ValidationStatement
      properties:
        required:
          type: array
          items:
            type: string
        properties:
          additionalProperties:
            $ref: "#/components/schemas/brickworks-service-FieldCondition"
      required:
        - required
        - properties
    brickworks-service-FieldCondition:
      type: object
      x-class-name: FieldCondition
      x-interface-name-ts: FieldCondition
      properties:
        minItems:
          type: number
          format: int32
        maxItems:
          type: number
          format: int32
        uniqueItems:
          type: boolean
        minimum:
          type: number
          format: int32
        maximum:
          type: number
          format: int32
        pattern:
          type: string
        const:
          title: FieldConditionConstant
          x-class-name: FieldConditionConstant
          x-interface-name-ts: FieldConditionConstant
          nullable: true
        enum:
          type: array
          items:
            type: string
        not:
          $ref: "#/components/schemas/brickworks-service-FieldCondition"
    brickworks-service-StringType:
      type: string
      title: String type
      x-class-name: StringType
      x-interface-name-ts: StringType
      enum:
        - string
    brickworks-service-IntegerType:
      type: string
      title: IntegerType
      x-class-name: IntegerType
      x-interface-name-ts: IntegerType
      enum:
        - integer
    brickworks-service-BooleanType:
      type: string
      title: Boolean
      x-class-name: BooleanType
      x-interface-name-ts: BooleanType
      enum:
        - boolean
    brickworks-service-NumberType:
      type: string
      title: Number type
      x-class-name: NumberType
      x-interface-name-ts: NumberType
      enum:
        - number
    brickworks-service-ObjectType:
      type: string
      title: Object type
      x-class-name: ObjectType
      x-interface-name-ts: ObjectType
      enum:
        - object
    brickworks-service-ArrayType:
      type: string
      title: ArrayType
      x-class-name: ArrayType
      x-interface-name-ts: ArrayType
      enum:
        - array
    brickworks-service-GatewayError:
      type: object
      x-class-name: GatewayError
      x-interface-name-ts: GatewayError
      properties:
        error:
          type: string
          description: Summary of the error
        status:
          type: integer
          format: int32
          description: Status code
        timestamp:
          type: string
          description: Time when the message was sent
        message:
          type: string
          description: Description of the problem
    business-profile-service-OrganizationDailyUsageReportRequest:
      type: object
      properties:
        from:
          type: string
          example: 2025-05-29
          description: First day to retrieve, in `YYYY-MM-DD` format
        to:
          type: string
          example: 2025-05-30
          description: Last day to retrieve, in `YYYY-MM-DD` format
        actions:
          type: array
          description: You can limit the events added to the report. Without this parameter, all events are included.
          items:
            type: string
            example: page.visit
        bpGuids:
          type: array
          description: You can limit the workspaces added to the report. Without this parameter, all workspaces in the organization are included.
          items:
            type: string
            format: uuid
            example: 34eea35e-3ac4-44f4-95b5-fd00a3b45eff
      required:
        - from
        - to
    business-profile-service-UserId:
      type: integer
      description: Unique ID of a Synerise user
    business-profile-service-WorkspaceName:
      type: string
      description: Name of the workspace
    business-profile-service-WorkspaceSubdomain:
      type: string
      description: Subdomain of the workspace
    business-profile-service-WorkspaceLogo:
      type: string
      description: Logo of the workspace
    business-profile-service-WorkspaceHash:
      type: string
      description: Hash ID of the workspace
    business-profile-service-WorkspaceGuid:
      type: string
      format: uuid
      description: GUID of the workspace
    business-profile-service-CreationDate:
      type: integer
      format: int64
      description: Creation date
    business-profile-service-LastUpdateTime:
      type: integer
      format: int64
      description: Last update time
    business-profile-service-OrganizationWorkspacesResponse:
      type: object
      properties:
        organizationGuid:
          $ref: "#/components/schemas/business-profile-service-WorkspaceGuid"
        workspaces:
          type: array
          items:
            $ref: "#/components/schemas/business-profile-service-BusinessProfileResponse"
    business-profile-service-BusinessProfileResponse:
      type: object
      description: List of workspaces
      properties:
        name:
          $ref: "#/components/schemas/business-profile-service-WorkspaceName"
        subdomain:
          $ref: "#/components/schemas/business-profile-service-WorkspaceSubdomain"
        logo:
          $ref: "#/components/schemas/business-profile-service-WorkspaceLogo"
        hash:
          $ref: "#/components/schemas/business-profile-service-WorkspaceHash"
        guid:
          $ref: "#/components/schemas/business-profile-service-WorkspaceGuid"
        created:
          $ref: "#/components/schemas/business-profile-service-CreationDate"
        updated:
          $ref: "#/components/schemas/business-profile-service-LastUpdateTime"
    business-profile-service-BusinessProfileExtendedResponse:
      type: object
      properties:
        id:
          type: number
          format: int64
          description: ID of the workspace
        guid:
          $ref: "#/components/schemas/business-profile-service-WorkspaceGuid"
        organizationId:
          type: number
          format: int64
          description: ID of the organization
        organizationGuid:
          type: string
          format: uuid
          description: GUID of the organization
        name:
          $ref: "#/components/schemas/business-profile-service-WorkspaceName"
        subdomain:
          $ref: "#/components/schemas/business-profile-service-WorkspaceSubdomain"
        logo:
          $ref: "#/components/schemas/business-profile-service-WorkspaceLogo"
        hash:
          $ref: "#/components/schemas/business-profile-service-WorkspaceHash"
        created:
          $ref: "#/components/schemas/business-profile-service-CreationDate"
        updated:
          $ref: "#/components/schemas/business-profile-service-LastUpdateTime"
        ipRestriction:
          type: string
          enum:
            - OFF
            - PASSB
            - FAIL
            - ENFORCED
        mfaRestriction:
          type: string
          enum:
            - OFF
            - PASS
            - FAIL
            - ENFORCED
        tags:
          type: array
          items:
            type: string
        favorite:
          type: boolean
    business-profile-service-BusinessProfileGroupSimpleResponse:
      type: object
      description: The group that this workspace belongs to (if applicable)
      properties:
        id:
          type: string
          format: uuid
          description: ID of the group
        name:
          type: string
          description: Name of the group
        profileIdentifier:
          type: string
          description: Profile identifier (key) used in the group
        createdAt:
          type: string
          format: date-time
          description: Creation time
        updatedAt:
          type: string
          format: date-time
          description: Last update time
    business-profile-service-BusinessProfileForOrganizationUserResponse:
      type: object
      properties:
        author:
          $ref: "#/components/schemas/business-profile-service-UserId"
        name:
          $ref: "#/components/schemas/business-profile-service-WorkspaceName"
        subdomain:
          $ref: "#/components/schemas/business-profile-service-WorkspaceSubdomain"
        logo:
          $ref: "#/components/schemas/business-profile-service-WorkspaceLogo"
        hash:
          $ref: "#/components/schemas/business-profile-service-WorkspaceHash"
        guid:
          $ref: "#/components/schemas/business-profile-service-WorkspaceGuid"
        activeUsersCount:
          type: integer
          format: int64
          description: The number of active users
        created:
          $ref: "#/components/schemas/business-profile-service-CreationDate"
        updated:
          $ref: "#/components/schemas/business-profile-service-LastUpdateTime"
        canAccessWorkspace:
          type: boolean
          description: "`true` when the current user can access this workspace"
        businessProfileGroup:
          $ref: "#/components/schemas/business-profile-service-BusinessProfileGroupSimpleResponse"
    business-profile-service-BusinessProfileWithIdentifiersForOrganizationUserResponse:
      type: object
      properties:
        author:
          $ref: "#/components/schemas/business-profile-service-UserId"
        name:
          $ref: "#/components/schemas/business-profile-service-WorkspaceName"
        subdomain:
          $ref: "#/components/schemas/business-profile-service-WorkspaceSubdomain"
        logo:
          $ref: "#/components/schemas/business-profile-service-WorkspaceLogo"
        hash:
          $ref: "#/components/schemas/business-profile-service-WorkspaceHash"
        guid:
          $ref: "#/components/schemas/business-profile-service-WorkspaceGuid"
        created:
          $ref: "#/components/schemas/business-profile-service-CreationDate"
        updated:
          $ref: "#/components/schemas/business-profile-service-LastUpdateTime"
        businessProfileGroup:
          $ref: "#/components/schemas/business-profile-service-BusinessProfileGroupSimpleResponse"
        identifiers:
          type: array
          description: Identifiers (keys) used in the workspace
          items:
            type: string
    business-profile-service-StepStructure:
      type: object
      properties:
        state:
          type: string
          enum:
            - NEW,
            - SKIP
            - DONE
        steps:
          type: object
          additionalProperties:
            $ref: "#/components/schemas/business-profile-service-StepStructure"
    business-profile-service-UniversalListResponseMeta:
      type: object
      description: Pagination data
      properties:
        count:
          type: integer
          format: int32
          description: Total number of items
        limit:
          type: integer
          format: int32
          description: Number of items per page
        links:
          type: array
          description: Links to other pages
          items:
            $ref: "#/components/schemas/business-profile-service-UniversalListResponseMetaLink"
    business-profile-service-UniversalListResponseMetaLink:
      type: object
      properties:
        rel:
          type: string
          description: Type of page relation
          enum:
            - first
            - next
            - prev
        url:
          type: string
          description: URL of the page
    business-profile-service-UniversalListBusinessProfilesResponse:
      type: object
      properties:
        data:
          type: array
          description: List of workspaces
          items:
            $ref: "#/components/schemas/business-profile-service-BusinessProfileExtendedResponse"
        meta:
          $ref: "#/components/schemas/business-profile-service-UniversalListResponseMeta"
    business-profile-service-UniversalListBusinessProfilesForOrganizationUserResponse:
      type: object
      properties:
        data:
          type: array
          description: A list of workspaces
          items:
            $ref: "#/components/schemas/business-profile-service-BusinessProfileForOrganizationUserResponse"
        meta:
          $ref: "#/components/schemas/business-profile-service-UniversalListResponseMeta"
    business-profile-service-UniversalListBusinessProfilesForOrganizationWithIdentifiersUserResponse:
      type: object
      properties:
        data:
          type: array
          description: A list of workspaces
          items:
            $ref: "#/components/schemas/business-profile-service-BusinessProfileWithIdentifiersForOrganizationUserResponse"
        meta:
          $ref: "#/components/schemas/business-profile-service-UniversalListResponseMeta"
    business-profile-service-DailyUsageStats:
      type: object
      properties:
        dailyUsageStatistics:
          $ref: "#/components/schemas/business-profile-service-UsageStatsByDay"
        eventsTotal:
          $ref: "#/components/schemas/business-profile-service-EventsStats"
        totalAll:
          type: integer
          description: The total number of all events in all requested days
        totalOther:
          type: integer
          description: The total number of all events in all requested days which were no included in the top 5 from `eventsTotal`
    business-profile-service-UsageStatsByDay:
      type: object
      description: Statistics for individual days
      properties:
        day:
          type: string
          format: date
          description: Date of the data in this object
        events:
          $ref: "#/components/schemas/business-profile-service-EventsStats"
        other:
          type: integer
          description: The number of events which were not included in the top 5 from `events`
        total:
          type: integer
          description: The total number of events
    business-profile-service-RetentionUsageStats:
      type: object
      properties:
        dailyUsageStatistics:
          $ref: "#/components/schemas/business-profile-service-UsageStatsByDay"
        eventsAverage:
          type: object
          description: The average number of top 5 most popular events kept in the database, calculated from all the requested days.
          additionalProperties:
            type: integer
            description: The average number of events
        averageAll:
          type: integer
          description: The average number of all events kept in the database on all the requested days.
        averageOther:
          type: integer
          description: The average number of events kept in the databse on all the requested days, other than the top 5 events from `eventsAverage`
    business-profile-service-EventsStats:
      type: object
      description: The top 5 most popular event types. The keys in the object are action names.
      additionalProperties:
        type: integer
        description: The number of events
    business-profile-service-AuthError:
      type: object
      properties:
        status:
          $ref: "#/components/schemas/business-profile-service-ErrorStatus"
        error:
          $ref: "#/components/schemas/business-profile-service-ErrorCode"
        message:
          $ref: "#/components/schemas/business-profile-service-ErrorMessage"
        timestamp:
          $ref: "#/components/schemas/business-profile-service-ErrorTimestamp"
    business-profile-service-ErrorMessage:
      type: string
      description: Description of the problem
    business-profile-service-ErrorTimestamp:
      type: string
      format: date-time
      description: Time when the error occurred
    business-profile-service-ErrorStatus:
      type: integer
      description: HTTP status of the response
    business-profile-service-ErrorCode:
      type: string
      description: Synerise error code. See [error reference](https://developers.synerise.com/errors.html).
    business-profile-service-ErrorErrorsArray:
      type: array
      description: Details of the problems
      items:
        type: object
        properties:
          errorCode:
            $ref: "#/components/schemas/business-profile-service-ErrorCode"
          message:
            $ref: "#/components/schemas/business-profile-service-ErrorMessage"
          details:
            type: object
            description: Details of the problem, if applicable.
          source:
            type: object
            description: Properties that caused a problem, if applicable.
            properties:
              parameter:
                type: string
                description: The name of the property that caused an error
    catalogs-itemKey:
      type: string
      description: |
        The value of the unique key of the item.

        Slashes (`/`) are not allowed in the value.

        In the Synerise Portal, this value is saved under **Primary key**.
      example: sku1357
    catalogs-enrichmentUpdateRequest:
      type: object
      properties:
        action:
          type: string
        paramKey:
          type: string
        enrichmentFields:
          type: array
          items:
            type: string
    catalogs-enableFilteringRequest:
      type: object
      properties:
        fields:
          type: array
          items:
            type: string
    catalogs-disableFilteringRequest:
      type: object
      properties:
        removeFilters:
          type: boolean
    catalogs-addItem:
      type: object
      required:
        - itemKey
        - value
      properties:
        itemKey:
          $ref: "#/components/schemas/catalogs-itemKey"
        value:
          type: object
          description: Properties of the item. Can be an empty object.
          additionalProperties:
            type: string
            description: Key:value data
          example:
            itemCategory: smartphone
            itemColor: blue
    catalogs-responseMeta:
      type: object
      description: This object holds the metadata of the response.
      properties:
        totalCount:
          type: integer
          description: The total number of matching values (key-value pairs; array items; objects) in the database
        requestTime:
          type: string
          description: The processing time of the request
          example: 0.11 [s]
    catalogs-addBag:
      type: object
      properties:
        name:
          type: string
          description: Catalog name
    catalogs-primaryKey:
      type: object
      required:
        - name
      properties:
        name:
          type: string
        description:
          type: string
    catalogs-bag:
      type: object
      description: This object holds the details of the catalog.
      properties:
        id:
          type: integer
          description: Catalog ID
        name:
          type: string
          description: Catalog name
        businessProfileId:
          type: integer
          description: ID of the Business Profile that contains this catalog
        createdBy:
          $ref: "#/components/schemas/catalogs-Author"
        creationDate:
          format: date-time
          type: string
          description: Creation date
        modifiedBy:
          $ref: "#/components/schemas/catalogs-Author"
        lastModified:
          type: string
          format: date-time
          description: Last modification date
        primaryKey:
          $ref: "#/components/schemas/catalogs-primaryKey"
        mappings:
          type: array
          items:
            $ref: "#/components/schemas/catalogs-mappingResponse"
        beforeFiltering:
          type: boolean
        fields:
          type: array
          items:
            type: string
    catalogs-mappingResponse:
      type: object
      required:
        - bpActionParamKey
        - bagId
        - itemId
        - action
        - paramKey
        - enrichmentFields
      properties:
        bpActionParamKey:
          type: string
        bagId:
          type: integer
          format: int64
        itemId:
          type: integer
          format: int64
        action:
          type: string
        paramKey:
          type: string
        enrichmentFields:
          type: array
          items:
            type: string
    catalogs-deleteResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: ID of the catalog
        result:
          type: boolean
          description: "`true` if the catalog was deleted successfully"
    catalogs-item:
      type: object
      description: Details of the item
      properties:
        bag:
          type: object
          description: Metadata of the catalog that includes the entry
          properties:
            id:
              type: integer
              format: int64
              description: Catalog ID
            name:
              type: string
              description: Catalog name
            businessProfileId:
              type: integer
              description: ID of the Business Profile that contains this catalog
            author:
              type: string
              description: ID of the catalog's creator
            lastModified:
              type: string
              format: date-time
              description: Last modification date
            creationDate:
              format: date-time
              type: string
              description: Creation date
            primaryKey:
              $ref: "#/components/schemas/catalogs-primaryKey"
            mappings:
              type: array
              items:
                $ref: "#/components/schemas/catalogs-mappingResponse"
        itemKey:
          type: string
          description: They unique value of the item key (for example, an SKU) that was used to upload this entry. This is the `key` query parameter used in [this endpoint](#operation/getItemByKey).
        id:
          type: integer
          format: int64
          description: ID of the entry. This is the `itemId` used in [this endpoint](#operation/getItem).
        value:
          type: string
          description: Contents of the entry
          example: '{"Name":"John","Surname":"Doe"}'
        creationDate:
          type: string
          description: Creation date of the entry
        lastModified:
          type: string
          description: Last modified date of the entry
    catalogs-eventData:
      type: object
      properties:
        action:
          type: string
          description: The `action` field of the event
          example: transaction.charge
        paramKey:
          type: string
          description: The parameter in the event that corresponds to the catalog column with the unique identifiers
          example: sku
    catalogs-mapper:
      type: object
      description: Details of the mapping
      properties:
        bpActionParamKey:
          type: string
          description: The unique identifier of this mapping
        bagId:
          type: integer
          description: The catalog associated with this mapping
        action:
          type: string
          description: The `action` field of the event
          example: transaction.charge
        paramKey:
          type: string
          description: The parameter in the event that corresponds to the catalog column with the unique identifiers
          example: sku
        enrichmentFields:
          type: array
          items:
            type: string
          description: enrichment fields
    catalogs-ErrorResponse:
      type: object
      properties:
        status:
          type: integer
          description: Status code
        error:
          type: string
          description: Error summary
        message:
          type: string
          description: Error message
        timestamp:
          type: string
          description: Time when the error occurred
    catalogs-Author:
      type: object
      description: Data of user
      properties:
        id:
          type: integer
          description: Id of the user
        name:
          type: string
          description: Name of the user
        iconUrl:
          type: string
          description: URL of the user's avatar icon
    crm-ClientDetails:
      type: object
      properties:
        base:
          type: object
          description: The details of a Profile
          additionalProperties:
            description: The name of a parameter
            type: object
            properties:
              label:
                type: string
                description: A name for the parameter (can be a default parameter created by Synerise or a custom one)
              value:
                description: The value of the parameter
        tags:
          type: array
          description: The Profile's tags
          items:
            type: string
    crm-CustomerCommon:
      type: object
      properties:
        uuid:
          type: string
          description: UUID of the Profile
          example: 07243772-008a-42e1-ba37-c3807cebde8f
        email:
          type: string
          description: Profile's e-mail address
        firstname:
          type: string
          description: Profile's first name
        lastName:
          type: string
          description: Profile's last name
        custom_identify:
          type: string
          description: A custom ID for the Profile
        company:
          type: string
          description: Profile's company
        phone:
          type: string
          description: Profile's phone number
        address:
          type: string
          description: Profile's street address
        birthdate:
          type: string
          format: date
          description: Profile's date of birth. Must be a past date.
        city:
          type: string
          description: Profile's city of residence
        zipCode:
          type: string
          description: Profile's zip code
        province:
          type: string
          description: Profile's province of residence
        country_id:
          type: string
          description: ID of the Profile's country of residence
        countryCode:
          type: string
          description: Code of Profile's country of residence
          example: PL
        avatarUrl:
          type: string
          nullable: true
          description: URL of the Profile's avatar picture
        sex:
          type: string
          description: |
            Profile's sex.

            - 0: undefined
            - 1: female
            - 2: male
            - 3: other
          enum:
            - "0"
            - "1"
            - "2"
            - "3"
        tags:
          type: array
          description: Custom tags. They can be used, for example, to group Profiles.
          items:
            type: string
        additionalProperties:
          description: |
            Additional attributes, including custom attributes.

            The following attributes are reserved for system use and can't be modified:
            <details><summary>Click to expand the list of reserved attributes</summary>
            <code>email</code><br><code>clientId</code><br><code>phone</code><br><code>customId</code><br><code>uuid</code><br><code>firstName</code><br><code>lastName</code><br><code>displayName</code><br><code>company</code><br><code>address</code><br><code>city</code><br><code>province</code><br><code>zipCode</code><br><code>countryCode</code><br><code>birthDate</code><br><code>sex</code><br><code>avatarUrl</code><br><code>anonymous</code><br><code>agreements</code><br><code>tags</code><br><code>businessProfileId</code><br><code>time</code><br><code>ip</code><br><code>source</code><br><code>newsletter_agreement</code><br><code>custom_identify</code><br><code>firstname</code><br><code>lastname</code><br><code>created</code><br><code>updated</code><br><code>last_activity_date</code><br><code>birthdate</code><br><code>external_avatar_url</code><br><code>displayname</code><br><code>receive_smses</code><br><code>receive_push_messages</code><br><code>receive_webpush_messages</code><br><code>receive_btooth_messages</code><br><code>receive_rfid_messages</code><br><code>receive_wifi_messages</code><br><code>confirmation_hash</code><br><code>ownerId</code><br><code>zipCode</code><br><code>anonymous_type</code><br><code>country_id</code><br><code>geo_loc_city</code><br><code>geo_loc_country</code><br><code>geo_loc_as</code><br><code>geo_loc_country_code</code><br><code>geo_loc_isp</code><br><code>geo_loc_lat</code><br><code>geo_loc_lon</code><br><code>geo_loc_org</code><br><code>geo_loc_query</code><br><code>geo_loc_region</code><br><code>geo_loc_region_name</code><br><code>geo_loc_status</code><br><code>geo_loc_timezone</code><br><code>geo_loc_zip</code><br><code>club_card_id</code><br><code>type</code><br><code>confirmed</code><br><code>facebookId</code><br><code>status</code>
            </details>
    items-filter-all-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
        requestId:
          type: string
          description: ID of the request which resulted in the error
      required:
        - timestamp
        - status
        - message
    items-filter-all-ParserResult:
      type: object
      description: Result of validating the IQL syntax and only the syntax - this result does not inform if the filter returns any results or if the used attributes are filterable.
      properties:
        valid:
          type: boolean
          description: True if IQL expression syntax is valid.
        message:
          type: string
          description: Error message when IQL expression is not valid
        parsedFilteringString:
          type: string
          description: Parsed filtering string
      required:
        - valid
        - parsedFilteringString
    items-filter-all-EvaluationResult:
      type: object
      description: Evaluation including data from the item catalog, configuration, and context items/profiles.
      properties:
        resultSize:
          type: integer
          description: How many items meet the conditions of the IQL filtering string in total
        modifiedFilteringString:
          type: string
          description: Filtering string after application of the filtering context. For example, `title != context.title` becomes `title != "Synerise API Reference"`
        evaluationErrors:
          type: array
          description: List of IQL evaluation errors
          items:
            type: object
            properties:
              filter:
                type: string
                description: Name of variable on which the filter is based
              message:
                type: string
                description: Error message
            required:
              - filter
              - message
      required:
        - resultSize
    items-filter-all-Extracts:
      type: object
      description: Information about elements that were used anywhere in the filtering string. **Elements are listed only if they were valid.**
      properties:
        clientExtracts:
          type: object
          description: Attributes of the context profile
          properties:
            attributeConstants:
              type: array
              description: Profile attributes used in the query
              items:
                type: string
            segmentationsConstant:
              type: array
              description: Segmentations used in the query
              items:
                type: string
            aggregateConstants:
              type: array
              description: Aggregates used in the query
              items:
                type: string
            expressionConstants:
              type: array
              description: Expressions used in the query
              items:
                type: string
            TagsConstant:
              type: boolean
              description: True if context profile's tags were referenced in the query.
        contextConstants:
          type: array
          description: Context elements used in the query
          items:
            type: string
        variables:
          type: array
          description: Variables used in the query (for example pulled from the context)
          items:
            type: string
    items-filter-all-FilterValidateResponse:
      type: object
      properties:
        filteringString:
          $ref: "#/components/schemas/items-filter-all-FilteringString"
        contextItems:
          $ref: "#/components/schemas/items-filter-all-ContextItems"
        clientUUID:
          $ref: "#/components/schemas/items-filter-all-ClientUUID"
        parserResult:
          $ref: "#/components/schemas/items-filter-all-ParserResult"
        evaluationResult:
          $ref: "#/components/schemas/items-filter-all-EvaluationResult"
        extracts:
          $ref: "#/components/schemas/items-filter-all-Extracts"
        candidateItems:
          type: array
          description: List of validated candidate items
          items:
            type: object
            properties:
              itemId:
                type: string
                description: ID of an item that was tested against the filtering string
                example: "67890"
              valid:
                type: boolean
                description: True if the item meets the conditions of the filtering string
            required:
              - itemId
              - valid
        exampleItems:
          type: array
          items:
            type: string
          description: Array of itemIds that meet the conditions of the filtering string. The size of this array can be controlled by the `exampleItems` query parameter.
      required:
        - filteringString
        - parserResult
    items-filter-all-FilteringString:
      type: string
      description: "[IQL](https://help.synerise.com/developers/iql) filtering expression"
      example: IF("abcd" IN client.tags,discount == 0,discount > 0)
    items-filter-all-ContextItems:
      type: array
      items:
        type: string
        example: "12345"
      description: itemIds of the items which create the item context
    items-filter-all-ClientUUID:
      type: string
      description: UUID of the profile which creates the profile context
      example: 68df2317-0edb-4cc9-8b39-5ab68325f891
    items-filter-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/items-filter-all-SingleInventoryContext"
        - $ref: "#/components/schemas/items-filter-all-MultiInventoryContext"
    items-filter-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
    items-filter-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/items-filter-all-InventoryContextDefinition"
          description: |
            Map of inventory ID to inventory context definition. Each inventory can have its own set of channel IDs.
      required:
        - inventoryCatalogs
    items-filter-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.
    items-filter-all-CandidateItems:
      type: array
      items:
        type: string
        example: "67890"
      description: Array of itemIds that will be tested against the IQL expression. You can use this with test items to verify that the query matches the items you expected.
    items-filter-all-ValidateItemsFilterRequestBody:
      description: Request for performing IQL validation
      type: object
      properties:
        filteringString:
          $ref: "#/components/schemas/items-filter-all-FilteringString"
        clientUUID:
          $ref: "#/components/schemas/items-filter-all-ClientUUID"
        contextItems:
          $ref: "#/components/schemas/items-filter-all-ContextItems"
        inventoryContext:
          $ref: "#/components/schemas/items-filter-all-InventoryContext"
        candidateItems:
          $ref: "#/components/schemas/items-filter-all-CandidateItems"
      required:
        - filteringString
    items-search-Error:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        status:
          type: integer
          description: Status code
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
        path:
          type: string
          description: URL of the requested resource
      required:
        - timestamp
        - status
        - message
    items-search-ResultFacets:
      type: object
      description: Facet value mappings
      example:
        brand:
          X-brand: 1
          Y-brand: 3
        salePrice.value:
          max: 201.99
          min: 14.99
      additionalProperties:
        description: The type of facet, for example `category`
        type: object
        additionalProperties:
          description: 'The values for keys in this facet type, for example `"Home Appliances>Fridges": 12`'
          type: integer
    items-search-AutocompleteResponse:
      type: object
      title: Item search
      properties:
        data:
          $ref: "#/components/schemas/items-search-FoundItems"
        extras:
          type: object
          description: Additional information
          properties:
            filteredFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            allFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            customFilteredFacets:
              allOf:
                - type: object
                  description: Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests.
                - $ref: "#/components/schemas/items-search-ResultFacets"
            correlationId:
              $ref: "#/components/schemas/items-search-CorrelationIdInResponse"
            searchId:
              $ref: "#/components/schemas/items-search-SearchIdInResponse"
            facetsOrdering:
              $ref: "#/components/schemas/items-search-FacetsOrderingResponse"
            suggestions:
              type: array
              description: A list of search suggestions
              items:
                $ref: "#/components/schemas/items-search-FullTextSuggestionSchema"
            usedSuggestion:
              $ref: "#/components/schemas/items-search-UsedSuggestion"
        meta:
          $ref: "#/components/schemas/items-search-PaginationMeta"
    items-search-AutocompleteResponseWithExplanation:
      type: object
      title: Item search
      properties:
        data:
          $ref: "#/components/schemas/items-search-FoundItemsWithExplanation"
        extras:
          type: object
          description: Additional information
          properties:
            filteredFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            allFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            customFilteredFacets:
              allOf:
                - type: object
                  description: Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests.
                - $ref: "#/components/schemas/items-search-ResultFacets"
            correlationId:
              $ref: "#/components/schemas/items-search-CorrelationIdInResponse"
            searchId:
              $ref: "#/components/schemas/items-search-SearchIdInResponse"
            facetsOrdering:
              $ref: "#/components/schemas/items-search-FacetsOrderingResponse"
            suggestions:
              type: array
              description: A list of search suggestions
              items:
                $ref: "#/components/schemas/items-search-FullTextSuggestionSchema"
            usedSuggestion:
              $ref: "#/components/schemas/items-search-UsedSuggestion"
            explanation:
              $ref: "#/components/schemas/items-search-SearchExplanationWithRerankerExplanation"
        meta:
          $ref: "#/components/schemas/items-search-PaginationMeta"
    items-search-FullTextSearchResponse:
      type: object
      title: Item search
      properties:
        data:
          $ref: "#/components/schemas/items-search-FoundItems"
        extras:
          type: object
          description: Additional information
          properties:
            filteredFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            allFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            customFilteredFacets:
              allOf:
                - type: object
                  description: Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests.
                - $ref: "#/components/schemas/items-search-ResultFacets"
            correlationId:
              $ref: "#/components/schemas/items-search-CorrelationIdInResponse"
            searchId:
              $ref: "#/components/schemas/items-search-SearchIdInResponse"
            facetsOrdering:
              $ref: "#/components/schemas/items-search-FacetsOrderingResponse"
            suggestions:
              type: array
              description: A list of search suggestions
              items:
                $ref: "#/components/schemas/items-search-FullTextSuggestionSchema"
            usedSuggestion:
              $ref: "#/components/schemas/items-search-UsedSuggestion"
        meta:
          $ref: "#/components/schemas/items-search-PaginationMeta"
    items-search-FullTextSearchResponseWithExplanation:
      type: object
      title: Item search
      properties:
        data:
          $ref: "#/components/schemas/items-search-FoundItemsWithExplanation"
        extras:
          type: object
          description: Additional information
          properties:
            filteredFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            allFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            customFilteredFacets:
              allOf:
                - type: object
                  description: Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests.
                - $ref: "#/components/schemas/items-search-ResultFacets"
            correlationId:
              $ref: "#/components/schemas/items-search-CorrelationIdInResponse"
            searchId:
              $ref: "#/components/schemas/items-search-SearchIdInResponse"
            facetsOrdering:
              $ref: "#/components/schemas/items-search-FacetsOrderingResponse"
            suggestions:
              type: array
              description: A list of search suggestions
              items:
                $ref: "#/components/schemas/items-search-FullTextSuggestionSchema"
            usedSuggestion:
              $ref: "#/components/schemas/items-search-UsedSuggestion"
            explanation:
              $ref: "#/components/schemas/items-search-SearchExplanationWithRerankerExplanation"
        meta:
          $ref: "#/components/schemas/items-search-PaginationMeta"
    items-search-ListingResponse:
      type: object
      properties:
        data:
          $ref: "#/components/schemas/items-search-FoundItems"
        extras:
          type: object
          description: Additional information
          properties:
            filteredFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            allFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            customFilteredFacets:
              allOf:
                - type: object
                  description: Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests.
                - $ref: "#/components/schemas/items-search-ResultFacets"
            correlationId:
              $ref: "#/components/schemas/items-search-CorrelationIdInResponse"
            searchId:
              $ref: "#/components/schemas/items-search-SearchIdInResponse"
            facetsOrdering:
              $ref: "#/components/schemas/items-search-FacetsOrderingResponse"
        meta:
          $ref: "#/components/schemas/items-search-PaginationMeta"
    items-search-ListingResponseWithExplanation:
      type: object
      properties:
        data:
          $ref: "#/components/schemas/items-search-FoundItemsWithExplanation"
        extras:
          type: object
          description: Additional information
          properties:
            filteredFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            allFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            customFilteredFacets:
              allOf:
                - type: object
                  description: Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests.
                - $ref: "#/components/schemas/items-search-ResultFacets"
            correlationId:
              $ref: "#/components/schemas/items-search-CorrelationIdInResponse"
            searchId:
              $ref: "#/components/schemas/items-search-SearchIdInResponse"
            facetsOrdering:
              $ref: "#/components/schemas/items-search-FacetsOrderingResponse"
            explanation:
              $ref: "#/components/schemas/items-search-Explanation"
        meta:
          $ref: "#/components/schemas/items-search-PaginationMeta"
    items-search-VisualSearchResponse:
      type: object
      properties:
        data:
          $ref: "#/components/schemas/items-search-FoundItems"
        extras:
          type: object
          description: Additional information
          properties:
            filteredFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            allFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            customFilteredFacets:
              allOf:
                - type: object
                  description: Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests.
                - $ref: "#/components/schemas/items-search-ResultFacets"
            correlationId:
              $ref: "#/components/schemas/items-search-CorrelationIdInResponse"
            searchId:
              $ref: "#/components/schemas/items-search-SearchIdInResponse"
            facetsOrdering:
              $ref: "#/components/schemas/items-search-FacetsOrderingResponse"
        meta:
          $ref: "#/components/schemas/items-search-PaginationMeta"
    items-search-VisualSearchResponseWithExplanation:
      type: object
      properties:
        data:
          $ref: "#/components/schemas/items-search-FoundItemsWithExplanation"
        extras:
          type: object
          description: Additional information
          properties:
            filteredFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            allFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            customFilteredFacets:
              allOf:
                - type: object
                  description: Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests.
                - $ref: "#/components/schemas/items-search-ResultFacets"
            correlationId:
              $ref: "#/components/schemas/items-search-CorrelationIdInResponse"
            searchId:
              $ref: "#/components/schemas/items-search-SearchIdInResponse"
            facetsOrdering:
              $ref: "#/components/schemas/items-search-FacetsOrderingResponse"
            explanation:
              $ref: "#/components/schemas/items-search-Explanation"
        meta:
          $ref: "#/components/schemas/items-search-PaginationMeta"
    items-search-UsedSuggestion:
      type: object
      description: If the query did not return any matches, the AI engine tries to find an alternative similar query and use it for the search instead. If that happens, the `usedSuggestion` object contains information about that alternative query offered by the AI engine and used in the search.
      allOf:
        - $ref: "#/components/schemas/items-search-FullTextSuggestionSchema"
    items-search-SuggestionResponse:
      type: object
      title: Suggestion search
      properties:
        data:
          type: array
          description: A page of search query suggestions
          items:
            type: object
            description: A search suggestion
            properties:
              suggestion:
                type: string
                description: The suggested search phrase
        extras:
          type: object
          description: Additional information
          properties:
            correlationId:
              $ref: "#/components/schemas/items-search-CorrelationIdInResponse"
            searchId:
              $ref: "#/components/schemas/items-search-SearchIdInResponse"
            facetsOrdering:
              $ref: "#/components/schemas/items-search-FacetsOrderingResponse"
        meta:
          $ref: "#/components/schemas/items-search-PaginationMeta"
    items-search-SuggestionResponseWithExplanation:
      type: object
      title: Suggestion search
      properties:
        data:
          type: array
          description: A page of search query suggestions
          items:
            type: object
            description: A search suggestion
            properties:
              _explanation:
                type: object
                description: Explanation of the result
                properties:
                  origin:
                    type: array
                    description: The type of suggestion
                    items:
                      type: string
                      enum:
                        - Manual
                        - Attribute
                        - Event
                  popularityScore:
                    type: number
                    description: Popularity of the suggestion
                  score:
                    type: number
                    description: Score of the suggestion
              suggestion:
                type: string
                description: The suggested search phrase
        extras:
          type: object
          description: Additional information
          properties:
            correlationId:
              $ref: "#/components/schemas/items-search-CorrelationIdInResponse"
            searchId:
              $ref: "#/components/schemas/items-search-SearchIdInResponse"
            facetsOrdering:
              $ref: "#/components/schemas/items-search-FacetsOrderingResponse"
        meta:
          $ref: "#/components/schemas/items-search-PaginationMeta"
    items-search-QueryClassificationResponse:
      type: object
      title: Query classification
      properties:
        predictedCategories:
          $ref: "#/components/schemas/items-search-QueryClassificationCategories"
    items-search-QueryClassificationConfig:
      type: object
      description: Query classification configuration
      properties:
        actions:
          type: array
          description: Search result actions with a minimum reliability level
          items:
            type: object
            properties:
              action:
                $ref: "#/components/schemas/items-search-SearchResultAction"
              minReliabilityLevel:
                $ref: "#/components/schemas/items-search-ReliabilityLevel"
        excludedPhrases:
          type: array
          description: Phrases that will be excluded from query classification
          items:
            type: string
        excludedCategories:
          type: array
          description: Categories that will be excluded from query classification
          items:
            type: string
    items-search-QueryClassificationCategories:
      type: array
      description: A list of predicted categories and their scores
      items:
        type: object
        properties:
          category:
            type: string
            description: The predicted category.
          score:
            type: number
            description: The score of the predicted category.
          ctr:
            type: number
            description: The CTR of the predicted category.
            format: float
          actions:
            type: array
            items:
              $ref: "#/components/schemas/items-search-SearchResultAction"
          reliabilityLevel:
            $ref: "#/components/schemas/items-search-ReliabilityLevel"
    items-search-SearchResultAction:
      type: string
      description: |
        The action to perform when the reliability level from `minReliabilityLevel` is reached.
        - `staticFilter` will apply a static filter to limit the search results to the predicted category.
        - `elasticFilter` will apply an elastic filter - if there are not enough results from the predicted category, the AI engine will pick items from other categories to meet the minimum number of results.
        - `boosting` will increase the scores of items from the predicted category.

        If reliability levels are met for multiple actions, the priority is:
        1. static filter
        2. elastic filter
        3. boosting
      enum:
        - staticFilter
        - elasticFilter
        - boosting
    items-search-ReliabilityLevel:
      type: string
      description: The reliability level indicates how confident we are that a given prediction is the best choice.
      enum:
        - certain
        - veryHigh
        - high
        - medium
        - low
    items-search-SearchableAttributesMatchResponse:
      type: object
      title: Searchable attributes match
      properties:
        query:
          type: object
          description: Search query with tokens
          properties:
            value:
              type: string
              description: Search query
            tokens:
              type: array
              description: A list of search query tokens and their positions
              items:
                $ref: "#/components/schemas/items-search-SearchQueryTokens"
        attributes:
          $ref: "#/components/schemas/items-search-ExplainMatchSearchableAttributes"
    items-search-SearchQueryTokens:
      type: object
      title: Search query tokens
      properties:
        token:
          type: string
          description: Search query token
        positions:
          type: array
          description: A list of query token positions
          items:
            type: object
            properties:
              start:
                type: number
                description: Start position
              end:
                type: number
                description: Start position
    items-search-ExplainMatchSearchableAttributes:
      type: array
      description: A list of searchable attributes with value and matched tokens
      items:
        type: object
        properties:
          attribute:
            type: string
            description: Attribute name
          value:
            description: Attribute value
            type: string
          tokens:
            type: array
            description: A list of matched tokens
            items:
              type: object
              properties:
                queryToken:
                  type: string
                  description: Matched token
                type:
                  description: Token type
                  type: string
                  enum:
                    - word
                    - synonym
                start:
                  type: number
                  description: Start position
                end:
                  type: number
                  description: Start position
    items-search-PaginationMeta:
      type: object
      description: Optional metadata, such as pagination. This is returned if the `includeMeta` parameter was set to true in the request.
      properties:
        totalPages:
          type: number
          description: The total number of pages
        totalCount:
          type: number
          description: The total number of search results
        page:
          type: number
          description: The current page
        limit:
          type: number
          description: The maximal number of items on a page
        sortedBy:
          type: string
          description: The column (attribute) that the campaigns were sorted by
        ordering:
          type: string
          description: Sorting order
        code:
          type: number
          description: HTTP response code
        link:
          type: array
          description: Links to neighboring pages, first page, and last page in pagination
          items:
            type: object
            properties:
              url:
                description: Page URL
                type: string
              rel:
                type: string
                description: Position of the linked page
                enum:
                  - first
                  - next
                  - prev
                  - last
    items-search-FoundItems:
      type: array
      description: A page of matching items as objects. The parameters of each item's object depend on the configuration of displayable attributes.
      items:
        type: object
        properties:
          _promotedByRules:
            type: array
            items:
              type: integer
              description: Rule id
            description: List of applied rules that had an effect in promoting this item. This field exists if and only if the item was promoted.
        additionalProperties:
          description: The names and value types of the item's properties depend on the configuration.
        example:
          itemName: TV
          itemId: 87257843345
          _promotedByRules:
            - 475
            - 477
    items-search-FoundItemsWithExplanation:
      type: array
      description: A page of matching items as objects with explanation included. The parameters of each item's object depend on the configuration of displayable attributes.
      items:
        type: object
        properties:
          _promotedByRules:
            type: array
            items:
              type: integer
              description: Rule id
            description: List of applied rules that had an effect in promoting this item. This field exists if and only if the item was promoted.
          _explanation:
            $ref: "#/components/schemas/items-search-PerItemExplanation"
        additionalProperties:
          description: The names and value types of the item's properties depend on the configuration.
        example:
          itemName: TV
          itemId: 87257843345
          _promotedByRules:
            - 475
            - 477
    items-search-FullTextSuggestionSchema:
      type: object
      description: If the query from the request doesn't return any matches (for example due to a spelling error in the query), the AI engine may suggest a similar query and use it instead. This object is included in the response only if that mechanism was triggered.
      properties:
        text:
          type: string
          description: The suggested text query
        highlighted:
          type: string
          description: The suggested text query with the HTML emphasis tag added
        score:
          type: number
          description: Estimated accuracy of the suggestion. `1.0` means 100%.
          format: float
          maximum: 1
    items-search-PaginationSortBy:
      type: string
      description: |
        <span style='color:red'><strong>IMPORTANT:</strong></span> Sorting disables boosting, elastic filters, and promoting search results.

        Name of the attribute by which the data will be sorted.
    items-search-PaginationOrdering:
      type: string
      default: asc
      enum:
        - desc
        - asc
      description: Sorting order
    items-search-PaginationPage:
      type: integer
      format: int32
      description: Page number to return for pagination. The first page has the index `1`.
    items-search-PaginationLimit:
      type: integer
      format: int32
      example: 10
      default: 20
      maximum: 500
      minimum: 0
      description: The number of items to return per page
    items-search-PaginationIncludeMeta:
      type: boolean
      description: |
        
        When `true`, pagination metadata is included in the response body.

        When `false`, the data is included in the response headers:

        - Link: links to neighbors, first, and last pages in pagination.

        - X-Pagination-Total-Count: total number of items on all pages

        - X-Pagination-Total-Pages: total number of pages

        - X-Pagination-Page: current page

        - X-Pagination-Limit: maximum number of items on a page

        - X-Pagination-Sorted-By: parameter that the items were sorted by

        - X-Pagination-Ordering: sorting direction
    items-search-Context:
      type: array
      description: List of context strings for a search query
      example:
        - mobile
        - listing
      items:
        type: string
    items-search-DisplayAttributes:
      type: array
      description: List of ad hoc attributes that will be returned for each found item
      example:
        - title
        - price
      items:
        type: string
    items-search-SearchQuery:
      type: string
      description: Query text to use in the search
    items-search-ImageUrl:
      type: string
      description: URL of the image to be used in the visual search
    items-search-ClientUUID:
      type: string
      description: UUID of the profile for which the search is performed
    items-search-CorrelationId:
      type: string
      description: |
        Correlation ID for pagination. If a search with the ID was performed recently (last 10 minutes), the cached results will be used.

        Do not send this if sortBy/filters/sorting order, etc. have changed - the cached results may have different order or may match different filters.
    items-search-SearchId:
      type: string
      deprecated: true
      description: |
        **DEPRECATED - use correlationId instead**

        Search ID for pagination. If a search with the ID was performed recently (last 10 minutes), the cached results will be used.

        Do not send this if sortBy/filters/sorting order, etc. have changed - the cached results may have different order or may match different filters.
    items-search-CorrelationIdInResponse:
      type: string
      description: |
        This ID is used:
        - for search result pagination
        - as `correlationId` of the search event in events such as `items.search.click`

        Search results are cached for 10 minutes.

        The cached value will be used if the ID is provided in subsequent calls. This makes search faster and eliminates personalization non-determinism.
    items-search-SearchIdInResponse:
      type: string
      deprecated: true
      description: |
        **DEPRECATED - use correlationId instead**

        This ID is used:
        - for search result pagination
        - as `searchId` of the search event in events such as `items.search.click`

        Search results are cached for 10 minutes.

        The cached value will be used if the ID is provided in subsequent calls. This makes search faster and eliminates personalization non-determinism.
    items-search-SortByMetric:
      type: string
      enum:
        - TransactionsPopularity
        - PageVisitsPopularity
      description: |
        <span style='color:red'><strong>IMPORTANT:</strong></span> Sorting disables boosting, elastic filters, and promoting search results.

        Name of the metric by which the data will be sorted.
    items-search-SortByGeoPoint:
      type: string
      example: 34.052235,-118.243685
      description: |
        <span style='color:red'><strong>IMPORTANT:</strong></span> Sorting disables boosting, elastic filters, and promoting search results.

        Geo-point (`{latitude},{longitude}`) for data sorting. Results are sorted by distance from this point. `ordering: asc` means "closest first".'
    items-search-FilterGeoPoints:
      type: array
      example:
        - 34.052235,-118.243685
        - 15.0,65.0
      items:
        type: string
      description: |
        The definition of a geographical area to filter by.

        Given one geo-point, the results will be limited to a radius around a point. To override the default radius (1000 meters), provide the `filterAroundRadius` parameter.
        **Example input:** `["34.052235,-118.243685"]`

        Given two geo-points, the results will be limited to a rectangular area.
        **Example input:** `["50,-100", "25,150"]`

        Given three or more geo-points, the results will be limited to a polygonal area.
        **Example input:** `["50,0", "40,20", "-20,10"]`
    items-search-FilterAroundRadius:
      type: integer
      format: int32
      example: 2000
      default: 1000
      description: Radius in meters to be used when filtering using geo-location. Can only be used when filtering by a single geo-point.
    items-search-FilterAnchor:
      type: string
      example: 0.2,0.8
      description: |
        Anchor (`{width},{height}`) by which the visual results data will be filtered.
        `{width},{height}` correspond to normalized image coordinates, i.e. they are in range [0,1].
        Anchor (0,0) corresponds to the top-left pixel of an image.
    items-search-Filters:
      type: string
      description: IQL query string. For details, see the [Help Center](https://help.synerise.com/developers/iql/).
    items-search-Facets:
      type: array
      description: |
        A list of attributes for which facets will be returned.
        - A single `*` value matches all facetable attributes.
        - A single `auto` value enables automatic facet selection based on the result set — the system picks the most relevant facets using the index's `dynamicFacets` configuration.

        To determine which groups of facets should be returned, use the `includeFacets` parameter.
      items:
        type: string
    items-search-CustomFilteredFacets:
      type: object
      description: |
        A key-value map that takes attributes as keys and IQL query strings as values.

        For each key a facet is returned that includes only the items filtered by the provided IQL query string.
      additionalProperties:
        name: value
        $ref: "#/components/schemas/items-search-Filters"
      example:
        brand: price > 100
        price: brand == foo
    items-search-IncludeFacets:
      type: string
      default: filtered
      enum:
        - all
        - filtered
        - unfiltered
        - none
      description: |
        Determines which groups of facets will be returned: both filtered and unfiltered; just filtered; just unfiltered; or no group at at all.

        To determine which attributes should be returned as facets in each group, use the `facets` and `customFilteredFacets` parameters.
    items-search-FacetsOrdering:
      type: string
      enum:
        - coverage
        - name
      description: |
        Controls the ordering of facets in the response.  
        When `facets=auto`, the default ordering is by coverage (most relevant facets first).  
        When facets are specified explicitly, the default ordering is by name.  
        When two facets have equal coverage, ties are resolved by name.
    items-search-FacetsOrderingResponse:
      type: array
      description: |
        An ordered list of facet attribute names indicating the display order of facets in the response.
        When `facets=auto`, facets are ordered by coverage (most relevant first) unless `facetsOrderBy=name` is specified.
        When facets are specified explicitly, the ordering is by name.
        Empty when no facets are requested.

        Matching query rules can override the resulting set and order via two consequences:
        - `pinFacets` forces specific facets into the response, optionally at a specific 1-based slot.
          Pinned facets bypass the coverage threshold in `facets=auto`.
        - `hideFacets` removes specific facets from the response, also stripping them from
          `customFilteredFacets`. Hide takes precedence over pin and over explicit `facets=[...]`.

        The corresponding facet values appear in `filteredFacets`, `allFacets`, and `customFilteredFacets`
        only for attributes present in this list.
      items:
        type: string
      example:
        - brand
        - color
        - size
        - price
    items-search-FacetsSize:
      type: integer
      default: 2000
      minimum: 1
      maximum: 10000
      description: |
        Determines how many items will be used for facets aggregation.
    items-search-MaxValuesPerFacet:
      type: integer
      default: 50
      minimum: 1
      maximum: 1000
      description: |
        Determines how many values will be retrieved per facet.
    items-search-CaseSensitiveFacetValues:
      type: boolean
      default: false
      description: |
        Specifies whether facets aggregation should be case sensitive.
    items-search-FilterableAttributesValues:
      type: object
      additionalProperties:
        type: array
        description: The name of the array is the attribute name. The values in the array are the possible values of that attribute.
        items:
          type: string
      example:
        brand:
          - foo
          - bar
        color:
          - red
          - green
          - blue
    items-search-DistinctFilterSearch:
      type: object
      description: Distinct filters regulate how many items with the same value of a particular attribute can be returned.
      properties:
        attribute:
          type: string
          description: Name of the attribute to be used for distinct filter
        maxNumItems:
          type: integer
          description: Maximum number of items to be returned per each distinct attribute value
          minimum: 1
        levelRangeModifier:
          type: integer
          description: Level of the category, if the category attribute was used for distinct filter
          minimum: 0
      required:
        - attribute
        - maxNumItems
    items-search-Personalize:
      type: boolean
      description: If set to `false`, the search result is not personalized.
      default: true
    items-search-IgnoreQueryRules:
      type: boolean
      description: If set to `true`, query rules are not applied.
      default: false
    items-search-ExcludeQueryRules:
      type: array
      example:
        - 2
        - 5
      items:
        type: integer
      description: List of query rules that will not be applied.
    items-search-DisableQueryClassification:
      type: boolean
      description: If set to `true`, query classification is not applied.
      default: false
    items-search-DisableDynamicReranker:
      type: boolean
      description: If set to `true`, q dynamic reranker is not applied.
      default: false
    items-search-CrossWorkspaceMode:
      type: object
      description: Cross-workspace personalization mode. When provided, overrides the index configuration setting.
      properties:
        enabled:
          type: boolean
          description: Whether cross-workspace personalization is enabled.
      required:
        - enabled
    items-search-ListingRequest:
      type: object
      properties:
        page:
          $ref: "#/components/schemas/items-search-PaginationPage"
        limit:
          $ref: "#/components/schemas/items-search-PaginationLimit"
        sortBy:
          $ref: "#/components/schemas/items-search-PaginationSortBy"
        ordering:
          $ref: "#/components/schemas/items-search-PaginationOrdering"
        includeMeta:
          $ref: "#/components/schemas/items-search-PaginationIncludeMeta"
        clientUUID:
          $ref: "#/components/schemas/items-search-ClientUUID"
        personalize:
          $ref: "#/components/schemas/items-search-Personalize"
        correlationId:
          $ref: "#/components/schemas/items-search-CorrelationId"
        searchId:
          $ref: "#/components/schemas/items-search-SearchId"
        sortByMetric:
          $ref: "#/components/schemas/items-search-SortByMetric"
        sortByGeoPoints:
          $ref: "#/components/schemas/items-search-SortByGeoPoint"
        filterGeoPoints:
          $ref: "#/components/schemas/items-search-FilterGeoPoints"
        filterAroundRadius:
          $ref: "#/components/schemas/items-search-FilterAroundRadius"
        filters:
          $ref: "#/components/schemas/items-search-Filters"
        facets:
          $ref: "#/components/schemas/items-search-Facets"
        customFilteredFacets:
          $ref: "#/components/schemas/items-search-CustomFilteredFacets"
        facetsSize:
          $ref: "#/components/schemas/items-search-FacetsSize"
        maxValuesPerFacet:
          $ref: "#/components/schemas/items-search-MaxValuesPerFacet"
        caseSensitiveFacetValues:
          $ref: "#/components/schemas/items-search-CaseSensitiveFacetValues"
        includeFacets:
          $ref: "#/components/schemas/items-search-IncludeFacets"
        facetsOrderBy:
          $ref: "#/components/schemas/items-search-FacetsOrdering"
        context:
          $ref: "#/components/schemas/items-search-Context"
        displayAttributes:
          $ref: "#/components/schemas/items-search-DisplayAttributes"
        distinctFilter:
          $ref: "#/components/schemas/items-search-DistinctFilterSearch"
        ignoreQueryRules:
          $ref: "#/components/schemas/items-search-IgnoreQueryRules"
        excludeQueryRules:
          $ref: "#/components/schemas/items-search-ExcludeQueryRules"
        params:
          $ref: "#/components/schemas/items-search-Params"
    items-search-FullTextSearchRequest:
      type: object
      properties:
        query:
          $ref: "#/components/schemas/items-search-SearchQuery"
        page:
          $ref: "#/components/schemas/items-search-PaginationPage"
        limit:
          $ref: "#/components/schemas/items-search-PaginationLimit"
        sortBy:
          $ref: "#/components/schemas/items-search-PaginationSortBy"
        ordering:
          $ref: "#/components/schemas/items-search-PaginationOrdering"
        includeMeta:
          $ref: "#/components/schemas/items-search-PaginationIncludeMeta"
        clientUUID:
          $ref: "#/components/schemas/items-search-ClientUUID"
        personalize:
          $ref: "#/components/schemas/items-search-Personalize"
        correlationId:
          $ref: "#/components/schemas/items-search-CorrelationId"
        searchId:
          $ref: "#/components/schemas/items-search-SearchId"
        sortByMetric:
          $ref: "#/components/schemas/items-search-SortByMetric"
        sortByGeoPoints:
          $ref: "#/components/schemas/items-search-SortByGeoPoint"
        filterGeoPoints:
          $ref: "#/components/schemas/items-search-FilterGeoPoints"
        filterAroundRadius:
          $ref: "#/components/schemas/items-search-FilterAroundRadius"
        filters:
          $ref: "#/components/schemas/items-search-Filters"
        facets:
          $ref: "#/components/schemas/items-search-Facets"
        customFilteredFacets:
          $ref: "#/components/schemas/items-search-CustomFilteredFacets"
        facetsSize:
          $ref: "#/components/schemas/items-search-FacetsSize"
        maxValuesPerFacet:
          $ref: "#/components/schemas/items-search-MaxValuesPerFacet"
        caseSensitiveFacetValues:
          $ref: "#/components/schemas/items-search-CaseSensitiveFacetValues"
        includeFacets:
          $ref: "#/components/schemas/items-search-IncludeFacets"
        facetsOrderBy:
          $ref: "#/components/schemas/items-search-FacetsOrdering"
        context:
          $ref: "#/components/schemas/items-search-Context"
        displayAttributes:
          $ref: "#/components/schemas/items-search-DisplayAttributes"
        distinctFilter:
          $ref: "#/components/schemas/items-search-DistinctFilterSearch"
        ignoreQueryRules:
          $ref: "#/components/schemas/items-search-IgnoreQueryRules"
        excludeQueryRules:
          $ref: "#/components/schemas/items-search-ExcludeQueryRules"
        params:
          $ref: "#/components/schemas/items-search-Params"
        disableQueryClassification:
          $ref: "#/components/schemas/items-search-DisableQueryClassification"
        disableDynamicReranker:
          $ref: "#/components/schemas/items-search-DisableDynamicReranker"
      required:
        - query
    items-search-AutocompleteRequest:
      type: object
      properties:
        query:
          $ref: "#/components/schemas/items-search-SearchQuery"
        page:
          $ref: "#/components/schemas/items-search-PaginationPage"
        limit:
          $ref: "#/components/schemas/items-search-PaginationLimit"
        sortBy:
          $ref: "#/components/schemas/items-search-PaginationSortBy"
        ordering:
          $ref: "#/components/schemas/items-search-PaginationOrdering"
        includeMeta:
          $ref: "#/components/schemas/items-search-PaginationIncludeMeta"
        clientUUID:
          $ref: "#/components/schemas/items-search-ClientUUID"
        sortByMetric:
          $ref: "#/components/schemas/items-search-SortByMetric"
        sortByGeoPoints:
          $ref: "#/components/schemas/items-search-SortByGeoPoint"
        filterGeoPoints:
          $ref: "#/components/schemas/items-search-FilterGeoPoints"
        filterAroundRadius:
          $ref: "#/components/schemas/items-search-FilterAroundRadius"
        filters:
          $ref: "#/components/schemas/items-search-Filters"
        facets:
          $ref: "#/components/schemas/items-search-Facets"
        customFilteredFacets:
          $ref: "#/components/schemas/items-search-CustomFilteredFacets"
        facetsSize:
          $ref: "#/components/schemas/items-search-FacetsSize"
        maxValuesPerFacet:
          $ref: "#/components/schemas/items-search-MaxValuesPerFacet"
        caseSensitiveFacetValues:
          $ref: "#/components/schemas/items-search-CaseSensitiveFacetValues"
        includeFacets:
          $ref: "#/components/schemas/items-search-IncludeFacets"
        facetsOrderBy:
          $ref: "#/components/schemas/items-search-FacetsOrdering"
        context:
          $ref: "#/components/schemas/items-search-Context"
        displayAttributes:
          $ref: "#/components/schemas/items-search-DisplayAttributes"
        distinctFilter:
          $ref: "#/components/schemas/items-search-DistinctFilterSearch"
        ignoreQueryRules:
          $ref: "#/components/schemas/items-search-IgnoreQueryRules"
        excludeQueryRules:
          $ref: "#/components/schemas/items-search-ExcludeQueryRules"
        params:
          $ref: "#/components/schemas/items-search-Params"
        disableQueryClassification:
          $ref: "#/components/schemas/items-search-DisableQueryClassification"
        disableDynamicReranker:
          $ref: "#/components/schemas/items-search-DisableDynamicReranker"
      required:
        - query
    items-search-VisualSearchRequest:
      type: object
      properties:
        url:
          $ref: "#/components/schemas/items-search-ImageUrl"
        page:
          $ref: "#/components/schemas/items-search-PaginationPage"
        limit:
          $ref: "#/components/schemas/items-search-PaginationLimit"
        sortBy:
          $ref: "#/components/schemas/items-search-PaginationSortBy"
        ordering:
          $ref: "#/components/schemas/items-search-PaginationOrdering"
        includeMeta:
          $ref: "#/components/schemas/items-search-PaginationIncludeMeta"
        clientUUID:
          $ref: "#/components/schemas/items-search-ClientUUID"
        personalize:
          $ref: "#/components/schemas/items-search-Personalize"
        correlationId:
          $ref: "#/components/schemas/items-search-CorrelationId"
        searchId:
          $ref: "#/components/schemas/items-search-SearchId"
        sortByMetric:
          $ref: "#/components/schemas/items-search-SortByMetric"
        sortByGeoPoints:
          $ref: "#/components/schemas/items-search-SortByGeoPoint"
        filterGeoPoints:
          $ref: "#/components/schemas/items-search-FilterGeoPoints"
        filterAroundRadius:
          $ref: "#/components/schemas/items-search-FilterAroundRadius"
        filterAnchor:
          $ref: "#/components/schemas/items-search-FilterAnchor"
        filters:
          $ref: "#/components/schemas/items-search-Filters"
        facets:
          $ref: "#/components/schemas/items-search-Facets"
        customFilteredFacets:
          $ref: "#/components/schemas/items-search-CustomFilteredFacets"
        facetsSize:
          $ref: "#/components/schemas/items-search-FacetsSize"
        maxValuesPerFacet:
          $ref: "#/components/schemas/items-search-MaxValuesPerFacet"
        caseSensitiveFacetValues:
          $ref: "#/components/schemas/items-search-CaseSensitiveFacetValues"
        includeFacets:
          $ref: "#/components/schemas/items-search-IncludeFacets"
        facetsOrderBy:
          $ref: "#/components/schemas/items-search-FacetsOrdering"
        context:
          $ref: "#/components/schemas/items-search-Context"
        displayAttributes:
          $ref: "#/components/schemas/items-search-DisplayAttributes"
        ignoreQueryRules:
          $ref: "#/components/schemas/items-search-IgnoreQueryRules"
        excludeQueryRules:
          $ref: "#/components/schemas/items-search-ExcludeQueryRules"
        params:
          $ref: "#/components/schemas/items-search-Params"
      required:
        - url
    items-search-Params:
      type: object
      example:
        source: mobile
      description: Extra parameters that will be added to the `item.search` event. The total size must not exceed 500 bytes.
      additionalProperties: true
    items-search-Explanation:
      type: object
      description: Explanation for performed search.
      properties:
        rulesConsequences:
          $ref: "#/components/schemas/items-search-RulesConsequencesExplanation"
        sortDetails:
          oneOf:
            - $ref: "#/components/schemas/items-search-SortedByMetric"
            - $ref: "#/components/schemas/items-search-SortedByAttribute"
            - $ref: "#/components/schemas/items-search-SortedByGeoPoint"
          description: Applied sorting details.
        query:
          $ref: "#/components/schemas/items-search-FinalQuery"
        personalized:
          type: boolean
          description: Indicates whether the search results were personalized.
        promotedItemsCount:
          type: integer
          description: Promoted items count.
        wasFallbackMatchingUsed:
          type: boolean
          description: "`true` if fallback matching was used."
        facetSelectionExplanation:
          $ref: "#/components/schemas/items-search-FacetSelectionExplanation"
    items-search-FacetSelectionExplanation:
      type: object
      description: |
        Explanation of automatic facet selection. Only present when `facets=auto` is used on an `/explain` endpoint.
        Contains the raw coverage data from the result set that was used to select and rank facets.
        To compute coverage percentage, divide each value by the response's `total` field.
      properties:
        facetCoverage:
          type: object
          description: |
            Map of facetable attribute names to the number of results that have a value for that attribute.
            Includes all candidate facets (not just the ones that were returned in the item's data), so you can see what was considered and why some were excluded by `maxFacets`.
          additionalProperties:
            type: integer
          example:
            brand: 4800
            color: 4500
            price: 4900
            size: 3200
            material: 400
    items-search-SearchExplanationWithRerankerExplanation:
      allOf:
        - $ref: "#/components/schemas/items-search-Explanation"
        - type: object
          properties:
            reranker:
              $ref: "#/components/schemas/items-search-RerankerExplanation"
    items-search-RulesConsequencesExplanation:
      type: object
      description: Applied rules consequences.
      properties:
        query:
          $ref: "#/components/schemas/items-search-TransformedQuery"
        hiddenHits:
          type: array
          items:
            $ref: "#/components/schemas/items-search-HideHit"
        filters:
          type: array
          items:
            $ref: "#/components/schemas/items-search-ExplanationFilters"
        boostFilters:
          type: array
          items:
            $ref: "#/components/schemas/items-search-ExplanationBoostFilters"
        returnNoData:
          $ref: "#/components/schemas/items-search-ReturnNoData"
        pinFacets:
          type: array
          description: |
            Per-rule pin facet consequences contributing to the final `facetsOrdering`.
            Reflects what the rules engine emitted; the contributing rule ids are also present in `appliedRules`.
          items:
            $ref: "#/components/schemas/items-search-ExplanationPinFacet"
        hideFacets:
          type: array
          description: |
            Per-attribute hide facet consequences contributing to the final `facetsOrdering`.
            Each entry lists every rule that hid that attribute.
          items:
            $ref: "#/components/schemas/items-search-ExplanationHideFacet"
    items-search-ExplanationPinFacet:
      type: object
      description: A single pin-facet consequence emitted by a matched query rule.
      properties:
        attribute:
          type: string
          description: Name of the pinned facet attribute.
          example: size
        position:
          type: integer
          minimum: 1
          maximum: 100
          description: |
            1-based slot the rule requested. Omitted when the rule pinned the attribute without a position.
          example: 1
        ruleId:
          type: integer
          description: Id of the query rule that emitted this pin.
    items-search-ExplanationHideFacet:
      type: object
      description: A single hide-facet consequence aggregated across all rules that hid the same attribute.
      properties:
        attribute:
          type: string
          description: Name of the hidden facet attribute.
          example: material
        ruleIds:
          type: array
          description: Ids of every query rule that hid this attribute.
          items:
            type: integer
    items-search-RerankerExplanation:
      type: object
      properties:
        queryClassificationApplied:
          type: boolean
          description: "`true` if query classification was applied."
        dynamicRerankerApplied:
          type: boolean
          description: "`true` if dynamic reranker was applied."
        queryClassificationResult:
          $ref: "#/components/schemas/items-search-QueryClassificationCategories"
    items-search-TransformedQuery:
      type: object
      description: Query changes applied due to query rules.
      properties:
        originalQuery:
          type: string
          description: Query before applying query rules.
        finalQuery:
          type: string
          description: Query after applying query rules.
        modifications:
          type: array
          items:
            $ref: "#/components/schemas/items-search-QueryModification"
    items-search-QueryModification:
      type: object
      description: Describes a change in query.
      properties:
        slice:
          description: Query slice that was modified.
          allOf:
            - $ref: "#/components/schemas/items-search-QuerySlice"
        transformedSlice:
          description: Resulting query slice. Not present if the modification only removes words.
          allOf:
            - $ref: "#/components/schemas/items-search-QuerySlice"
        ruleId:
          type: integer
          description: Id of the query rule which caused this change.
    items-search-QuerySlice:
      type: object
      description: Describes a slice of query.
      properties:
        from:
          type: integer
          description: Number of the first word (zero-indexed, inclusive).
        to:
          type: integer
          description: Number of the last word (zero-indexed, inclusive).
    items-search-ExplanationFilters:
      type: object
      description: Used filter.
      properties:
        filters:
          $ref: "#/components/schemas/items-search-QueryRuleFilters"
        ruleId:
          type: integer
          description: Id of the query rule from which the filter come.
    items-search-ExplanationBoostFilters:
      type: object
      description: Used boost filter.
      properties:
        filters:
          $ref: "#/components/schemas/items-search-QueryRuleFilters"
        weight:
          type: number
          description: Weight of the filter.
        ruleId:
          type: integer
          description: Id of the query rule from which the filter come.
    items-search-QueryRuleFilters:
      type: object
      description: Filters from query rules.
      properties:
        textFilters:
          type: array
          description: Text-type filters
          items:
            type: object
            properties:
              attribute:
                type: string
                description: Attribute to be filtered
              mode:
                type: string
                description: |
                  Information whether to include or exclude filtered results.

                  - `include`: includes filtered results
                  - `exclude`: excludes filtered results
                enum:
                  - include
                  - exclude
                example: include
              values:
                type: array
                description: Values to be used during filtering.
                example:
                  - A-Brand
                  - B-Brand
                items:
                  type: string
        rangeFilters:
          type: array
          description: Range-type filters
          items:
            type: object
            properties:
              attribute:
                type: string
                description: Attribute to be filtered
                example: price
              operator:
                type: string
                description: |
                  Operator to be used during filtering.

                  - `gt`: greater than
                  - `gte`: greater or equal
                  - `lt`: less than
                  - `lte`: less than or equal
                  - `eq`/`neq`: equal/not equal
                enum:
                  - gt
                  - gte
                  - lt
                  - lte
                  - eq
                  - neq
              value:
                description: Value to use during filtering
                type: number
                example: 19.99
    items-search-ReturnNoData:
      type: object
      description: Indicates if no data consequence is activated.
      properties:
        enabled:
          type: boolean
          description: Indicates if the consequence is enabled.
        ruleIds:
          type: array
          description: Ids of the query rules which activated the consequence.
          items:
            type: integer
    items-search-HideHit:
      type: object
      properties:
        id:
          type: string
          description: Hidden item item.
        ruleIds:
          type: array
          description: Ids of query rules which caused the item to be hidden.
          items:
            type: integer
    items-search-SortedByMetric:
      type: object
      properties:
        metric:
          type: string
          description: Metric used to sort the items.
          enum:
            - TransactionsPopularity
            - PageVisitsPopularity
        ordering:
          type: string
          description: Applied ordering.
          enum:
            - asc
            - desc
    items-search-SortedByAttribute:
      type: object
      properties:
        attribute:
          type: string
          description: Name of the attribute used to sort the items.
        ordering:
          type: string
          description: Applied ordering.
          enum:
            - asc
            - desc
        ruleId:
          type: integer
          description: Id of a query rule that set the sort, if applicable.
    items-search-SortedByGeoPoint:
      type: object
      properties:
        point:
          type: string
          description: Point used to sort the items.
          example: 34.052235,-118.243685
        ordering:
          type: string
          description: Applied ordering.
          enum:
            - asc
            - desc
    items-search-FinalQuery:
      type: object
      properties:
        finalQuery:
          type: string
          description: Query that was ultimately used to perform the search.
        synonyms:
          type: array
          description: Used synonyms.
          items:
            type: object
            properties:
              word:
                type: string
                description: Phrase that the synonyms relate to.
              synonyms:
                type: array
                description: List of the synonyms.
                items:
                  type: string
    items-search-PerItemExplanation:
      type: object
      description: Explanation of the scoring of this item
      properties:
        extendedScoreFactors:
          $ref: "#/components/schemas/items-search-ExtendedScores"
        scoreFactors:
          $ref: "#/components/schemas/items-search-ScoreFactors"
        score:
          type: number
          description: Final score.
        matchedElasticFilter:
          type: boolean
          description: Indicates if the item was matched by an elastic filter.
        sortValue:
          oneOf:
            - type: string
            - type: number
          description: Value used to sort the items, if applicable.
    items-search-ScoreFactors:
      type: object
      description: Influence of historical data and behavioral analysis.
      properties:
        pageVisitsPopularity:
          type: number
          description: Normalized page views popularity.
        transactionsPopularity:
          type: number
          description: Normalized transactions popularity.
        personalization:
          type: number
          description: Normalized value of personalization coefficient, if applicable.
        pageVisitsInfluence:
          type: number
          description: Page views impact on score.
        transactionsInfluence:
          type: number
          description: Purchases impact on score.
        personalizationInfluence:
          type: number
          description: Personalization impact on score, if applicable.
    items-search-ExtendedScores:
      type: object
      description: Extended score factors. Only included if it is possible to gather them.
      properties:
        attributes:
          type: object
          description: |
            Attribute values which influenced the score.  
            This object is separated into low/medium/high importance values (corresponding to attribute importance configuration in the search index configuration).  
            For each type, `token` is the search query (may be modified by query rules, suggestions, etc.) that matched an attribute or attributes of that importance.  
          properties:
            low:
              description: Low importance attributes score.
              allOf:
                - $ref: "#/components/schemas/items-search-TokenWithScore"
            medium:
              description: Medium importance attributes score.
              allOf:
                - $ref: "#/components/schemas/items-search-TokenWithScore"
            high:
              description: High importance attributes score.
              allOf:
                - $ref: "#/components/schemas/items-search-TokenWithScore"
        boostFilters:
          type: array
          description: Matched boost filters.
          items:
            type: object
            properties:
              filters:
                $ref: "#/components/schemas/items-search-QueryRuleFilters"
              weight:
                type: number
                description: Weight of the filter.
    items-search-TokenWithScore:
      type: object
      description: Token with its corresponding score.
      properties:
        token:
          type: string
          description: Token value.
        score:
          type: number
          description: Score of the token.
    items-search-config-Error:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        status:
          type: integer
          description: Status code
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
        path:
          type: string
          description: URL of the requested resource
      required:
        - timestamp
        - status
        - message
    items-search-config-SupportedLanguages:
      type: object
      description: Supported search languages as ISO 639-1 codes
      example:
        pl: Polish
        ro: Romanian
        ru: Russian
      additionalProperties:
        type: string
        description: Human-readable label for the ISO code
    items-search-config-PaginatedSearchConfigsSchema:
      type: object
      properties:
        data:
          type: array
          description: A list of indices' configurations
          items:
            $ref: "#/components/schemas/items-search-config-SearchConfigSchema"
        meta:
          $ref: "#/components/schemas/items-search-config-PaginationMeta"
        extras:
          $ref: "#/components/schemas/items-search-config-IndicesLimitsSchema"
    items-search-config-IndicesLimitsSchema:
      type: object
      description: Search-indices limit info for the requesting business profile
      required:
        - indexLimit
        - indexLimitReached
      properties:
        indexLimit:
          type: integer
          description: Maximum number of search indices allowed for this business profile (capped by hard limit)
        indexLimitReached:
          type: boolean
          description: True if the current number of search indices is at or above indexLimit
    items-search-config-PaginationMeta:
      type: object
      description: 'Optional pagination metadata (sent if `"includeMeta": true`)'
      properties:
        totalPages:
          type: number
          description: The total number of pages
        totalCount:
          type: number
          description: The total number of campaigns
        page:
          type: number
          description: The current page
        limit:
          type: number
          description: The maximal number of items on a page
        sortedBy:
          type: string
          description: The column (attribute) that the campaigns were sorted by
        ordering:
          type: string
          description: Sorting order
        code:
          type: number
          description: HTTP response code
        link:
          type: array
          description: Links to neighboring pages, first page, and last page in pagination
          items:
            type: object
            properties:
              url:
                description: Page URL
                type: string
              rel:
                type: string
                description: Position of the linked page
                enum:
                  - first
                  - next
                  - prev
                  - last
    items-search-config-SearchConfigSchema:
      type: object
      description: Details of a single index
      properties:
        indexId:
          $ref: "#/components/schemas/items-search-config-IndexIdSchema"
        indexName:
          $ref: "#/components/schemas/items-search-config-IndexNameSchema"
        description:
          $ref: "#/components/schemas/items-search-config-IndexDescriptionSchema"
        itemsCatalogId:
          $ref: "#/components/schemas/items-search-config-ItemsCatalogIdSchema"
        language:
          $ref: "#/components/schemas/items-search-config-LanguageSchema"
        enabled:
          $ref: "#/components/schemas/items-search-config-EnabledSchema"
        ignoreUnavailableItems:
          $ref: "#/components/schemas/items-search-config-IgnoreUnavailableItemsSchema"
        scoring:
          $ref: "#/components/schemas/items-search-config-ScoringSchema"
        suggestions:
          $ref: "#/components/schemas/items-search-config-Suggestions"
        tokenizer:
          $ref: "#/components/schemas/items-search-config-Tokenizer"
        analyzers:
          $ref: "#/components/schemas/items-search-config-Analyzers"
        attributesWithoutPrefixSearch:
          $ref: "#/components/schemas/items-search-config-AttributesWithoutPrefixSearchSchema"
        attributesWithoutTypoTolerance:
          $ref: "#/components/schemas/items-search-config-AttributesWithoutTypoToleranceSchema"
        valuesWithoutTypoTolerance:
          $ref: "#/components/schemas/items-search-config-ValuesWithoutTypoToleranceSchema"
        typoToleranceOnNumericValues:
          $ref: "#/components/schemas/items-search-config-TypoToleranceOnNumericValuesSchema"
        searchableAttributes:
          $ref: "#/components/schemas/items-search-config-SearchableAttributesSchema"
        displayableAttributes:
          $ref: "#/components/schemas/items-search-config-DisplayableAttributesSchema"
        facetableAttributes:
          $ref: "#/components/schemas/items-search-config-FacetableAttributesSchema"
        filterableAttributes:
          $ref: "#/components/schemas/items-search-config-FilterableAttributesSchema"
        sortableAttributes:
          $ref: "#/components/schemas/items-search-config-SortableAttributesSchema"
        distinctFilterAttributes:
          $ref: "#/components/schemas/items-search-config-DistinctFilterAttributesSchema"
        recentSearches:
          $ref: "#/components/schemas/items-search-config-RecentSearchesConfig"
        reranking:
          $ref: "#/components/schemas/items-search-config-RerankingSchema"
        dynamicSynonyms:
          $ref: "#/components/schemas/items-search-config-DynamicSynonymsConfigurationSchema"
        dynamicFacets:
          $ref: "#/components/schemas/items-search-config-DynamicFacetsSchema"
        geoSearch:
          $ref: "#/components/schemas/items-search-config-GeoSearchSchema"
        queryRules:
          $ref: "#/components/schemas/items-search-config-QueryRulesSchema"
        updatedAt:
          $ref: "#/components/schemas/items-search-config-UpdatedAtSchema"
        createdAt:
          $ref: "#/components/schemas/items-search-config-CreatedAtSchema"
    items-search-config-IndexIdSchema:
      type: string
      description: ID of the index
    items-search-config-IndexNameSchema:
      type: string
      description: Human-friendly name of the index
    items-search-config-IndexDescriptionSchema:
      type: string
      description: Description of the index
    items-search-config-IndexStateSchema:
      type: string
      enum:
        - NotReady
        - ReadyUpToDate
        - ReadyNotUpToDate
      description: State of the index
    items-search-config-ItemsCatalogIdSchema:
      type: string
      description: ID of the item catalog from which the index will be created
    items-search-config-LanguageSchema:
      type: string
      description: Search language as ISO 639-1 code
    items-search-config-EnabledSchema:
      type: boolean
      description: When `true`, the index is enabled and can be queried.
    items-search-config-IgnoreUnavailableItemsSchema:
      type: boolean
      description: When `true`, unavailable items are not indexed, which makes the search run faster.
      default: true
    items-search-config-ScoringSchema:
      description: |
        Item scoring settings that affect the presentation order of the results.

        `0` means the lowest importance of a parameter, `1` is the highest importance.
      type: object
      properties:
        pageVisitsPopularity:
          description: The importance of how often the item page is visited
          type: number
          format: float
          default: 0
          minimum: 0
          maximum: 1
        transactionsPopularity:
          description: The importance of how often the item is included in transactions
          type: number
          format: float
          default: 0
          minimum: 0
          maximum: 1
        personalized:
          description: The importance of how relevant a item is to a profile according to the AI model
          type: number
          format: float
          default: 0
          minimum: 0
          maximum: 1
        tieBreaker:
          description: The importance of lesser phrase matches
          type: number
          format: float
          default: 0
          minimum: 0
          maximum: 1
        matching:
          $ref: "#/components/schemas/items-search-config-Matching"
        fallbackMatching:
          $ref: "#/components/schemas/items-search-config-FallbackMatching"
        similarity:
          $ref: "#/components/schemas/items-search-config-Similarity"
        crossWorkspaceMode:
          $ref: "#/components/schemas/items-search-config-CrossWorkspaceModeSchema"
    items-search-config-CrossWorkspaceModeSchema:
      description: Cross workspace mode configuration
      type: object
      required:
        - enabled
      properties:
        enabled:
          description: When `true`, cross workspace search personalization mode is enabled
          type: boolean
    items-search-config-Matching:
      description: Controls how many clauses should be present in query
      oneOf:
        - $ref: "#/components/schemas/items-search-config-MinimumMatching"
        - $ref: "#/components/schemas/items-search-config-MaximumNotMatching"
        - $ref: "#/components/schemas/items-search-config-AnyMatching"
        - $ref: "#/components/schemas/items-search-config-AllMatching"
        - $ref: "#/components/schemas/items-search-config-AdaptiveMatching"
    items-search-config-FallbackMatching:
      description: |
        Backup matching mode used in cases where the main matching mode
        (specified in `matching` parameter) does not provide enough results (at least 5)
      oneOf:
        - $ref: "#/components/schemas/items-search-config-MinimumMatching"
        - $ref: "#/components/schemas/items-search-config-MaximumNotMatching"
        - $ref: "#/components/schemas/items-search-config-AnyMatching"
        - $ref: "#/components/schemas/items-search-config-AdaptiveMatching"
    items-search-config-MinimumMatching:
      type: object
      description: Indicates number of mandatory clauses
      properties:
        type:
          type: string
          enum:
            - MinimumMatching
        value:
          type: integer
          minimum: 1
    items-search-config-MaximumNotMatching:
      type: object
      description: Indicates number of optional clauses
      properties:
        type:
          type: string
          enum:
            - MaximumNotMatching
        value:
          type: integer
          minimum: 1
    items-search-config-AnyMatching:
      type: object
      description: Any of clauses should match
      properties:
        type:
          type: string
          enum:
            - AnyMatching
    items-search-config-AllMatching:
      type: object
      description: All clauses should match
      properties:
        type:
          type: string
          enum:
            - AllMatching
    items-search-config-AdaptiveMatching:
      type: object
      description: |
        Matching that works differently depending on the number of terms in the search query.
      properties:
        type:
          type: string
          enum:
            - AdaptiveMatching
        termsToMatch:
          type: number
          format: float
          minimum: 0
          exclusiveMinimum: true
          maximum: 1
          exclusiveMaximum: true
          description: |
            Indicates the percentage of all query terms that should be matched.
            This matching is done using MinimumMatching with the value set to:
            `termsToMatch * n`, where n is a number of all terms in the search query.
            **If you define termsToMatch, you can't define termsToSubtract.**
        termsToSubtract:
          type: integer
          minimum: 1
          default: 1
          description: |
            Indicates a fixed number that should be subtracted from
            the number of query terms that should match. This matching is done using
            MinimumMatching with the value set to `n - termsToSubtract`, where n is
            a number of all terms in the search query.
            **If you define termsToSubtract, you can't define termsToMatch.**
        termsToActivate:
          type: integer
          minimum: 1
          default: 3
          description: |
            Indicates how long (number of words) a search query must be to activate this mechanism.
            All queries that are shorter than termsToActivate will use AllMatching.
    items-search-config-Similarity:
      description: Defines how matching documents are scored
      oneOf:
        - $ref: "#/components/schemas/items-search-config-BM25Similarity"
        - $ref: "#/components/schemas/items-search-config-IDFSimilarity"
    items-search-config-BM25Similarity:
      type: object
      description: Enhanced TF-IDF scoring model
      properties:
        type:
          type: string
          enum:
            - BM25
        k1:
          type: number
          description: Controls non-linear term frequency normalization (saturation)
          format: float
          default: 1.2
          minimum: 0
          maximum: 10
        b:
          type: number
          description: Controls to what degree document length normalizes tf values
          format: float
          default: 0.75
          minimum: 0
          maximum: 1
    items-search-config-IDFSimilarity:
      type: object
      description: Term frequency-inverse document frequency scoring model
      properties:
        type:
          type: string
          enum:
            - IDF
    items-search-config-Tokenizer:
      description: Used for tokenizing full text into individual words
      oneOf:
        - $ref: "#/components/schemas/items-search-config-WhitespaceTokenizer"
        - $ref: "#/components/schemas/items-search-config-StandardTokenizer"
        - $ref: "#/components/schemas/items-search-config-PatternTokenizer"
    items-search-config-WhitespaceTokenizer:
      type: object
      description: The whitespace tokenizer divides text into terms whenever it encounters any whitespace character
      properties:
        type:
          type: string
          enum:
            - Whitespace
    items-search-config-StandardTokenizer:
      type: object
      description: The standard tokenizer divides text into terms on word boundaries
      properties:
        type:
          type: string
          enum:
            - Standard
    items-search-config-PatternTokenizer:
      type: object
      description: The pattern tokenizer uses a regular expression to either split text into terms whenever it matches a word separator
      properties:
        type:
          type: string
          enum:
            - Pattern
        pattern:
          type: string
          example: "[.,;]"
    items-search-config-Analyzers:
      type: object
      description: Controls analyzer settings.
      required:
        - autocomplete
      properties:
        autocomplete:
          type: string
          description: The completion method used.
          enum:
            - Ngram
            - EdgeNgram
            - NgramWithSynonyms
            - EdgeNgramWithSynonyms
            - DefaultWithSynonyms
    items-search-config-Suggestions:
      type: object
      description: Controls manner in which suggestions are generated
      properties:
        smoothingModel:
          type: string
          description: Controls balance weight between infrequent grams and frequent grams
          enum:
            - Popularity
            - Accuracy
        gramSize:
          type: integer
          description: Describes max size of the n-grams in the field
          default: 3
          minimum: 1
          maximum: 10
        maxErrors:
          type: integer
          description: Maximum number of errors for terms to be considered as misspelling in order to for a correction
          default: 2
          minimum: 1
          maximum: 5
        minWordLength:
          type: integer
          description: The minimum length a suggest text term must have in order to be included
          default: 4
          minimum: 1
        useAlways:
          type: boolean
          description: Controls is suggestions are used only if no documents match, or always
          default: false
    items-search-config-QueryRulesSchema:
      description: Configuration for custom behavior of query rules at the index level.
      type: object
      properties:
        consequencesJoinOperators:
          type: object
          description: |
            Defines how filter consequences from multiple query rules are logically combined.
            This setting determines whether those filters are joined using the AND or OR operator.
          properties:
            standardFilters:
              type: string
              description: |
                Logical operator used to combine standard filters defined in the consequences of multiple query rules.
                If not specified, the default operator is OR.
              enum:
                - AND
                - OR
              default: OR
            elasticFilters:
              type: string
              description: |
                Logical operator used to combine elastic filters defined in the consequences of multiple query rules.
                If not specified, the default operator is OR.
              enum:
                - AND
                - OR
              default: OR
    items-search-config-SearchableAttributesSchema:
      description: |
        The attributes that are taken into account as full text search terms
      type: object
      properties:
        fullText:
          type: array
          description: The least important parameters
          example:
            - brand
            - color
            - promotion.type
          items:
            type: string
        fullTextBoosted:
          type: array
          description: Medium-importance parameters
          example:
            - brand
            - color
            - promotion.type
          items:
            type: string
        fullTextStronglyBoosted:
          type: array
          description: The most important parameters
          example:
            - brand
            - color
            - promotion.type
          items:
            type: string
    items-search-config-DisplayableAttributesSchema:
      description: Attributes shown in the search results
      example:
        - brand
        - color
        - promotion.type
      type: array
      items:
        type: string
    items-search-config-AttributesWithoutPrefixSearchSchema:
      type: array
      description: Searchable attributes which will not be used in a prefix search
      example:
        - brand
        - color
        - promotion.type
      items:
        type: string
    items-search-config-AttributesWithoutTypoToleranceSchema:
      type: array
      description: Searchable attributes for which typo tolerance is off
      example:
        - itemId
        - link
      items:
        type: string
    items-search-config-ValuesWithoutTypoToleranceSchema:
      type: array
      description: Attributes values for which typo tolerance is off
      example:
        - Nike
        - blue
        - "74997"
      items:
        type: string
    items-search-config-TypoToleranceOnNumericValuesSchema:
      type: boolean
      description: When `true`, typo tolerance is active on numbers
      default: true
    items-search-config-FacetableAttributesSchema:
      description: Attributes for which facets are returned in the search response. By default, all facetable attributes are also filterable and sortable.
      type: object
      properties:
        range:
          $ref: "#/components/schemas/items-search-config-RangeAttributesSchema"
        text:
          $ref: "#/components/schemas/items-search-config-TextAttributesSchema"
        datetime:
          $ref: "#/components/schemas/items-search-config-DatetimeAttributesSchema"
    items-search-config-FilterableAttributesSchema:
      description: Attributes for which filters can be used
      type: object
      properties:
        range:
          $ref: "#/components/schemas/items-search-config-RangeAttributesSchema"
        text:
          $ref: "#/components/schemas/items-search-config-TextAttributesSchema"
        datetime:
          $ref: "#/components/schemas/items-search-config-DatetimeAttributesSchema"
    items-search-config-SortableAttributesSchema:
      description: Attributes using which search results can be sorted
      type: object
      properties:
        range:
          $ref: "#/components/schemas/items-search-config-RangeAttributesSchema"
        text:
          $ref: "#/components/schemas/items-search-config-TextAttributesSchema"
        datetime:
          $ref: "#/components/schemas/items-search-config-DatetimeAttributesSchema"
    items-search-config-DistinctFilterAttributesSchema:
      description: Attributes for which distinct can be used
      type: object
      properties:
        range:
          $ref: "#/components/schemas/items-search-config-RangeAttributesSchema"
        text:
          $ref: "#/components/schemas/items-search-config-TextAttributesSchema"
        datetime:
          $ref: "#/components/schemas/items-search-config-DatetimeAttributesSchema"
    items-search-config-RangeAttributesSchema:
      type: array
      description: Array of range attributes
      example:
        - age
        - customScore.value
        - salePrice.value
      default: []
      items:
        type: string
    items-search-config-TextAttributesSchema:
      type: array
      description: Array of text attributes
      example:
        - brand
        - color
        - promotion.type
      default: []
      items:
        type: string
    items-search-config-DatetimeAttributesSchema:
      type: array
      description: Array of datetime attributes
      example:
        - created
        - attributes.modifiedAt
      default: []
      items:
        type: string
    items-search-config-IndexStateResponseSchema:
      type: object
      description: State of a single index
      properties:
        indexId:
          $ref: "#/components/schemas/items-search-config-IndexIdSchema"
        state:
          $ref: "#/components/schemas/items-search-config-IndexStateSchema"
        lastConfigChange:
          $ref: "#/components/schemas/items-search-config-UpdatedAtSchema"
        errorReason:
          type: string
          description: Reason why index was not rebuild successfully
        log:
          type: string
          description: Error log with additional information
    items-search-config-GetSuggestionIndicesResponseSchema:
      type: object
      properties:
        data:
          type: array
          description: An array of suggestion indices
          items:
            $ref: "#/components/schemas/items-search-config-SuggestionIndexSchema"
        meta:
          $ref: "#/components/schemas/items-search-config-PaginationMeta"
    items-search-config-SuggestionIndexSchema:
      type: object
      properties:
        indexId:
          $ref: "#/components/schemas/items-search-config-IndexIdSchema"
        indexName:
          $ref: "#/components/schemas/items-search-config-SuggestionIndexNameSchema"
        description:
          $ref: "#/components/schemas/items-search-config-SuggestionIndexDescriptionSchema"
        author:
          $ref: "#/components/schemas/items-search-config-SuggestionIndexAuthorSchema"
        enabled:
          $ref: "#/components/schemas/items-search-config-SuggestionIndexEnabledSchema"
        sources:
          $ref: "#/components/schemas/items-search-config-SuggestionIndexSourcesSchema"
        denylist:
          $ref: "#/components/schemas/items-search-config-SuggestionIndexDenylistSchema"
        updatedAt:
          $ref: "#/components/schemas/items-search-config-UpdatedAtSchema"
        createdAt:
          $ref: "#/components/schemas/items-search-config-CreatedAtSchema"
    items-search-config-SuggestionIndexNameSchema:
      type: string
      description: Name of the suggestion index
    items-search-config-SuggestionIndexDescriptionSchema:
      type: string
      description: Description of the suggestion index
    items-search-config-SuggestionIndexAuthorSchema:
      type: integer
      description: ID of the user who created the suggestion index
    items-search-config-SuggestionIndexEnabledSchema:
      type: boolean
      description: When `true`, index is enabled and can be queried.
    items-search-config-UpdatedAtSchema:
      type: string
      format: date-time
      description: Last update time in YYYY-MM-DDThh:mm:ssZ format (ISO 8601, UTC)
    items-search-config-CreatedAtSchema:
      type: string
      format: date-time
      description: Creation time in YYYY-MM-DDThh:mm:ssZ format (ISO 8601, UTC)
    items-search-config-SuggestionIndexSourcesSchema:
      type: object
      description: Sources for the suggestions
      properties:
        indices:
          $ref: "#/components/schemas/items-search-config-SuggestionIndexSourceIndicesSchema"
        external:
          $ref: "#/components/schemas/items-search-config-SuggestionIndexExternalSchema"
        generate:
          $ref: "#/components/schemas/items-search-config-SuggestionIndexGenerateSchema"
    items-search-config-SuggestionIndexSourceIndicesSchema:
      type: array
      description: A list of search indices
      items:
        type: object
        properties:
          indexId:
            $ref: "#/components/schemas/items-search-config-IndexIdSchema"
          minPopularity:
            type: integer
            description: Minimum popularity of a query to be used as a suggestion
            default: 5
          minHits:
            type: integer
            description: Minimum search hits of a query to be used as a suggestion
            default: 1
          minLetters:
            type: integer
            description: Minimum required number of letters for a suggestion to remain
            default: 2
          daysInterval:
            type: integer
            description: Suggestions will be created from search statistics from last `daysInterval` days
            default: 30
          validate:
            type: boolean
            description: When `true`, the suggestions presence in searchable attributes is verified
            default: false
        required:
          - indexId
    items-search-config-SuggestionIndexExternalSchema:
      type: array
      description: An array of external queries that can be used as suggestions
      items:
        type: object
        properties:
          query:
            type: string
            description: External query to be used as a suggestion
          count:
            type: integer
            description: Hits of the external query - used to create the weight of the suggested query.
        required:
          - query
          - count
    items-search-config-SuggestionIndexGenerateSchema:
      type: array
      description: |
        A group of attributes to use for generating suggestions.

        If the group consists of single facet, all values of the facet are used as suggestions.

        If the group consists of more than one facet, all combinations of the facets' values are used.

        **Example 1:**
        - Given the `["brand"]` group, the generated suggestions are: `["apple", "samsung", "nokia"]`

        - Given the `["color"]` group, the generated suggestions are: `["red", "blue"]`

        **Example 2:**

        Given the `["color", "brand"]` group, the generated suggestions are:<br/>
        `["red apple", "red samsung", "red nokia", "blue apple", "blue samsung", "blue nokia"]`
      items:
        type: object
        properties:
          itemsCatalogId:
            type: string
            description: Id of a catalog from which attributes will be taken
          attributes:
            type: array
            items:
              type: string
    items-search-config-SuggestionIndexDenylistSchema:
      type: array
      description: Suggestions that will be ignored and *not* shown
      items:
        type: object
        properties:
          pattern:
            type: string
            description: Pattern (text) to be used while denylisting suggestions. If the suggestion matches the pattern in a way defined by `matchingType`, it's not shown.
          matchingType:
            type: string
            description: |
              
              <span style="color:red"><strong>IMPORTANT</strong></span>: All patterns are case-**in**sensitive, including regex.

              - Using Phrase matching, the suggestion must match the whole pattern exactly.

              - Using FullWord matching, any word of the suggestion must exactly match the pattern.

              - Using PartialWord matching, any word of the suggestion must partially match the pattern.

              - Using RegularExpression matching, the pattern is treated as a regular expression and must match the suggestion.
            enum:
              - Phrase
              - FullWord
              - PartialWord
              - RegularExpression
            example: Phrase
    items-search-config-RecentSearchesConfig:
      type: object
      description: Recent searches configuration
      properties:
        windowSize:
          description: Amount of recent searches items to be returned
          type: integer
          example: 100
        timeSpan:
          type: object
          description: Defines period for which recent searches are to be returned
          properties:
            type:
              description: One of the following time units
              type: string
              enum:
                - YEARS
                - MONTHS
                - WEEKS
                - DAYS
                - HOURS
                - MINUTES
                - SECONDS
              example: DAYS
            value:
              description: Value corresponding with the time unit
              type: integer
              example: 30
    items-search-config-DynamicSynonymsConfigurationSchema:
      type: object
      description: Dynamic synonyms configuration
      required:
        - enabled
        - workflowIntervalDays
      properties:
        enabled:
          type: boolean
          description: When `true`, dynamic synonyms are enabled
        workflowIntervalDays:
          type: integer
          description: Interval in days between synonym workflow runs
          minimum: 7
          maximum: 31
          example: 14
        coldStart:
          type: boolean
          description: Enables cold start mode for dynamic synonyms. Once enabled, it cannot be disabled. When enabled for the first time, a cold-start-agent resource is created with NOT READY state.
          default: false
          example: false
        autoAcceptThreshold:
          type: number
          format: float
          description: Threshold for automatic synonym acceptance. Must be in [0, 1] range.
          minimum: 0
          maximum: 1
          example: 0.8
    items-search-config-DynamicFacetsSchema:
      type: object
      description: Dynamic facets configuration
      required:
        - enabled
        - maxFacets
      properties:
        enabled:
          type: boolean
          description: When `true`, dynamic facets are enabled.
        maxFacets:
          type: integer
          description: Maximum number of dynamic facets to return. Must be non-negative.
          minimum: 0
          example: 10
        minCoverageThreshold:
          type: number
          format: float
          description: |
            Minimum coverage threshold for a facet to be included. Must be in [0, 1] range. 
            Coverage is `M/N`, where:
            - `M` is the number of occurrences of a facet in the search results.
            - `N` is the total number of results.
            Higher coverage values mean that a facet is more relevant.
          minimum: 0
          maximum: 1
          example: 0.1
    items-search-config-RerankingSchema:
      type: object
      description: Reranking configuration
      properties:
        dynamicReranker:
          $ref: "#/components/schemas/items-search-config-DynamicRerankerSchema"
        queryClassification:
          $ref: "#/components/schemas/items-search-config-QueryClassificationSchema"
    items-search-config-GeoSearchSchema:
      type: object
      description: Geo search configuration
      properties:
        geoSearchableAttribute:
          type: string
          description: |
            Attribute that contains the geolocation of the product.
            The attribute's value must be one of the following types:
            - JSON object with `lat` and `lon` properties
            - JSON array of objects containing `lat` and `lon` properties
            - JSON string of format `latitude,longitude`
            - JSON array of strings of format `latitude,longitude`
    items-search-config-DynamicRerankerSchema:
      type: object
      description: Dynamic reranker configuration
      required:
        - enabled
        - numberOfItems
      properties:
        enabled:
          type: boolean
          description: When `true`, the dynamic reranker is enabled
        filter:
          type: string
          description: Only items that meet this filter will be considered by the reranker
        numberOfItems:
          type: integer
          description: Number of items that can be reranked in search results
          minimum: 1
          maximum: 50
        minNumberOfEvents:
          type: integer
          description: If present, items with fewer events than this value will be filtered out from reranking.
    items-search-config-QueryClassificationSchema:
      type: object
      description: Query classification configuration
      properties:
        enabled:
          type: boolean
          description: When `true`, the query classification is enabled.
        actions:
          type: array
          description: Search result actions with a minimum reliability level
          items:
            type: object
            properties:
              action:
                $ref: "#/components/schemas/items-search-config-SearchResultAction"
              minReliabilityLevel:
                $ref: "#/components/schemas/items-search-config-ReliabilityLevel"
        excludedPhrases:
          type: array
          description: Phrases that will be excluded from query classification
          items:
            type: string
        excludedCategories:
          type: array
          description: Categories that will be excluded from query classification
          items:
            type: string
    items-search-config-SearchResultAction:
      type: string
      description: |
        The action to perform when the reliability level from `minReliabilityLevel` is reached.
        - `staticFilter` will apply a static filter to limit the search results to the predicted category.
        - `elasticFilter` will apply an elastic filter - if there are not enough results from the predicted category, the AI engine will pick items from other categories to meet the minimum number of results.
        - `boosting` will increase the scores of items from the predicted category.

        If reliability levels are met for multiple actions, the priority is:
        1. static filter
        2. elastic filter
        3. boosting
      enum:
        - staticFilter
        - elasticFilter
        - boosting
    items-search-config-ReliabilityLevel:
      type: string
      description: |
        For each type of action, you can specify the minimum level required to trigger that action. A reliability level indicates how confident we are that a given prediction is the best choice.
      enum:
        - certain
        - veryHigh
        - high
        - medium
        - low
    items-search-recent-Error:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        status:
          type: integer
          description: Status code
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
        path:
          type: string
          description: URL of the requested resource
      required:
        - timestamp
        - status
        - message
    items-search-recent-DeletedSearch:
      type: object
      properties:
        query:
          type: string
          description: Deleted search query. Required if `match` field is set to `query`.
        match:
          type: string
          description: |
            Tells how to match this deleted search on recent searches.

            - `query`: matches only recent searches with provided query
            - `all`: matches all recent searches
          default: query
        timestamp:
          type: string
          format: date-time
          description: Time when the search was deleted. If not present current time is taken.
    metrics-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
    metrics-AvailableMetrics:
      type: array
      items:
        type: object
        properties:
          id:
            type: string
            description: Metric identifier
          description:
            type: string
            description: Metric description
    metrics-AvailableMetricsIds:
      type: array
      items:
        type: string
    morph-RunId:
      type: string
      format: uuid
      description: "`journeyId` of the last Automation run"
    morph-StartTime:
      description: Time when the journey started
      type: string
      format: date-time
      example: 2023-09-05T14:07:44.264Z
    morph-JobStatus:
      type: string
      description: High-level status of the job. If a given type of job doesn't exist in a workflow (for example, `transformData` in a workflow without any Data Transformation nodes), the status is `Pending`.
      enum:
        - Pending
        - InProgress
        - Finished
        - Failed
        - Warning
      example: Pending
    morph-HttpErrorDetails:
      type: object
      required:
        - error
        - status
      properties:
        error:
          type: string
          description: Summary of the error
        status:
          type: integer
          format: int32
          description: Status code
        timestamp:
          type: string
          description: Time when the error occurred
        message:
          type: string
          description: Description of the problem. If an error code is included, check the [API Error Reference](https://developers.synerise.com/errors.html) for details.
    morph-LogsForStage:
      type: object
      required:
        - status
        - logs
        - logsSize
      properties:
        status:
          $ref: "#/components/schemas/morph-JobStatus"
        runDate:
          type: string
          description: Time when this job started
          example: 2022-01-31T12:37:25.109Z
        logs:
          type: array
          description: An array of log lines
          items:
            type: string
            example: 2022-01-31T12:37:25.109412Z INFO Job finished with success!
        logsSize:
          type: number
          description: The number of returned log lines
        failedRecordsFileId:
          type: string
          format: uuid
          description: UUID of the input file that couldn't be processed
        successCount:
          type: integer
          description: Number of rows successfully processed by the job
        failureCount:
          type: integer
          description: Number of rows that failed during processing by the job
    morph-AutomationLogsResponse:
      description: Logs for each stage in the workflow
      type: object
      properties:
        importData:
          description: Logs for pulling data into the workflow
          allOf:
            - $ref: "#/components/schemas/morph-LogsForStage"
        transformData:
          description: Logs for Data Transformation processing
          allOf:
            - $ref: "#/components/schemas/morph-LogsForStage"
        exportData:
          description: Logs for pushing data from the workflow
          allOf:
            - $ref: "#/components/schemas/morph-LogsForStage"
    morph-DtDiagramLastRunResponse:
      type: object
      required:
        - startTime
        - pipelineResponse
        - overallRunStatus
      properties:
        startTime:
          $ref: "#/components/schemas/morph-StartTime"
        runId:
          $ref: "#/components/schemas/morph-RunId"
        pipelineResponse:
          $ref: "#/components/schemas/morph-AutomationLogsResponse"
        overallRunStatus:
          $ref: "#/components/schemas/morph-JobStatus"
    morph-NewProfileExport:
      type: object
      required:
        - name
        - fields
        - agreementFilter
        - segmentationHash
        - excludedIds
      properties:
        name:
          type: string
          description: Name of the export, visible at [https://app.synerise.com/assets/](https://app.synerise.com/assets/exports)
        fields:
          type: array
          example:
            - id
            - attr1
            - attr2
          minItems: 1
          items:
            type: string
          description: |
            Profile attributes to export.

            **The first attribute in this array MUST BE `id`**
        agreementFilter:
          type: string
          enum:
            - NONE
            - EMAIL
            - WEB_PUSH
            - PUSH
            - SMS
            - RECOGNIZED
            - ANONYMOUS
          description: You can filter the profiles by their marketing agreement. `NONE` means no filter.
        segmentationHash:
          type: string
          format: uuid
          description: UUID of the segmentation which defines the profiles to export. The segmentation conditions are checked at the time of sending the "create and run export" request.
        tags:
          type: array
          description: Profile tags to check for an exported profile. In the results, the tag name is the key and the value is "true" (string) if the tag is assigned to a given profile, otherwise it's "false".
          items:
            type: string
        expressions:
          type: array
          description: UUIDs of expressions to check for an exported profile. In the results, the name of the expression is the key and the value is the result of the expression.
          items:
            type: string
            format: uuid
        aggregates:
          type: array
          description: UUIDs of aggregates to check for an exported profile. In the results, the name of the aggregate is the key and the value is the result of the aggregate.
          items:
            type: string
            format: uuid
        segmentations:
          type: array
          description: UUIDs of segmentations to check for an exported profile. In the results, the name of the segmentation is the key and the value is "true" (string) if the profile belongs to the segmentation, otherwise it's "false".
          items:
            type: string
            format: uuid
        excludedIds:
          type: array
          minItems: 0
          items:
            type: number
          description: List of clientIds to exclude from the exported data
    morph-ExportResponse:
      type: object
      required:
        - taskId
        - columnOrder
        - estimatedCount
      properties:
        taskId:
          type: string
          format: uuid
          description: ID of the submitted task. Save this ID to be able to retrieve the data.
        columnOrder:
          type: array
          description: Fields included in the export
          items:
            type: string
            description: Name of an exported attribute/tag/analysis
        estimatedCount:
          type: number
          description: Estimated number of profiles in the exported segment
    notes-service-NoteRequest:
      type: object
      description: The content of the note
      properties:
        subject:
          type: string
          description: The title of the note
          example: Note 1
        body:
          type: string
          description: Text of the note
          example: <h1>NOTE 1</h1>\n<p>Some text</p>\n<ul>\n<li>1</li>\n<li>2</li>\n<li>3</li>\n</ul>\n<blockquote>Lorem ipsum in quote</blockquote>\n<p><strong>Lorem ipsum in bold</strong></p>\n
    notes-service-NoteResponse:
      type: object
      description: The content and metadata of the note
      properties:
        body:
          type: string
          description: Text of the note
          example: <h1>NOTE 1</h1>\n<p>Some text</p>\n<ul>\n<li>1</li>\n<li>2</li>\n<li>3</li>\n</ul>\n<blockquote>Lorem ipsum in quote</blockquote>\n<p><strong>Lorem ipsum in bold</strong></p>\n
        created:
          type: string
          format: date-time
          description: Creation time
          example: 2019-08-01T08:03:31.556Z
        createdBy:
          type: string
          description: ID of the Synerise User who created the note
          example: example@example.com
        id:
          type: string
          description: UUID of the note
          example: 69b0e925-086a-4964-b8dc-4c9e58213cf5
        subject:
          type: string
          description: The title of the note
          example: Note 1
        updated:
          type: string
          format: date-time
          description: Last update time
          example: 2019-08-01T08:03:38.556Z
        updatedBy:
          type: string
          description: ID of the last user who updated the note
          example: example@example.com
        userId:
          type: integer
          format: int64
          description: Numerical ID of the last user who updated the note
          example: 11405
    optimizer-manager-ErrorV2:
      type: object
      properties:
        error:
          type: string
          description: Description of the error
        errorCode:
          type: string
          description: Synerise error code. See [Error Code Reference](https://developers.synerise.com/errors.html).
        help:
          type: string
          description: Link to the error reference page for this error
        httpStatus:
          type: integer
          description: HTTP code of the error
        message:
          type: string
          description: Description of the error
        path:
          type: string
          description: Path of the resource which returned the error
        requestId:
          type: string
          description: Unique request ID
        status:
          type: integer
          description: Internal code for troubleshooting
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        traceId:
          type: string
          description: Trace ID for troubleshooting
    optimizer-manager-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
    optimizer-manager-VariantsAllocationMethod:
      type: string
      enum:
        - Manual
      description: The variant allocation method. Currently, only `Manual` is available.
    optimizer-manager-ExperimentStatus:
      type: string
      enum:
        - NotStarted
        - Running
        - Paused
        - Finished
      description: Current status of the experiment. A finished experiment cannot be started again.
    optimizer-manager-ExperimentCreateOrUpdateRequestV2:
      type: object
      properties:
        name:
          $ref: "#/components/schemas/optimizer-manager-ExperimentName"
        description:
          $ref: "#/components/schemas/optimizer-manager-ExperimentDescription"
        experimentKind:
          $ref: "#/components/schemas/optimizer-manager-ExperimentKind"
        variantsAllocationMethod:
          $ref: "#/components/schemas/optimizer-manager-VariantsAllocationMethod"
        variants:
          type: array
          description: An array of experiment variants
          items:
            $ref: "#/components/schemas/optimizer-manager-ExperimentVariantCreateOrUpdateV2"
      required:
        - name
        - experimentKind
        - variantsAllocationMethod
        - variants
    optimizer-manager-ExperimentV2Seq:
      type: array
      items:
        $ref: "#/components/schemas/optimizer-manager-ExperimentDetailsResponseV2"
    optimizer-manager-ExperimentDetailsResponseV2:
      type: object
      properties:
        experimentId:
          $ref: "#/components/schemas/optimizer-manager-ExperimentId"
        name:
          $ref: "#/components/schemas/optimizer-manager-ExperimentName"
        author:
          $ref: "#/components/schemas/optimizer-manager-ExperimentAuthor"
        description:
          $ref: "#/components/schemas/optimizer-manager-ExperimentDescription"
        experimentKind:
          $ref: "#/components/schemas/optimizer-manager-ExperimentKind"
        variantsAllocationMethod:
          $ref: "#/components/schemas/optimizer-manager-VariantsAllocationMethod"
        status:
          $ref: "#/components/schemas/optimizer-manager-ExperimentStatus"
        startedAt:
          $ref: "#/components/schemas/optimizer-manager-ExperimentStartedAt"
        stoppedAt:
          $ref: "#/components/schemas/optimizer-manager-ExperimentStoppedAt"
        createdAt:
          $ref: "#/components/schemas/optimizer-manager-CreatedAt"
        updatedAt:
          $ref: "#/components/schemas/optimizer-manager-UpdatedAt"
        variants:
          type: array
          description: An array of variants
          items:
            $ref: "#/components/schemas/optimizer-manager-VariantV2"
      required:
        - experimentId
        - name
        - experimentKind
        - variantsAllocationMethod
        - status
        - createdAt
        - variants
        - goals
    optimizer-manager-ExperimentVariantCreateOrUpdateV2:
      type: object
      properties:
        externalId:
          $ref: "#/components/schemas/optimizer-manager-ExternalId"
        name:
          $ref: "#/components/schemas/optimizer-manager-VariantName"
        weight:
          $ref: "#/components/schemas/optimizer-manager-VariantWeight"
        metadata:
          $ref: "#/components/schemas/optimizer-manager-VariantMetadata"
        isBaseline:
          $ref: "#/components/schemas/optimizer-manager-VariantIsBaseline"
      required:
        - externalId
        - weight
    optimizer-manager-VariantName:
      type: string
      description: Variant name
    optimizer-manager-ExternalId:
      type: string
      description: |
        Identifier of the resource to request with this variant.

        - For recommendations, this is the recommendation campaign ID.
        - For items/suggestion search, this is the search/suggestion index ID.
    optimizer-manager-VariantWeight:
      type: integer
      maximum: 10000
      description: |
        Importance of the variant. Higher value means higher importance.  
        The total weight of all variants must be <= 10000.
    optimizer-manager-VariantMetadata:
      type: string
      description: Additional data
    optimizer-manager-VariantIsBaseline:
      type: boolean
      description: "`true` if this is the baseline variant. When making a search/recommendation request, you will use the ID of the baseline index/recommendation and then the system will return a result from one of the variants."
    optimizer-manager-VariantId:
      type: integer
      description: ID of the variant
    optimizer-manager-VariantV2:
      type: object
      properties:
        variantId:
          $ref: "#/components/schemas/optimizer-manager-VariantId"
        externalId:
          $ref: "#/components/schemas/optimizer-manager-ExternalId"
        name:
          $ref: "#/components/schemas/optimizer-manager-VariantName"
        weight:
          $ref: "#/components/schemas/optimizer-manager-VariantWeight"
        metadata:
          $ref: "#/components/schemas/optimizer-manager-VariantMetadata"
        isBaseline:
          $ref: "#/components/schemas/optimizer-manager-VariantIsBaseline"
      required:
        - variantId
        - externalId
        - weight
    optimizer-manager-ExperimentId:
      type: integer
      description: ID of the experiment
    optimizer-manager-ExperimentName:
      type: string
      description: Experiment name
    optimizer-manager-ExperimentAuthor:
      type: integer
      description: Author of the experiment
    optimizer-manager-ExperimentDescription:
      type: string
      description: Experiment description
    optimizer-manager-ExperimentKind:
      type: string
      description: The type of the experiment
      enum:
        - ITEMS_SEARCH
        - RECOMMENDATION_CAMPAIGN
    optimizer-manager-ExperimentStartedAt:
      type: string
      format: date-time
      description: Time when the experiment was started
    optimizer-manager-ExperimentStoppedAt:
      type: string
      format: date-time
      description: Time when the experiment was stopped
    optimizer-manager-CreatedAt:
      type: string
      format: date-time
      description: Creation time
    optimizer-manager-UpdatedAt:
      type: string
      format: date-time
      description: Last update time
    promotions-SuccessfulBatchDeleteData:
      title: Delete
      type: array
      minLength: 0
      description: Promotions correctly added to queue for deletion.
      items:
        type: object
        properties:
          code:
            $ref: "#/components/schemas/promotions-promotionCode"
    promotions-SuccessfulBatchImportData:
      title: Import
      type: array
      minLength: 0
      description: Promotions with correct data, queued for import. If `discountMode` wasn't included in the request, it's set to `STATIC`. Other properties are only included if they were added to the request.
      items:
        $ref: "#/components/schemas/promotions-promotionImportData"
    promotions-PromotionImportBatchRequest:
      type: object
      required:
        - data
      properties:
        data:
          type: array
          items:
            $ref: "#/components/schemas/promotions-promotionImportData"
          minItems: 1
          maxItems: 1000
          description: Array of promotion objects to import (upsert)
        extra:
          type: object
          description: Import metadata
          nullable: true
          properties:
            importHash:
              type: string
              description: Import identifier for troubleshooting
              maxLength: 255
              nullable: true
    promotions-PromotionDeleteItem:
      type: object
      description: Item accepted by the batch delete endpoint. The promotion is identified by its code.
      required:
        - code
      properties:
        code:
          $ref: "#/components/schemas/promotions-promotionCode"
    promotions-PromotionDeleteBatchRequest:
      type: object
      required:
        - data
      properties:
        data:
          type: array
          items:
            $ref: "#/components/schemas/promotions-PromotionDeleteItem"
          minItems: 1
          maxItems: 1000
          description: Array of objects with promotion code to delete
        extra:
          type: object
          nullable: true
          description: Additional metadata
          properties:
            importHash:
              type: string
              description: Import identifier for troubleshooting
              maxLength: 255
              nullable: true
    promotions-PromotionImportBatchDeleteAcceptedResponse:
      type: object
      properties:
        data:
          type: array
          description: Array of promotions queued for deletion
          items:
            type: object
            properties:
              code:
                $ref: "#/components/schemas/promotions-promotionCode"
    promotions-PromotionImportBatchAcceptedResponse:
      type: object
      properties:
        data:
          $ref: "#/components/schemas/promotions-SuccessfulBatchImportData"
    promotions-PromotionImportBatchPartialErrorResponse:
      type: object
      properties:
        httpStatus:
          $ref: "#/components/schemas/promotions-ErrorV2HttpStatus"
        errorCode:
          $ref: "#/components/schemas/promotions-ErrorV2Code"
        message:
          $ref: "#/components/schemas/promotions-ErrorV2Message"
        help:
          type: string
          nullable: true
          description: Currently unused
        data:
          anyOf:
            - $ref: "#/components/schemas/promotions-SuccessfulBatchDeleteData"
            - $ref: "#/components/schemas/promotions-SuccessfulBatchImportData"
        errors:
          type: array
          description: Per-item failures. The position in the original `data[]` array is reported via `source.index`.
          items:
            type: object
            properties:
              source:
                type: object
                description: Information about the property that caused the problem
                properties:
                  index:
                    type: integer
                    description: Zero-based index of the failing item in the request `data[]` array.
              errorCode:
                $ref: "#/components/schemas/promotions-ErrorV2Code"
              message:
                $ref: "#/components/schemas/promotions-ErrorV2Message"
              help:
                type: string
                nullable: true
                description: Currently unused
              httpStatus:
                $ref: "#/components/schemas/promotions-ErrorV2HttpStatus"
              errors:
                type: array
                nullable: true
                description: "Per-field validation failures for this item. Present when the failure is a Joi body validation error (`errorCode: ERR-042`). Joi runs with `abortEarly: false`, so a single item may report multiple field violations."
                items:
                  type: object
                  properties:
                    source:
                      type: object
                      properties:
                        pointer:
                          type: string
                          description: JSON Pointer (RFC 6901) into the failing item, e.g. `/code`, `/discountModeDetails/discountSteps/0/usageThreshold`.
                    errorCode:
                      $ref: "#/components/schemas/promotions-ErrorV2Code"
                    message:
                      type: string
                      description: Original Joi message for the field.
                    help:
                      type: string
                      nullable: true
                      description: Currently unused
                    httpStatus:
                      $ref: "#/components/schemas/promotions-ErrorV2HttpStatus"
    promotions-promotionUuid:
      type: string
      description: Unique UUIDv4.
    promotions-promotionCode:
      type: string
      maxLength: 64
      description: Unique code
    promotions-promotionVisibility:
      type: string
      description: Profile-oriented status of the promotion.
      enum:
        - DRAFT
        - PUBLISH
        - HIDDEN
      default: DRAFT
    promotions-promotionType:
      type: string
      description: Promotion type
      enum:
        - MEMBERS_ONLY
        - HANDBILL
        - CUSTOM
        - GENERAL
      default: GENERAL
    promotions-promotionRedeemLimitPerClient:
      type: integer
      description: Limit how many times a Profile can redeem this promotion.
      default: 0
      minimum: 0
      maximum: 32767
      nullable: true
    promotions-promotionRedeemQuantity:
      type: integer
      nullable: true
      description: How many times per activation a multibuy promotion can be redeemed
      minimum: 0
      maximum: 8388607
    promotions-promotionRedeemLimitGlobal:
      type: integer
      deprecated: true
      format: int32
      description: Limit the total of redemptions by all Profiles
      default: 0
      minimum: 0
      maximum: 2147483647
      nullable: true
    promotions-activationLimitGlobalType:
      type: string
      nullable: true
      default: LIFETIME
      description: |-
        Promotion activation limit type
        * `LIFETIME` – No additional configuration required. The limit applies to the entire lifespan of the promotion. * `RELATIVE` – Requires specifying a relative time window (number of minutes from the current time).
      enum:
        - RELATIVE
        - LIFETIME
    promotions-activationLimitGlobalLimit:
      type: integer
      format: int32
      description: Limit the total of activations by all Profiles within given time unit.
      minimum: 1
      maximum: 2147483647
      nullable: true
    promotions-activationLimitGlobalCounter:
      type: integer
      format: int32
      description: Counter of the total of activations by all Profiles within given time unit.
      nullable: true
    promotions-activationLimitGlobalRelativeMinutes:
      type: integer
      format: int32
      nullable: true
      default: null
      minimum: 1
      maximum: 527040
      description: Used only when `type` is `RELATIVE`. Defines how many minutes back from the current time the limit applies.
    promotions-activationLimitGlobalReached:
      type: boolean
      nullable: true
      default: null
      description: Indicator to inform that limit is reached.
    promotions-promotionRedeemType:
      type: string
      description: Promotion redemption type
      enum:
        - FULL
        - PARTIAL
    promotions-promotionAutoRedeem:
      type: boolean
      nullable: true
      description: If true, the promotion is automatically redeemed on activation.
    promotions-promotionCatalogItemsDetails:
      type: object
      description: Catalog items definition details
      required:
        - catalog
        - catalogItemType
      nullable: true
      properties:
        catalog:
          $ref: "#/components/schemas/promotions-promotionCatalog"
        catalogItemType:
          $ref: "#/components/schemas/promotions-promotionCatalogItemType"
        catalogIndexItems:
          $ref: "#/components/schemas/promotions-promotionCatalogIndexItems"
        catalogFilterIds:
          $ref: "#/components/schemas/promotions-promotionCatalogFilterIds"
    promotions-promotionDetails:
      type: object
      description: Promotion details
      nullable: true
      properties:
        discountType:
          $ref: "#/components/schemas/promotions-promotionDiscountTypeDetails"
        cashbackSettings:
          $ref: "#/components/schemas/promotions-cashbackSettings"
    promotions-promotionDiscountTypeDetailsOuterScope:
      type: boolean
      description: |
        This defines whether a defined promotion trigger for discount is based on different item scope.
        When set to
          * `false` it means items are from the same scope,
          * `true` it means items are from outer scope and `requiredItems` should be defined.
      default: false
      example: true
    promotions-promotionDiscountTypeDetailsName:
      type: string
      enum:
        - BOGO
      default: BOGO
    promotions-promotionDiscountTypeDetailsRequiredItemsCount:
      description: Number of items that should be purchased to meet the promotion condition.
      type: integer
      format: int32
      example: 2
    promotions-promotionDiscountTypeDetailsDiscountedItemsCount:
      description: Number of items to apply the discount to.
      type: integer
      format: int32
      example: 1
    promotions-promotionDiscountTypeDetails:
      type: object
      description: Details that apply for specific discount type.
      required:
        - name
        - outerScope
        - requiredItemsCount
        - discountedItemsCount
      properties:
        name:
          $ref: "#/components/schemas/promotions-promotionDiscountTypeDetailsName"
        outerScope:
          $ref: "#/components/schemas/promotions-promotionDiscountTypeDetailsOuterScope"
        requiredItemsCount:
          $ref: "#/components/schemas/promotions-promotionDiscountTypeDetailsRequiredItemsCount"
        requiredItems:
          $ref: "#/components/schemas/promotions-promotionCatalogItemsDetails"
        discountedItemsCount:
          $ref: "#/components/schemas/promotions-promotionDiscountTypeDetailsDiscountedItemsCount"
    promotions-promotionDiscountTypeDetailsShort:
      type: object
      description: Details that apply for specific discount type
      required:
        - name
        - outerScope
        - requiredItemsCount
        - discountedItemsCount
      properties:
        name:
          $ref: "#/components/schemas/promotions-promotionDiscountTypeDetailsName"
        outerScope:
          $ref: "#/components/schemas/promotions-promotionDiscountTypeDetailsOuterScope"
        requiredItemsCount:
          $ref: "#/components/schemas/promotions-promotionDiscountTypeDetailsRequiredItemsCount"
        discountedItemsCount:
          $ref: "#/components/schemas/promotions-promotionDiscountTypeDetailsDiscountedItemsCount"
    promotions-promotionDetailsShort:
      type: object
      description: Promotion details
      required:
        - discountType
      nullable: true
      properties:
        discountType:
          $ref: "#/components/schemas/promotions-promotionDiscountTypeDetailsShort"
    promotions-promotionDiscountType:
      type: string
      description: The type of discount
      enum:
        - PERCENT
        - POINTS
        - AMOUNT
        - NONE
        - MULTIBUY
        - 2_FOR_1
        - EXACT_PRICE
        - DIGITAL_CASHBACK
      default: NONE
    promotions-promotionDiscountValue:
      type: number
      description: How much discount to apply
      default: 0
      minimum: 0
      maximum: 100
    promotions-promotionDiscountMode:
      type: string
      description: Promotion discount mode
      enum:
        - STATIC
        - STEP
      default: STATIC
    promotions-promotionDiscountModeDetails:
      type: object
      properties:
        discountSteps:
          type: array
          nullable: false
          items:
            required:
              - discountValue
              - usageThreshold
            type: object
            properties:
              discountValue:
                description: Discount value in given step
                type: number
              usageThreshold:
                description: Threshold after current step would apply
                type: number
        discountUsageTrigger:
          type: string
          enum:
            - TRANSACTION
            - REDEEM
          nullable: false
          description: Describe after what action new steps would be applied
      nullable: true
      description: 'Applies only when `"discountMode": "STATIC"`.'
    promotions-promotionPreDiscountValue:
      type: number
      minimum: 0
      nullable: true
      default: 0
      description: In single-item promotions, this is the price of the item before the discount. This is in regular units of currency. For example, if the currency is USD and `preDiscountValue` is set to 1.2, the price before discount is 1 dollar and 20 cents.
    promotions-promotionRequirePoints:
      type: number
      nullable: true
      format: int32
      description: How many loyalty points are needed to activate the promotion
    promotions-promotionHeaderName:
      type: string
      maxLength: 255
      description: Name displayed in Synerise Web UI
    promotions-promotionHeaderDescription:
      type: string
      maxLength: 255
      description: Description displayed in Synerise Web UI
      nullable: true
    promotions-promotionName:
      type: string
      maxLength: 255
      description: Promotion name displayed to viewers
    promotions-promotionHeadline:
      type: string
      nullable: true
      description: Promotion headline displayed to viewers
    promotions-promotionDescription:
      type: string
      maxLength: 2048
      nullable: true
      description: Details of the promotion displayed to viewers
    promotions-promotionImages:
      type: array
      nullable: true
      items:
        required:
          - url
          - type
        type: object
        properties:
          url:
            description: Image or thumbnail source
            type: string
            example: https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png
          type:
            type: string
            enum:
              - image
              - thumbnail
      description: Images and thumbnails for the promotion
    promotions-promotionTags:
      description: |
        An array of tags.

        **IMPORTANT:** To be able to use a tag for promotions, you must first assign the tag to a directory with `"type":"promotion"`. If the directory type does not exist, create it using [this endpoint](https://developers.synerise.com/AssetManagement/AssetManagement.html#operation/createDirectoryType). Then create a directory of that type and assign tags to it.
      type: array
      items:
        type: object
        properties:
          hash:
            type: string
            description: Hash ID of the tag
            example: 6f54671d-157f-4c4e-a577-11fac3111293
      nullable: true
    promotions-promotionStartAt:
      type: string
      nullable: true
      format: date-time
      description: Time when the promotion becomes available. Defaults to current time.
    promotions-promotionExpireAt:
      type: string
      nullable: true
      format: date-time
      description: Time when the promotion ends for all profiles. Defaults to current time. Has to be greater than startAt
    promotions-promotionDisplayFrom:
      type: string
      nullable: true
      description: Time when the promotion becomes displayable. Defaults to null.
    promotions-promotionDisplayTo:
      type: string
      nullable: true
      description: Time when the promotion stops being displayed for users. Defaults to null. Has to be greater than displayFrom.
    promotions-promotionLastingTime:
      type: integer
      format: int32
      nullable: true
      description: Duration of the promotion in seconds. This countdown starts when the profile activates a promotion and is individual for each profile.
      default: 0
    promotions-promotionParams:
      type: object
      description: A JSON object with any custom parameters of type string, object, array.
      nullable: true
      additionalProperties: true
    promotions-promotionItemScope:
      type: string
      description: |-
        The scope of of the promotion.
        * LINE_ITEM is a promotion used for certain items in the basket
        * BASKET is a promotion that applies to the entire basket
      enum:
        - LINE_ITEM
        - BASKET
      default: LINE_ITEM
    promotions-promotionMinBasket:
      type: number
      nullable: true
      default: null
      minimum: 0
      description: |
        Minimal basket value required to trigger the application of the promotion. This is the basket value after calculating other promotions that apply to the items in the basket. 

        `minBasketValue` must be lower than `maxBasketValue`.
    promotions-promotionMaxBasket:
      type: number
      nullable: true
      default: null
      minimum: 0
      description: |
        
        The maximum basket value to apply the promotion to. Any amount above the maximum is not discounted. This is the basket value after calculating other promotions that apply to the items in the basket.

        `maxBasketValue` must be greater than `minBasketValue`

        **Example:**<br/>
        The maximum basket value is set to 500 USD. The discount is 10%. A basket's total is 700 USD. The discount is 50 USD.
    promotions-voucherCode:
      type: string
      description: Voucher code
      example: 6f54671d-157f-4c4e-a577-11fac3111293
    promotions-voucherStatus:
      type: string
      description: Status of the voucher
      example: ASSIGNED
      enum:
        - ASSIGNED
        - REDEEMED
        - CANCELED
    promotions-voucherAutoGenerated:
      type: boolean
      example: false
      description: "`true` if the voucher was generated by an algorithm"
    promotions-voucherLastingAt:
      type: string
      nullable: true
      example: 2026-01-01
      format: date-time
      description: Time when the voucher expires.
    promotions-voucherRedeemedAt:
      type: string
      nullable: true
      example: null
      format: date-time
      description: Time when the voucher was redeemed.
    promotions-voucherAssignedAt:
      type: string
      nullable: true
      example: 2025-01-01
      format: date-time
      description: Time when the voucher was assigned.
    promotions-Voucher:
      type: object
      required:
        - code
        - status
        - autoGenerated
        - lastingAt
        - redeemedAt
        - assignedAt
      properties:
        code:
          $ref: "#/components/schemas/promotions-voucherCode"
        status:
          $ref: "#/components/schemas/promotions-voucherStatus"
        autoGenerated:
          $ref: "#/components/schemas/promotions-voucherAutoGenerated"
        lastingAt:
          $ref: "#/components/schemas/promotions-voucherLastingAt"
        redeemedAt:
          $ref: "#/components/schemas/promotions-voucherRedeemedAt"
        assignedAt:
          $ref: "#/components/schemas/promotions-voucherAssignedAt"
    promotions-VoucherList:
      type: array
      description: Vouchers redeemed succesfully
      items:
        $ref: "#/components/schemas/promotions-Voucher"
    promotions-promotionCatalog:
      type: string
      description: ID of the item catalog that the promotion applies to
      nullable: true
      example: "221"
    promotions-promotionCatalogItemType:
      type: string
      enum:
        - ALL
        - SELECTED
        - FILTERED
      description: |
        
        - If set to "ALL", define the catalog in the `catalog` field and set `catalogIndexItems` to null.

        - If set to "SELECTED", define the catalog in the `catalog` field and provide a list of catalog items in `catalogIndexItems`.

        - If set to "FILTERED", define the catalog in the `catalog` field and provide a list of catalog filter ids in `catalogFilterIds`.
      default: ALL
      example: FILTERED
    promotions-promotionCatalogIndexItems:
      type: array
      items:
        type: string
      description: |
        
        'An array of items from the catalog to be included in the promotion if `catalogItemType` is set to `SELECTED`.


        If `catalogItemType` is set to `ALL`, set `catalogIndexItems` to null.'
      nullable: true
      example: []
    promotions-promotionCatalogFilterIds:
      type: array
      items:
        type: string
      description: |
        
        'An array of catalog filter IDs to be executed to fetch catalog items if `catalogItemType` is set to `FILTERED`.


        If `catalogItemType` is set to `ALL`, set `catalogFilterIds` to null.'
      nullable: true
      example:
        - f978b20f-7156-40ed-99c2-3af62b76af12
    promotions-promotionExcludeCatalog:
      type: string
      description: ID of the item catalog that the promotion should exclude
      nullable: true
      example:
        - "311"
    promotions-promotionExcludeCatalogItemType:
      type: string
      enum:
        - ALL
        - SELECTED
        - FILTERED
      description: |
        
        - If set to "ALL", define the catalog in the `excludeCatalog` field and set `excludeCatalogIndexItems` to null.

        - If set to "SELECTED", define the catalog in the `excludeCatalog` field and provide a list of catalog items in `excludeCatalogIndexItems`.

        - If set to "FILTERED", define the catalog in the `excludeCatalog` field and provide a list of catalog filter ids in `excludeCatalogFilterIds`.
      default: ALL
      example: SELECTED
    promotions-promotionExcludeCatalogIndexItems:
      type: array
      items:
        type: string
      description: |
        
        'An array of items from the catalog to be excluded in the promotion if `excludeCatalogItemType` is set to `SELECTED`.


        If `excludeCatalogItemType` is set to `ALL`, set `excludeCatalogIndexItems` to null.'
      nullable: true
      example:
        - "29727276"
    promotions-promotionExcludeCatalogFilterIds:
      type: array
      items:
        type: string
      description: |
        
        'An array of catalog filter IDs to be executed to fetch catalog items to exclude if `excludeCatalogItemType` is set to `FILTERED`.


        If `excludeCatalogItemType` is set to `ALL`, set `excludeCatalogFilterIds` to null.'
      nullable: true
      example: []
    promotions-promotionStoreCatalog:
      type: string
      description: ID of the store catalog that the promotion applies to
      nullable: true
    promotions-promotionStoreItemType:
      type: string
      enum:
        - ALL
        - SELECTED
      description: Defines if the promotion is available for the entire store catalog or only certain stores (listed in `storeIds`).
      default: ALL
    promotions-promotionStoreIds:
      type: array
      items:
        type: string
      description: An array of stores from the store catalog where the promotion is available if `storeItemType` is set to `SELECTED`
      nullable: true
    promotions-promotionTargetType:
      type: string
      description: If this field is set to "SEGMENT", you must provide a list of segments in `targetSegment`.
      default: ALL
      enum:
        - ALL
        - SEGMENT
    promotions-promotionTargetSegment:
      type: array
      nullable: true
      description: This field applies only when `targetType` is set to "SEGMENT".
      items:
        type: string
        description: ID of the segmentation of profiles that can redeem this promotion
    promotions-promotionPrice:
      description: In single-item promotions, this is the price of the item in the smallest unit of currency. For example, if the currency is USD and `price` is 120, the price is 1 dollar and 20 cents.
      type: integer
      default: 0
      minimum: 0
      maximum: 2147483647
    promotions-promotionPriority:
      description: Defines the priority of the promotion for display. `1` is the highest priority.
      type: integer
      minimum: 1
      maximum: 500
      default: 250
    promotions-promotionMetric:
      nullable: true
      type: string
      maxLength: 64
      description: Currently unused
    promotions-assignmentStatus:
      type: string
      description: Profile-oriented status of the promotion.
      enum:
        - ASSIGNED
        - ACTIVE
        - REDEEMED
    promotions-assignmentCurrentRedeemedQuantity:
      type: integer
      description: Current redeem quantity for the Profile.
    promotions-assignmentCurrentRedeemedLimit:
      type: integer
      description: Current redeem limit for the Profile.
    promotions-assignmentActivationCounter:
      type: integer
      description: Number of promotion activation
    promotions-assignmentPossibleRedeems:
      type: integer
      description: Number of available redeems left
    promotions-assignmentAssignedAt:
      type: string
      nullable: true
      format: date-time
      description: Time when promotion becomes active for the Profile.
    promotions-assignmentLastingAt:
      type: string
      nullable: true
      format: date-time
      description: Time when promotion becomes expire for the Profile.
    promotions-promotionDataDelete:
      type: object
      required:
        - value
      properties:
        value:
          type: string
          description: Code of the promotion to delete
    promotions-promotionDataCreateOrUpdate:
      type: object
      properties:
        uuid:
          $ref: "#/components/schemas/promotions-promotionUuid"
        code:
          $ref: "#/components/schemas/promotions-promotionCode"
        visibilityStatus:
          $ref: "#/components/schemas/promotions-promotionVisibility"
        type:
          $ref: "#/components/schemas/promotions-promotionType"
        redeemLimitPerClient:
          $ref: "#/components/schemas/promotions-promotionRedeemLimitPerClient"
        redeemQuantityPerActivation:
          $ref: "#/components/schemas/promotions-promotionRedeemQuantity"
        redeemLimitGlobal:
          $ref: "#/components/schemas/promotions-promotionRedeemLimitGlobal"
        redeemType:
          $ref: "#/components/schemas/promotions-promotionRedeemType"
        discountType:
          $ref: "#/components/schemas/promotions-promotionDiscountType"
        details:
          $ref: "#/components/schemas/promotions-promotionDetails"
        discountValue:
          $ref: "#/components/schemas/promotions-promotionDiscountValue"
        discountMode:
          $ref: "#/components/schemas/promotions-promotionDiscountMode"
        discountModeDetails:
          $ref: "#/components/schemas/promotions-promotionDiscountModeDetails"
        preDiscountValue:
          $ref: "#/components/schemas/promotions-promotionPreDiscountValue"
        requireRedeemedPoints:
          $ref: "#/components/schemas/promotions-promotionRequirePoints"
        headerName:
          $ref: "#/components/schemas/promotions-promotionHeaderName"
        headerDescription:
          $ref: "#/components/schemas/promotions-promotionHeaderDescription"
        name:
          $ref: "#/components/schemas/promotions-promotionName"
        headline:
          $ref: "#/components/schemas/promotions-promotionHeadline"
        description:
          $ref: "#/components/schemas/promotions-promotionDescription"
        images:
          $ref: "#/components/schemas/promotions-promotionImages"
        tags:
          $ref: "#/components/schemas/promotions-promotionTags"
        startAt:
          $ref: "#/components/schemas/promotions-promotionStartAt"
        expireAt:
          $ref: "#/components/schemas/promotions-promotionExpireAt"
        displayFrom:
          $ref: "#/components/schemas/promotions-promotionDisplayFrom"
        displayTo:
          $ref: "#/components/schemas/promotions-promotionDisplayTo"
        lastingTime:
          $ref: "#/components/schemas/promotions-promotionLastingTime"
        params:
          $ref: "#/components/schemas/promotions-promotionParams"
        itemScope:
          $ref: "#/components/schemas/promotions-promotionItemScope"
        minBasketValue:
          $ref: "#/components/schemas/promotions-promotionMinBasket"
        maxBasketValue:
          $ref: "#/components/schemas/promotions-promotionMaxBasket"
        catalog:
          $ref: "#/components/schemas/promotions-promotionCatalog"
        catalogItemType:
          $ref: "#/components/schemas/promotions-promotionCatalogItemType"
        catalogIndexItems:
          $ref: "#/components/schemas/promotions-promotionCatalogIndexItems"
        catalogFilterIds:
          $ref: "#/components/schemas/promotions-promotionCatalogFilterIds"
        excludeCatalog:
          $ref: "#/components/schemas/promotions-promotionExcludeCatalog"
        excludeCatalogItemType:
          $ref: "#/components/schemas/promotions-promotionExcludeCatalogItemType"
        excludeCatalogIndexItems:
          $ref: "#/components/schemas/promotions-promotionExcludeCatalogIndexItems"
        excludeCatalogFilterIds:
          $ref: "#/components/schemas/promotions-promotionExcludeCatalogFilterIds"
        storeCatalog:
          $ref: "#/components/schemas/promotions-promotionStoreCatalog"
        storeItemType:
          $ref: "#/components/schemas/promotions-promotionStoreItemType"
        storeIds:
          $ref: "#/components/schemas/promotions-promotionStoreIds"
        targetType:
          $ref: "#/components/schemas/promotions-promotionTargetType"
        targetSegment:
          $ref: "#/components/schemas/promotions-promotionTargetSegment"
        price:
          $ref: "#/components/schemas/promotions-promotionPrice"
        priority:
          $ref: "#/components/schemas/promotions-promotionPriority"
        voucherPool:
          $ref: "#/components/schemas/promotions-VoucherPool"
        importHash:
          $ref: "#/components/schemas/promotions-promotionImportHash"
    promotions-promotionImportHeadline:
      type: string
      nullable: true
      maxLength: 255
      description: Promotion headline displayed to viewers (import limit — 255 chars).
    promotions-promotionImportCatalog:
      type: string
      nullable: true
      maxLength: 255
      description: ID of the item catalog targeted by the promotion (import limit — 255 chars).
    promotions-promotionImportExcludeCatalog:
      type: string
      nullable: true
      maxLength: 255
      description: ID of the item catalog excluded from the promotion (import limit — 255 chars).
    promotions-promotionImportStoreCatalog:
      type: string
      nullable: true
      minLength: 1
      maxLength: 255
      description: ID of the store catalog that the promotion applies to (import limit — 255 chars).
    promotions-promotionImportCatalogIndexItems:
      type: array
      items:
        type: string
      nullable: true
      maxItems: 50
      description: Catalog items included in the promotion (import limit — 50 entries).
    promotions-promotionImportCatalogFilterIds:
      type: array
      items:
        type: string
      nullable: true
      maxItems: 5
      description: Catalog filter IDs for FILTERED targeting (import limit — 5 entries).
    promotions-promotionImportExcludeCatalogIndexItems:
      type: array
      items:
        type: string
      nullable: true
      maxItems: 50
      description: Catalog items excluded from the promotion (import limit — 50 entries).
    promotions-promotionImportExcludeCatalogFilterIds:
      type: array
      items:
        type: string
      nullable: true
      maxItems: 5
      description: Catalog filter IDs for FILTERED exclusion (import limit — 5 entries).
    promotions-promotionImportDiscountModeDetails:
      type: object
      nullable: true
      description: Step discount configuration (import limit — up to 5 steps).
      required:
        - discountUsageTrigger
      properties:
        steps:
          type: array
          maxItems: 5
          items:
            required:
              - discountValue
              - usageThreshold
            type: object
            properties:
              discountValue:
                type: number
                description: Discount value in given step.
              usageThreshold:
                type: number
                description: Threshold after current step would apply.
        discountUsageTrigger:
          type: string
          enum:
            - TRANSACTION
            - REDEEM
          description: Describe after what action new steps would be applied.
    promotions-promotionImportTags:
      description: |
        An array of tags (import limit — 20 entries).

        **IMPORTANT:** To be able to use a tag for promotions, you must first assign the tag to a directory with `"type":"promotion"`. If the directory type does not exist, create it using [this endpoint](https://developers.synerise.com/AssetManagement/AssetManagement.html#operation/createDirectoryType). Then create a directory of that type and assign tags to it.
      type: array
      maxItems: 20
      items:
        type: object
        properties:
          hash:
            type: string
            description: Hash ID of the tag
            example: 6f54671d-157f-4c4e-a577-11fac3111293
      nullable: true
    promotions-promotionImportStoreIds:
      type: array
      maxItems: 500
      items:
        type: string
      description: An array of stores from the store catalog where the promotion is available if `storeItemType` is set to `SELECTED` (import limit — 500 entries).
      nullable: true
    promotions-promotionImportTargetSegment:
      type: array
      maxItems: 10
      nullable: true
      description: This field applies only when `targetType` is set to "SEGMENT" (import limit — 10 entries).
      items:
        type: string
        description: ID of the segmentation of profiles that can redeem this promotion
    promotions-promotionImportImages:
      type: array
      maxItems: 8
      nullable: true
      items:
        required:
          - url
          - type
        type: object
        properties:
          url:
            description: Image or thumbnail source
            type: string
            example: https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png
          type:
            type: string
            enum:
              - image
              - thumbnail
      description: Images and thumbnails for the promotion (import limit — 8 entries).
    promotions-promotionImportParams:
      type: object
      description: |
        A JSON object with any custom parameters of type string, object, array.

        Import limit — serialized JSON must not exceed 128 KB (131072 bytes).
      nullable: true
      additionalProperties: true
    promotions-promotionImportDetails:
      type: object
      description: |
        Promotion details.

        Import limit — serialized JSON must not exceed 128 KB (131072 bytes).
      nullable: true
      properties:
        discountType:
          $ref: "#/components/schemas/promotions-promotionDiscountTypeDetails"
        cashbackSettings:
          $ref: "#/components/schemas/promotions-cashbackSettings"
    promotions-promotionImportData:
      type: object
      description: Promotion payload accepted by the batch import endpoint. Applies SPD-2026-03 limits.
      anyOf:
        - required:
            - uuid
        - required:
            - code
      properties:
        uuid:
          $ref: "#/components/schemas/promotions-promotionUuid"
        code:
          $ref: "#/components/schemas/promotions-promotionCode"
        visibilityStatus:
          $ref: "#/components/schemas/promotions-promotionVisibility"
        type:
          $ref: "#/components/schemas/promotions-promotionType"
        redeemLimitPerClient:
          $ref: "#/components/schemas/promotions-promotionRedeemLimitPerClient"
        redeemQuantityPerActivation:
          $ref: "#/components/schemas/promotions-promotionRedeemQuantity"
        redeemLimitGlobal:
          $ref: "#/components/schemas/promotions-promotionRedeemLimitGlobal"
        redeemType:
          $ref: "#/components/schemas/promotions-promotionRedeemType"
        autoRedeem:
          $ref: "#/components/schemas/promotions-promotionAutoRedeem"
        activationLimitGlobalType:
          $ref: "#/components/schemas/promotions-activationLimitGlobalType"
        activationLimitGlobalLimit:
          $ref: "#/components/schemas/promotions-activationLimitGlobalLimit"
        activationLimitGlobalRelativeMinutes:
          $ref: "#/components/schemas/promotions-activationLimitGlobalRelativeMinutes"
        discountType:
          $ref: "#/components/schemas/promotions-promotionDiscountType"
        details:
          $ref: "#/components/schemas/promotions-promotionImportDetails"
        discountValue:
          $ref: "#/components/schemas/promotions-promotionDiscountValue"
        discountMode:
          $ref: "#/components/schemas/promotions-promotionDiscountMode"
        discountModeDetails:
          $ref: "#/components/schemas/promotions-promotionImportDiscountModeDetails"
        preDiscountValue:
          $ref: "#/components/schemas/promotions-promotionPreDiscountValue"
        requireRedeemedPoints:
          $ref: "#/components/schemas/promotions-promotionRequirePoints"
        headerName:
          $ref: "#/components/schemas/promotions-promotionHeaderName"
        headerDescription:
          $ref: "#/components/schemas/promotions-promotionHeaderDescription"
        name:
          $ref: "#/components/schemas/promotions-promotionName"
        headline:
          $ref: "#/components/schemas/promotions-promotionImportHeadline"
        description:
          $ref: "#/components/schemas/promotions-promotionDescription"
        images:
          $ref: "#/components/schemas/promotions-promotionImportImages"
        tags:
          $ref: "#/components/schemas/promotions-promotionImportTags"
        metric:
          $ref: "#/components/schemas/promotions-promotionMetric"
        startAt:
          $ref: "#/components/schemas/promotions-promotionStartAt"
        expireAt:
          $ref: "#/components/schemas/promotions-promotionExpireAt"
        displayFrom:
          $ref: "#/components/schemas/promotions-promotionDisplayFrom"
        displayTo:
          $ref: "#/components/schemas/promotions-promotionDisplayTo"
        lastingTime:
          $ref: "#/components/schemas/promotions-promotionLastingTime"
        params:
          $ref: "#/components/schemas/promotions-promotionImportParams"
        itemScope:
          $ref: "#/components/schemas/promotions-promotionItemScope"
        minBasketValue:
          $ref: "#/components/schemas/promotions-promotionMinBasket"
        maxBasketValue:
          $ref: "#/components/schemas/promotions-promotionMaxBasket"
        catalog:
          $ref: "#/components/schemas/promotions-promotionImportCatalog"
        catalogItemType:
          $ref: "#/components/schemas/promotions-promotionCatalogItemType"
        catalogIndexItems:
          $ref: "#/components/schemas/promotions-promotionImportCatalogIndexItems"
        catalogFilterIds:
          $ref: "#/components/schemas/promotions-promotionImportCatalogFilterIds"
        excludeCatalog:
          $ref: "#/components/schemas/promotions-promotionImportExcludeCatalog"
        excludeCatalogItemType:
          $ref: "#/components/schemas/promotions-promotionExcludeCatalogItemType"
        excludeCatalogIndexItems:
          $ref: "#/components/schemas/promotions-promotionImportExcludeCatalogIndexItems"
        excludeCatalogFilterIds:
          $ref: "#/components/schemas/promotions-promotionImportExcludeCatalogFilterIds"
        storeCatalog:
          $ref: "#/components/schemas/promotions-promotionImportStoreCatalog"
        storeItemType:
          $ref: "#/components/schemas/promotions-promotionStoreItemType"
        storeIds:
          $ref: "#/components/schemas/promotions-promotionImportStoreIds"
        targetType:
          $ref: "#/components/schemas/promotions-promotionTargetType"
        targetSegment:
          $ref: "#/components/schemas/promotions-promotionImportTargetSegment"
        price:
          $ref: "#/components/schemas/promotions-promotionPrice"
        priority:
          $ref: "#/components/schemas/promotions-promotionPriority"
        voucherPool:
          $ref: "#/components/schemas/promotions-VoucherPool"
    promotions-promotionDataCreate:
      type: object
      description: Details of a promotion
      properties:
        visibilityStatus:
          $ref: "#/components/schemas/promotions-promotionVisibility"
        type:
          $ref: "#/components/schemas/promotions-promotionType"
        redeemLimitPerClient:
          $ref: "#/components/schemas/promotions-promotionRedeemLimitPerClient"
        redeemQuantityPerActivation:
          $ref: "#/components/schemas/promotions-promotionRedeemQuantity"
        redeemLimitGlobal:
          $ref: "#/components/schemas/promotions-promotionRedeemLimitGlobal"
        redeemType:
          $ref: "#/components/schemas/promotions-promotionRedeemType"
        details:
          $ref: "#/components/schemas/promotions-promotionDetails"
        discountType:
          $ref: "#/components/schemas/promotions-promotionDiscountType"
        discountValue:
          $ref: "#/components/schemas/promotions-promotionDiscountValue"
        discountMode:
          $ref: "#/components/schemas/promotions-promotionDiscountMode"
        discountModeDetails:
          $ref: "#/components/schemas/promotions-promotionDiscountModeDetails"
        preDiscountValue:
          $ref: "#/components/schemas/promotions-promotionPreDiscountValue"
        requireRedeemedPoints:
          $ref: "#/components/schemas/promotions-promotionRequirePoints"
        headerName:
          $ref: "#/components/schemas/promotions-promotionHeaderName"
        headerDescription:
          $ref: "#/components/schemas/promotions-promotionHeaderDescription"
        name:
          $ref: "#/components/schemas/promotions-promotionName"
        headline:
          $ref: "#/components/schemas/promotions-promotionHeadline"
        description:
          $ref: "#/components/schemas/promotions-promotionDescription"
        images:
          $ref: "#/components/schemas/promotions-promotionImages"
        tags:
          $ref: "#/components/schemas/promotions-promotionTags"
        startAt:
          $ref: "#/components/schemas/promotions-promotionStartAt"
        expireAt:
          $ref: "#/components/schemas/promotions-promotionExpireAt"
        displayFrom:
          $ref: "#/components/schemas/promotions-promotionDisplayFrom"
        displayTo:
          $ref: "#/components/schemas/promotions-promotionDisplayTo"
        lastingTime:
          $ref: "#/components/schemas/promotions-promotionLastingTime"
        params:
          $ref: "#/components/schemas/promotions-promotionParams"
        itemScope:
          $ref: "#/components/schemas/promotions-promotionItemScope"
        minBasketValue:
          $ref: "#/components/schemas/promotions-promotionMinBasket"
        maxBasketValue:
          $ref: "#/components/schemas/promotions-promotionMaxBasket"
        catalog:
          $ref: "#/components/schemas/promotions-promotionCatalog"
        catalogItemType:
          $ref: "#/components/schemas/promotions-promotionCatalogItemType"
        catalogIndexItems:
          $ref: "#/components/schemas/promotions-promotionCatalogIndexItems"
        catalogFilterIds:
          $ref: "#/components/schemas/promotions-promotionCatalogFilterIds"
        excludeCatalog:
          $ref: "#/components/schemas/promotions-promotionExcludeCatalog"
        excludeCatalogItemType:
          $ref: "#/components/schemas/promotions-promotionExcludeCatalogItemType"
        excludeCatalogIndexItems:
          $ref: "#/components/schemas/promotions-promotionExcludeCatalogIndexItems"
        excludeCatalogFilterIds:
          $ref: "#/components/schemas/promotions-promotionExcludeCatalogFilterIds"
        activationLimitGlobalType:
          $ref: "#/components/schemas/promotions-activationLimitGlobalType"
        activationLimitGlobalLimit:
          $ref: "#/components/schemas/promotions-activationLimitGlobalLimit"
        activationLimitGlobalRelativeMinutes:
          $ref: "#/components/schemas/promotions-activationLimitGlobalRelativeMinutes"
        storeCatalog:
          $ref: "#/components/schemas/promotions-promotionStoreCatalog"
        storeItemType:
          $ref: "#/components/schemas/promotions-promotionStoreItemType"
        storeIds:
          $ref: "#/components/schemas/promotions-promotionStoreIds"
        targetType:
          $ref: "#/components/schemas/promotions-promotionTargetType"
        targetSegment:
          $ref: "#/components/schemas/promotions-promotionTargetSegment"
        price:
          $ref: "#/components/schemas/promotions-promotionPrice"
        priority:
          $ref: "#/components/schemas/promotions-promotionPriority"
        voucherPool:
          $ref: "#/components/schemas/promotions-VoucherPool"
        importHash:
          $ref: "#/components/schemas/promotions-promotionImportHash"
    promotions-promotionDataResponse:
      type: object
      description: Details of the promotion
      properties:
        uuid:
          $ref: "#/components/schemas/promotions-promotionUuid"
        code:
          $ref: "#/components/schemas/promotions-promotionCode"
        status:
          $ref: "#/components/schemas/promotions-promotionVisibility"
        type:
          $ref: "#/components/schemas/promotions-promotionType"
        redeemLimitPerClient:
          $ref: "#/components/schemas/promotions-promotionRedeemLimitPerClient"
        redeemQuantityPerActivation:
          $ref: "#/components/schemas/promotions-promotionRedeemQuantity"
        redeemLimitGlobal:
          $ref: "#/components/schemas/promotions-promotionRedeemLimitGlobal"
        activationLimitGlobalType:
          $ref: "#/components/schemas/promotions-activationLimitGlobalType"
        activationLimitGlobalLimit:
          $ref: "#/components/schemas/promotions-activationLimitGlobalLimit"
        activationLimitGlobalCounter:
          $ref: "#/components/schemas/promotions-activationLimitGlobalCounter"
        activationLimitGlobalRelativeMinutes:
          $ref: "#/components/schemas/promotions-activationLimitGlobalRelativeMinutes"
        activationLimitGlobalReached:
          $ref: "#/components/schemas/promotions-activationLimitGlobalReached"
        redeemType:
          $ref: "#/components/schemas/promotions-promotionRedeemType"
        discountType:
          $ref: "#/components/schemas/promotions-promotionDiscountType"
        details:
          $ref: "#/components/schemas/promotions-promotionDetails"
        discountValue:
          $ref: "#/components/schemas/promotions-promotionDiscountValue"
        discountMode:
          $ref: "#/components/schemas/promotions-promotionDiscountMode"
        discountModeDetails:
          $ref: "#/components/schemas/promotions-promotionDiscountModeDetails"
        preDiscountValue:
          $ref: "#/components/schemas/promotions-promotionPreDiscountValue"
        requireRedeemedPoints:
          $ref: "#/components/schemas/promotions-promotionRequirePoints"
        headerName:
          $ref: "#/components/schemas/promotions-promotionHeaderName"
        headerDescription:
          $ref: "#/components/schemas/promotions-promotionHeaderDescription"
        name:
          $ref: "#/components/schemas/promotions-promotionName"
        headline:
          $ref: "#/components/schemas/promotions-promotionHeadline"
        description:
          $ref: "#/components/schemas/promotions-promotionDescription"
        images:
          $ref: "#/components/schemas/promotions-promotionImages"
        tags:
          $ref: "#/components/schemas/promotions-promotionTags"
        createdAt:
          $ref: "#/components/schemas/promotions-objectCreatedAt"
        startAt:
          $ref: "#/components/schemas/promotions-promotionStartAt"
        expireAt:
          $ref: "#/components/schemas/promotions-promotionExpireAt"
        displayFrom:
          $ref: "#/components/schemas/promotions-promotionDisplayFrom"
        displayTo:
          $ref: "#/components/schemas/promotions-promotionDisplayTo"
        lastingTime:
          $ref: "#/components/schemas/promotions-promotionLastingTime"
        params:
          $ref: "#/components/schemas/promotions-promotionParams"
        itemScope:
          $ref: "#/components/schemas/promotions-promotionItemScope"
        minBasketValue:
          $ref: "#/components/schemas/promotions-promotionMinBasket"
        maxBasketValue:
          $ref: "#/components/schemas/promotions-promotionMaxBasket"
        catalog:
          $ref: "#/components/schemas/promotions-promotionCatalog"
        catalogItemType:
          $ref: "#/components/schemas/promotions-promotionCatalogItemType"
        catalogIndexItems:
          $ref: "#/components/schemas/promotions-promotionCatalogIndexItems"
        catalogFilterIds:
          $ref: "#/components/schemas/promotions-promotionCatalogFilterIds"
        storeCatalog:
          $ref: "#/components/schemas/promotions-promotionStoreCatalog"
        storeItemType:
          $ref: "#/components/schemas/promotions-promotionStoreItemType"
        storeIds:
          $ref: "#/components/schemas/promotions-promotionStoreIds"
        targetType:
          $ref: "#/components/schemas/promotions-promotionTargetType"
        targetSegment:
          $ref: "#/components/schemas/promotions-promotionTargetSegment"
        price:
          $ref: "#/components/schemas/promotions-promotionPrice"
        priority:
          $ref: "#/components/schemas/promotions-promotionPriority"
        metric:
          $ref: "#/components/schemas/promotions-promotionMetric"
        importHash:
          $ref: "#/components/schemas/promotions-promotionImportHash"
    promotions-promotionClientPossibleToRedeemResponse:
      type: object
      properties:
        code:
          $ref: "#/components/schemas/promotions-promotionCode"
        possibleRedeems:
          $ref: "#/components/schemas/promotions-assignmentPossibleRedeems"
        lastingAt:
          $ref: "#/components/schemas/promotions-assignmentLastingAt"
    promotions-promotionClientDataResponse:
      type: object
      description: Details of a promotion
      properties:
        uuid:
          $ref: "#/components/schemas/promotions-promotionUuid"
        code:
          $ref: "#/components/schemas/promotions-promotionCode"
        status:
          $ref: "#/components/schemas/promotions-assignmentStatus"
        type:
          $ref: "#/components/schemas/promotions-promotionType"
        redeemLimitPerClient:
          $ref: "#/components/schemas/promotions-promotionRedeemLimitPerClient"
        redeemQuantityPerActivation:
          $ref: "#/components/schemas/promotions-promotionRedeemQuantity"
        currentRedeemedQuantity:
          $ref: "#/components/schemas/promotions-assignmentCurrentRedeemedQuantity"
        currentRedeemedLimit:
          $ref: "#/components/schemas/promotions-assignmentCurrentRedeemedLimit"
        activationCounter:
          $ref: "#/components/schemas/promotions-assignmentActivationCounter"
        possibleRedeems:
          $ref: "#/components/schemas/promotions-assignmentPossibleRedeems"
        details:
          $ref: "#/components/schemas/promotions-promotionDetailsShort"
        discountType:
          $ref: "#/components/schemas/promotions-promotionDiscountType"
        discountValue:
          $ref: "#/components/schemas/promotions-promotionDiscountValue"
        discountMode:
          $ref: "#/components/schemas/promotions-promotionDiscountMode"
        discountModeDetails:
          $ref: "#/components/schemas/promotions-promotionDiscountModeDetails"
        requireRedeemedPoints:
          $ref: "#/components/schemas/promotions-promotionRequirePoints"
        name:
          $ref: "#/components/schemas/promotions-promotionName"
        headline:
          $ref: "#/components/schemas/promotions-promotionHeadline"
        description:
          $ref: "#/components/schemas/promotions-promotionDescription"
        images:
          $ref: "#/components/schemas/promotions-promotionImages"
        tags:
          $ref: "#/components/schemas/promotions-promotionTags"
        startAt:
          $ref: "#/components/schemas/promotions-promotionStartAt"
        expireAt:
          $ref: "#/components/schemas/promotions-promotionExpireAt"
        displayFrom:
          $ref: "#/components/schemas/promotions-promotionDisplayFrom"
        displayTo:
          $ref: "#/components/schemas/promotions-promotionDisplayTo"
        assignedAt:
          $ref: "#/components/schemas/promotions-assignmentAssignedAt"
        lastingTime:
          $ref: "#/components/schemas/promotions-promotionLastingTime"
        lastingAt:
          $ref: "#/components/schemas/promotions-assignmentLastingAt"
        params:
          $ref: "#/components/schemas/promotions-promotionParams"
        catalogIndexItems:
          $ref: "#/components/schemas/promotions-promotionCatalogIndexItems"
        price:
          $ref: "#/components/schemas/promotions-promotionPrice"
        priority:
          $ref: "#/components/schemas/promotions-promotionPriority"
        itemScope:
          $ref: "#/components/schemas/promotions-promotionItemScope"
        minBasketValue:
          $ref: "#/components/schemas/promotions-promotionMinBasket"
        maxBasketValue:
          $ref: "#/components/schemas/promotions-promotionMaxBasket"
        vouchers:
          $ref: "#/components/schemas/promotions-VoucherList"
    promotions-saleSettings:
      type: object
      nullable: true
      description: Settings for sales
      properties:
        discountSourceType:
          $ref: "#/components/schemas/promotions-discountSourceType"
        clientIdCardType:
          $ref: "#/components/schemas/promotions-clientIdCardType"
        handbillCheckout:
          $ref: "#/components/schemas/promotions-handbillCheckout"
        priceValueBaseStrategy:
          $ref: "#/components/schemas/promotions-priceValueBaseStrategy"
        combineBasketDiscounts:
          $ref: "#/components/schemas/promotions-combineBasketDiscounts"
        discountOrder:
          $ref: "#/components/schemas/promotions-discountOrder"
        returnFields:
          $ref: "#/components/schemas/promotions-returnFields"
    promotions-lockSettings:
      type: object
      nullable: true
      description: Settings for locks
      required:
        - lockPromotionRequestByIdentifier
      properties:
        promotionRequestedLockTtl:
          $ref: "#/components/schemas/promotions-promotionRequestedLockTtl"
        processSalePromotionActivationLockWaitTime:
          $ref: "#/components/schemas/promotions-processSalePromotionActivationLockWaitTime"
        lockPromotionRequestByIdentifier:
          $ref: "#/components/schemas/promotions-lockPromotionRequestByIdentifier"
    promotions-promotionLastingOnly:
      description: When set to `true`, filters to promotions that are currently active and those that were not yet activated.
      type: boolean
      nullable: true
      default: true
    promotions-restorePointsOnProfileDeactivation:
      type: boolean
      description: When set to `true` and you use the method which [deactivates all promotions for a profile](#operation/deactivateAllPromotions), the points taken for activation of the promotion will be restored.
      nullable: true
      default: true
    promotions-allowRedeemCompletionWhenBlocked:
      type: boolean
      description: When set to `true`, the profile can complete the redemption of promotions that had been activated before a lock was put on that profile.
      nullable: true
      default: false
    promotions-promotionRequestedLockTtl:
      type: number
      description: The time in seconds for which promotion deactivation will be blocked after a POS request.
      nullable: true
      default: null
    promotions-processSalePromotionActivationLockWaitTime:
      type: number
      description: The time in seconds that the system will wait and retry to acquire a promotion activation lock during the process sale operation.
      nullable: true
      default: null
    promotions-lockPromotionRequestByIdentifier:
      type: boolean
      description: Indicates if POS should provide the `lockIdentifier`, which puts a lock on promotion fetching the promotion list. This identifier can be sent when using the [Get Profile promotions by a custom filter](#operation/GetClientPromotionsByACustomFilter) endpoint.
      nullable: false
    promotions-promotionPresentOnly:
      description: When set to `false`, expired promotions are included in the response.
      type: boolean
      nullable: true
      default: true
    promotions-promotionDisplayableOnly:
      description: When set to `true`, filters to promotions that are currently configured to be displayed (by `displayFrom` and `displayTo` dates).
      type: boolean
      nullable: true
      default: true
    promotions-promotionCheckExistsInTarget:
      nullable: true
      type: boolean
      default: true
      description: When set to `true`, the profile must exist within the target segmentation.
    promotions-promotionStatusArray:
      type: array
      description: Promotion filter by assignment status
      nullable: true
      items:
        $ref: "#/components/schemas/promotions-assignmentStatus"
    promotions-promotionTargetArray:
      type: array
      description: Promotion filter by target type
      nullable: true
      items:
        $ref: "#/components/schemas/promotions-promotionTargetType"
    promotions-promotionTagArray:
      type: array
      description: Promotion filter by promotion tags
      nullable: true
      items:
        type: string
    promotions-promotionListWhere:
      type: object
      description: Promotion filter
      properties:
        excludeIds:
          type: array
          description: IDs of promotions to exclude from the list
          nullable: true
          items:
            type: integer
            example: 3
        handbillPromotionIds:
          type: array
          description: Handbill promotion IDs to include
          nullable: true
          items:
            type: integer
            example: 3
        visibilityStatus:
          type: array
          description: Filter by visibility status
          nullable: true
          items:
            $ref: "#/components/schemas/promotions-promotionVisibility"
        status:
          $ref: "#/components/schemas/promotions-promotionStatusArray"
        statusByType:
          type: object
          description: Filter by a combination of promotion type and status
          properties:
            GENERAL:
              $ref: "#/components/schemas/promotions-promotionStatusArray"
            CUSTOM:
              $ref: "#/components/schemas/promotions-promotionStatusArray"
            MEMBERS_ONLY:
              $ref: "#/components/schemas/promotions-promotionStatusArray"
            HANDBILL:
              $ref: "#/components/schemas/promotions-promotionStatusArray"
        target:
          $ref: "#/components/schemas/promotions-promotionTargetArray"
        targetByType:
          type: object
          description: Filter by a combination of promotion type and target
          properties:
            GENERAL:
              $ref: "#/components/schemas/promotions-promotionTargetArray"
            CUSTOM:
              $ref: "#/components/schemas/promotions-promotionTargetArray"
            MEMBERS_ONLY:
              $ref: "#/components/schemas/promotions-promotionTargetArray"
            HANDBILL:
              $ref: "#/components/schemas/promotions-promotionTargetArray"
        type:
          type: array
          description: Filter by promotion type
          nullable: true
          items:
            $ref: "#/components/schemas/promotions-promotionType"
        presentOnly:
          $ref: "#/components/schemas/promotions-promotionPresentOnly"
        lastingOnly:
          $ref: "#/components/schemas/promotions-promotionLastingOnly"
        displayableOnly:
          $ref: "#/components/schemas/promotions-promotionDisplayableOnly"
        checkExistsInTarget:
          $ref: "#/components/schemas/promotions-promotionCheckExistsInTarget"
        tagNames:
          $ref: "#/components/schemas/promotions-promotionTagArray"
    promotions-promotionListSort:
      type: object
      nullable: true
      description: Promotion sorting settings
      properties:
        forDBQuery:
          type: array
          description: Sorting options for database queries (sort all promotions matched by the filter)
          items:
            type: object
            properties:
              field:
                type: string
                description: Field name to sort by
                enum:
                  - headerName
                  - name
                  - code
                  - startAt
                  - createdAt
                  - updatedAt
                  - expireAt
                  - requireRedeemedPoints
                  - type
                  - priority
                  - status
              direction:
                type: string
                description: Sorting direction
                enum:
                  - asc
                  - desc
        forPaginator:
          type: string
          description: Sorting options for paginator result (sort only a chunk received from the database)
          enum:
            - DISCOUNT_VALUE
            - PRIORITY
    promotions-promotionListFields:
      type: array
      description: Fields to be returned in the promotion object
      nullable: true
      items:
        type: string
    promotions-promotionListLimit:
      type: number
      description: The number of items to return per page
    promotions-promotionListPage:
      type: number
      description: Page number to return for pagination. The first page has the index `1`.
    promotions-promotionListLimitSetValues:
      type: object
      deprecated: true
      description: Set values on promotions when returning list to profile
    promotions-promotionsListFilter:
      type: object
      properties:
        setFieldsValues:
          $ref: "#/components/schemas/promotions-promotionListLimitSetValues"
        where:
          $ref: "#/components/schemas/promotions-promotionListWhere"
        fields:
          $ref: "#/components/schemas/promotions-promotionListFields"
        sort:
          $ref: "#/components/schemas/promotions-promotionListSort"
        page:
          $ref: "#/components/schemas/promotions-promotionListPage"
        limit:
          $ref: "#/components/schemas/promotions-promotionListLimit"
    promotions-promotionListSettings:
      type: object
      nullable: true
      description: Filter for promotions in [`/promotion/get-for-client-by-custom-settings/{identifierType}/{identifierValue}`](#operation/GetClientPromotionsByACustomFilter) method
      allOf:
        - $ref: "#/components/schemas/promotions-promotionsListFilter"
    promotions-promotionAssignmentSettings:
      type: object
      nullable: true
      description: Filter for promotions in [`/promotion/get-for-client/{identifierType}/{identifierValue}/handbill/{handbillUuid}`](#operation/getAssignHandbillForClient_GET) method
      allOf:
        - $ref: "#/components/schemas/promotions-promotionsListFilter"
    promotions-expression:
      type: string
      nullable: true
      format: uuid
      description: Expression UUID which will be used to count the balance of loyalty points in the promotion activation endpoint.
    promotions-blockTag:
      type: string
      description: Tag name which marks a profile as blocked. Blocked profiles do not receive promotions in POS methods and are not allowed to activate new promotions.
      nullable: true
      example: BLOCKED
    promotions-codePrefix:
      type: string
      description: Prefix which will be added to promotion code, when `enableCodeGeneration` is set to true
      nullable: true
      example: SYN
    promotions-enableCodeGeneration:
      type: boolean
      description: Flag which indicates if promotion code should be generated as ordinal number prefixed with prefix defined in `codePrefix`
      nullable: true
      example: true
    promotions-handbillUuidsForCheckout:
      type: array
      description: Handbill UUIDs to use for checkout couponing
      nullable: true
      items:
        type: string
        format: uuid
    promotions-codeGeneration:
      type: object
      description: Checkout code generation options
      nullable: true
      properties:
        prefix:
          type: string
          description: Prefix added to each code
        length:
          type: integer
          default: 36
          description: Length of the random code to generate
        crc:
          type: boolean
          description: When `true`, a CRC string is added to the end of the code
    promotions-checkoutSettings:
      type: object
      description: Handbill checkout settings
      nullable: true
      properties:
        handbillUuidsForCheckout:
          $ref: "#/components/schemas/promotions-handbillUuidsForCheckout"
        codeGeneration:
          $ref: "#/components/schemas/promotions-codeGeneration"
    promotions-pointsExpression:
      type: string
      format: uuid
      nullable: true
      description: UUID of expression that defines how the points should be calculated when evaluating sender points balance
      example: 2395fc33-f2f0-420c-8e7b-0ac63c3454de
    promotions-pointsSenderSegments:
      type: array
      nullable: true
      description: IDs of the Profile segmentations that can participate in point transfers as senders
      items:
        type: string
    promotions-pointsRecipientSegments:
      type: array
      nullable: true
      description: IDs of the Profile segmentations that can participate in point transfers as recipients
      items:
        type: string
    promotions-pointsRecipient:
      type: object
      description: Point recipient settings
      properties:
        segments:
          $ref: "#/components/schemas/promotions-pointsRecipientSegments"
    promotions-pointsSender:
      type: object
      description: Point sender settings
      properties:
        segments:
          $ref: "#/components/schemas/promotions-pointsSenderSegments"
    promotions-transferSettings:
      type: array
      maxItems: 1
      description: Settings for point transfers
      items:
        type: object
        properties:
          expression:
            $ref: "#/components/schemas/promotions-pointsExpression"
          recipient:
            $ref: "#/components/schemas/promotions-pointsRecipient"
          sender:
            $ref: "#/components/schemas/promotions-pointsSender"
    promotions-cashbackSettingsLimit:
      type: object
      description: Defines the limits on cashback usage
      properties:
        minPoints:
          type: integer
          nullable: true
          minimum: 1
          description: The minimum number of points required to spend for cashback. If null - there is no limit defined.
          example: 10
        maxPoints:
          type: integer
          nullable: true
          minimum: 1
          description: The maximum number of points allowed to spend for cashback. If null - there is no limit defined.
          example: 1000
        maxTransactionAmount:
          type: number
          nullable: true
          minimum: 0.01
          description: Maximum amount in local currency to redeem in a transaction. If null - there is no limit defined.
          example: 20
        maxTransactionPercentage:
          type: number
          nullable: true
          description: Defines how much (in percent) of the total transaction amount can be treated as cashback. If null - there is no limit defined.
          example: 50
          minimum: 0.01
          maximum: 100
    promotions-cashbackSettings:
      type: object
      description: Settings for cashback mechanism
      nullable: true
      properties:
        exchangeRate:
          type: number
          minimum: 0.01
          description: Defines how much currency corresponds to one point. For example, if the currency is PLN and exchangeRate is 2, then 1 point equals 2 PLN.
        limits:
          $ref: "#/components/schemas/promotions-cashbackSettingsLimit"
    promotions-promotionError:
      type: object
      description: Details of errors that occurred during promotion activation
      properties:
        key:
          type: string
          description: Type of promotion identifier
          enum:
            - uuid
            - code
        value:
          type: string
          description: Value of the selected identifier
        error:
          $ref: "#/components/schemas/promotions-PromotionActivationErrorSchema"
    promotions-discountSourceType:
      type: integer
      nullable: true
      description: The type which is assigned to discounts to differentiate which ones come from Synerise when using the Process Basket/Checkout endpoints.
      example: 0
    promotions-clientIdCardType:
      type: integer
      nullable: true
      description: The type of card which is used for extracting profile identification data
      example: 0
    promotions-handbillCheckout:
      type: string
      format: uuid
      nullable: true
      description: UUID of the Handbill which is used to generate promotions in the Process Checkout endpoints
    promotions-combineBasketDiscounts:
      type: boolean
      description: If `true`, basket discounts are combined.
      default: false
    promotions-discountOrder:
      type: object
      description: Discount order settings
      properties:
        strategy:
          $ref: "#/components/schemas/promotions-discountOrderStrategy"
        direction:
          $ref: "#/components/schemas/promotions-discountOrderDirection"
    promotions-discountOrderStrategy:
      type: string
      description: The strategy defines the order of applying discounts. The direction is set in `direction`.
      default: DISCOUNT_VALUE
      enum:
        - DISCOUNT_VALUE
        - PRIORITY
    promotions-discountOrderDirection:
      type: string
      description: Direction of the discount order within the strategy selected in `strategy`.
      default: desc
      enum:
        - asc
        - desc
    promotions-priceValueBaseStrategy:
      type: string
      default: MUTABLE
      description: |
        
        This strategy defines how basket discount values are calculated in the Process Basket endpoints.

        - If the CONSTANT strategy is chosen, the discounts are always calculated based on the evidPrice of the item.
        - If the MUTABLE strategy is chosen, the price of an item is updated after each promotion assignment and it is treated as a base for calculating the discounts that follow.

        **Example:** One basket with two promotions (20%, 30%) and one item with a price of 1.00.

        - When the CONSTANT strategy is chosen, the discounts are always subtracted from evidPrice=1.00, so the effective discounts are 0.20 and 0.30. The final price is 0.50.
        - When the MUTABLE strategy is chosen, the discounts are calculated using the updated item price, so applying them in order (20%, 30%) is done in the following way:
          1. `20% of 1.00 = 0.20, *updated price* = 0.80`
          2. `30% of *updated price* = 30% * 0.80 = 0.24`
          3. The final price is `1.00 - 0.20 - 0.24 = 0.56`

          To define the order of applying promotions, use the `discountOrder` object.
      enum:
        - CONSTANT
        - MUTABLE
    promotions-returnFields:
      type: array
      items:
        type: string
      description: An array of promotion fields which should be returned in the Process Basket endpoints in the `transactionItems.grantedDiscounts` object.
    promotions-discountSource:
      type: object
      description: Source of the discount
      required:
        - type
        - id
      properties:
        type:
          type: integer
          description: |
            
            By default:

            - `1` for promotions from your own database

            - `2` for promotions from your Synerise Workspace
        id:
          type: string
          description: ID of the promotion in the source domain, for example a promotion code
    promotions-HTTP200withMessage:
      type: object
      properties:
        message:
          type: string
          description: Short summary of the response
    promotions-PromotionCreateUpdateDeleteRes:
      type: object
      properties:
        message:
          type: string
          description: Short summary of the response
        data:
          $ref: "#/components/schemas/promotions-promotionDataResponse"
    promotions-Viewpromotiondetails-HTTP200:
      type: object
      properties:
        data:
          $ref: "#/components/schemas/promotions-promotionDataResponse"
    promotions-BatchErrorItems:
      type: array
      description: A list of redemption errors
      items:
        $ref: "#/components/schemas/promotions-BatchError"
    promotions-ErrorSchema:
      type: object
      description: Error details
      properties:
        errorCode:
          allOf:
            - $ref: "#/components/schemas/promotions-ErrorV2Code"
            - example: VLD-080
        message:
          allOf:
            - $ref: "#/components/schemas/promotions-ErrorV2Message"
            - example: String fails to match the required pattern
        source:
          type: object
          description: The entity which caused a problem
          properties:
            pointer:
              type: string
              description: Pointer to the wrong element
    promotions-BatchError:
      type: object
      description: Error that occurred and data source index
      properties:
        source:
          type: object
          description: Identifier of the item which caused the error
          properties:
            index:
              type: integer
              example: 1
              description: Index of an item which failed
        errorCode:
          allOf:
            - $ref: "#/components/schemas/promotions-ErrorV2Code"
            - example: ERR-002
        message:
          allOf:
            - $ref: "#/components/schemas/promotions-ErrorV2Message"
            - example: Invalid data
        errors:
          type: array
          description: Error details
          items:
            $ref: "#/components/schemas/promotions-ErrorSchema"
    promotions-VouchersListWithErrors:
      type: object
      description: List of errors
      properties:
        httpStatus:
          allOf:
            - $ref: "#/components/schemas/promotions-ErrorV2HttpStatus"
            - default: 207
        traceId:
          type: string
          description: Trace ID for troubleshooting
          example: c72d530fd1b813ae
        timestamp:
          type: string
          format: date-timed
          description: Time when the error occurred
          example: 2021-12-28T08:27:54.549Z
        errorCode:
          allOf:
            - $ref: "#/components/schemas/promotions-ErrorV2Code"
            - default: ERR-003
        message:
          allOf:
            - $ref: "#/components/schemas/promotions-ErrorV2Message"
            - default: Batch operation failed
        errors:
          $ref: "#/components/schemas/promotions-BatchErrorItems"
        data:
          $ref: "#/components/schemas/promotions-VoucherList"
    promotions-Quantity:
      description: Quantity of redeemed items
      type: integer
      example: 2
      default: 1
    promotions-SourceId:
      description: "The source of redemption. It should be unique to ensure that redemptions are successfully deduplicated when retried. Example: a concatenation of receipt ID and index of the discounted transaction line on the receipt."
      type: string
      example: 3f0a1670-eb63-43f1-a6b8-895a74621964-3
    promotions-OrderId:
      description: Receipt ID for which the voucher was redeemed.
      type: string
      example: 3f0a1670-eb63-43f1-a6b8-895a74621964
    promotions-VoucherPool:
      type: object
      description: Settings for assigning codes from a voucher pool when the promotion is activated. When this is used, a promotion can only be redeemed once per activation.
      properties:
        enabled:
          type: boolean
          default: false
          description: Enables automatic assignment of codes from the pool when the promotion is activated.
        uuid:
          type: string
          format: uuid
          description: UUID of the voucher pool
        transferable:
          type: boolean
          default: false
          description: When `true`, the voucher can be redeemed by a different user than the one who activated the promotion.
    promotions-VoucherKey:
      type: string
      example: code
      description: Type of voucher identifier
      enum:
        - code
    promotions-VoucherValue:
      description: Value of the selected identifier
      type: string
      example: "434428563"
    promotions-VoucherRedeemOptions:
      type: object
      description: Additional options of the operation
      properties:
        quantity:
          $ref: "#/components/schemas/promotions-Quantity"
        sourceId:
          $ref: "#/components/schemas/promotions-SourceId"
        orderId:
          $ref: "#/components/schemas/promotions-OrderId"
    promotions-RedeemVoucherForProfile:
      type: object
      required:
        - profileKey
        - profileValue
        - voucherKey
        - voucherValue
      properties:
        profileKey:
          $ref: "#/components/schemas/promotions-clientKey"
        profileValue:
          $ref: "#/components/schemas/promotions-clientKeyValue"
        voucherKey:
          $ref: "#/components/schemas/promotions-VoucherKey"
        voucherValue:
          $ref: "#/components/schemas/promotions-VoucherValue"
        options:
          $ref: "#/components/schemas/promotions-VoucherRedeemOptions"
    promotions-RedeemVouchersForProfileRequest:
      type: array
      description: Vouchers to redeem
      items:
        $ref: "#/components/schemas/promotions-RedeemVoucherForProfile"
    promotions-RedeemVouchersRequest:
      type: array
      description: Vouchers to redeem
      items:
        $ref: "#/components/schemas/promotions-RedeemVoucher"
    promotions-RedeemVoucher:
      required:
        - voucherKey
        - voucherValue
      type: object
      properties:
        options:
          $ref: "#/components/schemas/promotions-VoucherRedeemOptions"
        voucherKey:
          $ref: "#/components/schemas/promotions-VoucherKey"
        voucherValue:
          $ref: "#/components/schemas/promotions-VoucherValue"
      example:
        voucherKey: code
        voucherValue: 75d9090f-06ac-46a2-a0ce-4b8eb287efb9
        options:
          quantity: 1
          sourceId: 75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1
          orderId: 75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1
          lockIdentifier: 75d9090f-06ac-46a2-a0ce-4b8eb287efb9
    promotions-RedeemPromotionsRequest:
      required:
        - code
        - clientKey
        - clientKeyValue
      type: object
      properties:
        code:
          type: string
          example: 75d9090f-06ac-46a2-a0ce-4b8eb287efb9
          description: Promotion code
        clientKey:
          $ref: "#/components/schemas/promotions-clientKey"
        clientKeyValue:
          $ref: "#/components/schemas/promotions-clientKeyValue"
        quantity:
          description: Quantity of redeemed items
          type: integer
          example: 2
          default: 1
        sourceId:
          description: "The source of redemption. It should be unique for the source of promotion to ensure that redemptions are successfully deduplicated when retried. Example: a concatenation of receipt ID and index of the discounted transaction line on the receipt."
          type: string
          example: 3f0a1670-eb63-43f1-a6b8-895a74621964-3
        orderId:
          description: Receipt ID for which the promotion was redeemed. It's required when using step promotions. The order ID will be used to check if requirements of granting a step promotion are fulfilled.
          type: string
          example: 3f0a1670-eb63-43f1-a6b8-895a74621964
        lockIdentifier:
          description: Identifier of the "promotion requested" lock which will be released when the promotion is redeemed. This kind of lock blocks a profile from requesting new promotions and can be applied when using the [Get Profile promotions by a custom filter](#operation/GetClientPromotionsByACustomFilter) endpoint.
          type: string
          example: 6561d87b-2697-46ad-8f9a-0550736b86e3
      example:
        code: 75d9090f-06ac-46a2-a0ce-4b8eb287efb9
        clientKey: clientId
        clientKeyValue: "434428563"
    promotions-promotionActivation:
      required:
        - key
        - value
      type: object
      properties:
        key:
          type: string
          description: Type of promotion identifier
          enum:
            - uuid
            - code
        value:
          type: string
          description: Value of the selected identifier
        pointsToUse:
          nullable: true
          type: integer
          minimum: 0
          description: How many points should be converted to digital money and stored as ready to redeem in transactions in digital cashback promotions.
      example:
        key: code
        value: 7893467834GG
        pointsToUse: 100
    promotions-promotionActivationProcessSale:
      required:
        - key
        - value
        - pointsToUse
      type: object
      properties:
        key:
          type: string
          description: Type of promotion identifier
          enum:
            - uuid
            - code
        value:
          type: string
          description: Value of the selected identifier
        pointsToUse:
          type: integer
          minimum: 0
          description: How many points should be converted to digital money and stored as ready to redeem in transactions in digital cashback promotions.
      example:
        key: code
        value: 7893467834GG
        pointsToUse: 100
    promotions-PromotionResponseMessage:
      type: object
      properties:
        message:
          type: string
          description: Short summary of the response
    promotions-duplicatePromotionRequest:
      type: object
      properties:
        uuid:
          type: string
          description: Promotion UUID
        code:
          type: string
          description: Promotion code
    promotions-operationId:
      type: integer
      description: Operation ID
      nullable: false
    promotions-clientDateTime:
      type: string
      format: date-time
      description: Operation's start time
    promotions-terminal:
      type: object
      description: Data about the terminal that is the transaction's source
      required:
        - storeId
        - posId
      properties:
        storeId:
          type: string
          description: ID of the store
        posId:
          type: integer
          description: ID of the point of sale (POS)
    promotions-transactionMetric:
      type: object
      description: Metadata of the transaction
      required:
        - posTransactionId
        - beginDateTime
        - globalTransactionId
      properties:
        posTransactionId:
          type: integer
          description: ID of the transaction within the POS
        beginDateTime:
          format: date-time
          description: Time when the transaction starts
        globalTransactionId:
          type: string
          description: Global transaction ID
          nullable: true
    promotions-finalValue:
      type: string
      description: The total cost of all items in the basket, after discounts, including tax
    promotions-promotionErrors:
      type: array
      description: Array of promotion errors
      items:
        $ref: "#/components/schemas/promotions-promotionError"
    promotions-grantedDiscount:
      type: object
      required:
        - source
        - priceDiscount
      properties:
        source:
          $ref: "#/components/schemas/promotions-discountSource"
        priceDiscount:
          type: string
          description: The amount subtracted from `evidPrice`
          example: "12.45"
    promotions-transactionAdditionalItem:
      type: object
      required:
        - seqNo
        - type
        - code
      properties:
        seqNo:
          type: integer
          description: Sequential number of additional item
        type:
          type: string
          description: Type of the additional item
          enum:
            - COUPON
        code:
          type: string
          description: Code of the additional item
    promotions-transactionItemWithGrants:
      type: object
      required:
        - seqNo
        - articleRef
        - quantity
        - evidPrice
        - finalPrice
        - finalValue
        - grantedDiscounts
      properties:
        seqNo:
          $ref: "#/components/schemas/promotions-TransactionItemSeqNo"
        articleRef:
          $ref: "#/components/schemas/promotions-TransactionItemArticleRef"
        quantity:
          $ref: "#/components/schemas/promotions-TransactionItemQuantity"
        evidPrice:
          $ref: "#/components/schemas/promotions-TransactionItemEvidPrice"
        finalPrice:
          $ref: "#/components/schemas/promotions-TransactionItemFinalPrice"
        finalValue:
          $ref: "#/components/schemas/promotions-TransactionItemFinalValue"
        grantedDiscounts:
          type: array
          items:
            $ref: "#/components/schemas/promotions-grantedDiscount"
          description: Array of granted discounts
    promotions-transactionItemWithoutGrants:
      type: object
      required:
        - seqNo
        - articleRef
        - quantity
        - evidPrice
        - finalPrice
        - finalValue
      properties:
        seqNo:
          $ref: "#/components/schemas/promotions-TransactionItemSeqNo"
        articleRef:
          $ref: "#/components/schemas/promotions-TransactionItemArticleRef"
        quantity:
          $ref: "#/components/schemas/promotions-TransactionItemQuantity"
        evidPrice:
          $ref: "#/components/schemas/promotions-TransactionItemEvidPrice"
        finalPrice:
          $ref: "#/components/schemas/promotions-TransactionItemFinalPrice"
        finalValue:
          $ref: "#/components/schemas/promotions-TransactionItemFinalValue"
    promotions-TransactionItemSeqNo:
      type: integer
      description: Sequential number of transaction line item
    promotions-TransactionItemArticleRef:
      type: string
      description: Item's identifier in the product catalog
    promotions-TransactionItemQuantity:
      type: string
      description: Quantity of the product, provided to 3 decimal places
      example: "3.231"
    promotions-TransactionItemEvidPrice:
      type: string
      description: Price per unit before discount, including tax
      example: "34.23"
    promotions-TransactionItemFinalPrice:
      type: string
      description: Price per unit after discount, including tax
      example: "30.23"
    promotions-TransactionItemFinalValue:
      type: string
      description: "The total cost of the product: `finalValue = finalPrice * quantity`"
      example: "123.23"
    promotions-paymentItem:
      type: object
      required:
        - seqNo
        - type
        - name
        - amount
      properties:
        seqNo:
          type: integer
          description: Sequential number of payment method
        type:
          type: integer
          description: Type of payment method (id in external dictionary)
        name:
          type: string
          description: Name of the payment method
        amount:
          type: string
          description: Amount of payment
        hashCode:
          type: string
          description: Hash code of payment method
    promotions-paymentsReport:
      type: object
      description: Payment information
      required:
        - paymentItems
      properties:
        paymentItems:
          type: array
          description: Array of payment methods information
          items:
            $ref: "#/components/schemas/promotions-paymentItem"
    promotions-printout:
      type: object
      properties:
        source:
          type: object
          properties:
            source:
              $ref: "#/components/schemas/promotions-discountSource"
            printoutType:
              type: string
              enum:
                - FREE_TEXT
                - COUPON
              description: Type of printout
            printoutId:
              type: string
              description: ID of printout in source domain
            text:
              type: string
              description: Printout information text. Default name of handbill configuration.
            variables:
              type: array
              items:
                $ref: "#/components/schemas/promotions-printoutVariable"
    promotions-printoutVariable:
      type: object
      properties:
        type:
          type: string
          enum:
            - CODE
          description: Type of variable attached to printout
        value:
          type: string
          description: Value of the variable. Eg. code of coupon.
    promotions-processSaleReq:
      type: object
      required:
        - operationId
        - clientDateTime
        - terminal
        - transactionMetric
        - finalValue
        - transactionItems
        - transactionAdditionalItems
        - paymentsReport
      properties:
        operationId:
          $ref: "#/components/schemas/promotions-operationId"
        clientDateTime:
          $ref: "#/components/schemas/promotions-clientDateTime"
        terminal:
          $ref: "#/components/schemas/promotions-terminal"
        transactionMetric:
          $ref: "#/components/schemas/promotions-transactionMetric"
        finalValue:
          $ref: "#/components/schemas/promotions-finalValue"
        transactionItems:
          type: array
          items:
            $ref: "#/components/schemas/promotions-transactionItemWithoutGrants"
          description: Array of transaction items
        transactionAdditionalItems:
          type: array
          items:
            $ref: "#/components/schemas/promotions-transactionAdditionalItem"
          description: Array of additional items in the transaction
        paymentsReport:
          $ref: "#/components/schemas/promotions-paymentsReport"
        promotionsToActivate:
          type: array
          items:
            $ref: "#/components/schemas/promotions-promotionActivationProcessSale"
          description: Array of promotions to activate during the sale process
    promotions-processCheckoutRes:
      type: object
      properties:
        responseCode:
          $ref: "#/components/schemas/promotions-responseCode"
        responseDescription:
          $ref: "#/components/schemas/promotions-responseDescription"
        operationId:
          $ref: "#/components/schemas/promotions-operationId"
        clientDateTime:
          $ref: "#/components/schemas/promotions-clientDateTime"
        terminal:
          $ref: "#/components/schemas/promotions-terminal"
        transactionGrantReport:
          type: object
          description: Report of printouts related to the transaction
          properties:
            printouts:
              type: array
              items:
                $ref: "#/components/schemas/promotions-printout"
    promotions-processCheckoutReq:
      type: object
      required:
        - operationId
        - clientDateTime
        - terminal
        - transactionMetric
        - finalValue
        - transactionItems
        - transactionAdditionalItems
        - paymentsReport
      properties:
        operationId:
          $ref: "#/components/schemas/promotions-operationId"
        clientDateTime:
          $ref: "#/components/schemas/promotions-clientDateTime"
        terminal:
          $ref: "#/components/schemas/promotions-terminal"
        transactionMetric:
          $ref: "#/components/schemas/promotions-transactionMetric"
        finalValue:
          $ref: "#/components/schemas/promotions-finalValue"
        transactionItems:
          type: array
          items:
            $ref: "#/components/schemas/promotions-transactionItemWithoutGrants"
          description: Array of transaction items
        transactionAdditionalItems:
          type: array
          items:
            $ref: "#/components/schemas/promotions-transactionAdditionalItem"
          description: Array of additional items in the transaction
        paymentsReport:
          $ref: "#/components/schemas/promotions-paymentsReport"
    promotions-processSaleRes:
      type: object
      properties:
        responseCode:
          $ref: "#/components/schemas/promotions-responseCode"
        responseDescription:
          $ref: "#/components/schemas/promotions-responseDescription"
        operationId:
          $ref: "#/components/schemas/promotions-operationId"
        clientDateTime:
          $ref: "#/components/schemas/promotions-clientDateTime"
        terminal:
          $ref: "#/components/schemas/promotions-terminal"
        transactionMetric:
          $ref: "#/components/schemas/promotions-transactionMetric"
        finalValue:
          $ref: "#/components/schemas/promotions-finalValue"
        promotionErrors:
          type: array
          items:
            $ref: "#/components/schemas/promotions-promotionErrors"
        transactionItems:
          type: array
          items:
            $ref: "#/components/schemas/promotions-transactionItemWithGrants"
          description: Array of processed transaction items
        transactionAdditionalItem:
          type: array
          items:
            $ref: "#/components/schemas/promotions-transactionAdditionalItem"
          description: Array of processed additional items, currently not used
        transactionGrantReport:
          type: array
          description: Report of printouts related to the transaction, currently not used
          items: {}
    promotions-releaseLockRes:
      type: object
      properties:
        message:
          type: string
          example: Lock release succeeded
    promotions-createLockRes:
      type: object
      properties:
        callback:
          type: string
          description: URI to call for lock release
    promotions-promotionsSettingsBody:
      type: object
      properties:
        checkoutSettings:
          $ref: "#/components/schemas/promotions-checkoutSettings"
        enableCodeGeneration:
          $ref: "#/components/schemas/promotions-enableCodeGeneration"
        codePrefix:
          $ref: "#/components/schemas/promotions-codePrefix"
        blockTag:
          $ref: "#/components/schemas/promotions-blockTag"
        expression:
          $ref: "#/components/schemas/promotions-expression"
        promotionListSettings:
          $ref: "#/components/schemas/promotions-promotionListSettings"
        promotionAssignmentSettings:
          $ref: "#/components/schemas/promotions-promotionAssignmentSettings"
        restorePointsOnProfileDeactivation:
          $ref: "#/components/schemas/promotions-restorePointsOnProfileDeactivation"
        allowRedeemCompletionWhenBlocked:
          $ref: "#/components/schemas/promotions-allowRedeemCompletionWhenBlocked"
        saleSettings:
          $ref: "#/components/schemas/promotions-saleSettings"
        lockSettings:
          $ref: "#/components/schemas/promotions-lockSettings"
        transferSettings:
          $ref: "#/components/schemas/promotions-transferSettings"
        cashbackSettings:
          $ref: "#/components/schemas/promotions-cashbackSettings"
    promotions-handbillConfigUpdateRequest:
      type: object
      properties:
        channel:
          $ref: "#/components/schemas/promotions-handbillChannel"
        status:
          $ref: "#/components/schemas/promotions-handbillStatus"
        name:
          $ref: "#/components/schemas/promotions-handbillName"
        description:
          $ref: "#/components/schemas/promotions-handbillDescription"
        controlGroup:
          $ref: "#/components/schemas/promotions-handbillControlGroup"
        variants:
          $ref: "#/components/schemas/promotions-handbillVariants"
    promotions-handbillConfigCreateRequest:
      type: object
      required:
        - channel
        - status
        - name
        - description
        - controlGroup
        - variants
      properties:
        channel:
          $ref: "#/components/schemas/promotions-handbillChannel"
        status:
          $ref: "#/components/schemas/promotions-handbillStatus"
        name:
          $ref: "#/components/schemas/promotions-handbillName"
        description:
          $ref: "#/components/schemas/promotions-handbillDescription"
        controlGroup:
          $ref: "#/components/schemas/promotions-handbillControlGroup"
        variants:
          $ref: "#/components/schemas/promotions-handbillVariants"
    promotions-handbillConfig:
      type: object
      description: Details of a single handbill configuration
      properties:
        uuid:
          $ref: "#/components/schemas/promotions-handbillUuid"
        createdAt:
          $ref: "#/components/schemas/promotions-objectCreatedAt"
        updatedAt:
          $ref: "#/components/schemas/promotions-objectUpdatedAt"
        channel:
          $ref: "#/components/schemas/promotions-handbillChannel"
        status:
          $ref: "#/components/schemas/promotions-handbillStatus"
        userId:
          $ref: "#/components/schemas/promotions-userId"
        origin:
          $ref: "#/components/schemas/promotions-handbillOrigin"
        name:
          $ref: "#/components/schemas/promotions-handbillName"
        description:
          $ref: "#/components/schemas/promotions-handbillDescription"
        controlGroup:
          $ref: "#/components/schemas/promotions-handbillControlGroup"
        variants:
          $ref: "#/components/schemas/promotions-handbillVariants"
    promotions-handbillConfigWithSimplifiedVariants:
      type: object
      description: Details of a single handbill configuration
      properties:
        uuid:
          $ref: "#/components/schemas/promotions-handbillUuid"
        createdAt:
          $ref: "#/components/schemas/promotions-objectCreatedAt"
        updatedAt:
          $ref: "#/components/schemas/promotions-objectUpdatedAt"
        channel:
          $ref: "#/components/schemas/promotions-handbillChannel"
        status:
          $ref: "#/components/schemas/promotions-handbillStatus"
        userId:
          $ref: "#/components/schemas/promotions-userId"
        origin:
          $ref: "#/components/schemas/promotions-handbillOrigin"
        name:
          $ref: "#/components/schemas/promotions-handbillName"
        description:
          $ref: "#/components/schemas/promotions-handbillDescription"
        controlGroup:
          $ref: "#/components/schemas/promotions-handbillControlGroup"
        variants:
          $ref: "#/components/schemas/promotions-handbillVariantsSimple"
    promotions-userId:
      type: integer
      description: ID of the user who created this object or the last user who updated it, if applicable
    promotions-handbillChannel:
      description: |-
        Channel of the handbill.
        * CHECK_IN means that the promotions are offered before a purchase.
        * CHECK_OUT means that promotions are offered after a purchase, and can be used in a future transaction.
        * MOBILE is used to deliver promotions to a mobile application.
      type: string
      enum:
        - MOBILE
        - CHECK_OUT
        - CHECK_IN
    promotions-handbillName:
      type: string
      description: Name of the handbill configuration
    promotions-promotionImportHash:
      type: string
      format: uuid
      nullable: true
      description: Hash of the import
    promotions-handbillDescription:
      type: string
      description: Description of the handbill configuration
    promotions-handbillControlGroup:
      nullable: true
      description: Details of the control group. A control group is the part of profiles who are not offered any promotions so their activity can be compared with promotion-enabled profiles to check a promotion's effectiveness.
      type: object
      required:
        - name
        - percentage
      properties:
        name:
          type: string
          description: Name of the control group
        percentage:
          $ref: "#/components/schemas/promotions-handbillVariantPercentage"
    promotions-handbillOrigin:
      type: string
      enum:
        - USER
        - PROFILE
      description: Informs if this object was created/updated by a User or a Workspace.
    promotions-handbillStatus:
      type: string
      description: Status of the handbill
      enum:
        - DRAFT
        - ACTIVE
        - INACTIVE
    promotions-handbillUuid:
      type: string
      format: uuid
      description: UUID of the variant. Generated automatically.
    promotions-handbillVariantsSimple:
      type: array
      description: Variants of the handbill configuration.
      items:
        type: object
        description: Handbill variant
        properties:
          name:
            $ref: "#/components/schemas/promotions-handbillVariantName"
          uuid:
            $ref: "#/components/schemas/promotions-handbillVariantUuid"
          percentage:
            $ref: "#/components/schemas/promotions-handbillVariantPercentage"
          ai:
            $ref: "#/components/schemas/promotions-handbillVariantAi"
    promotions-handbillVariants:
      type: array
      description: Variants of the handbill configuration. If you do not want to use variants, send an empty array.
      items:
        type: object
        description: Handbill variant
        required:
          - name
          - percentage
          - ai
          - limits
          - activity
        properties:
          name:
            $ref: "#/components/schemas/promotions-handbillVariantName"
          uuid:
            $ref: "#/components/schemas/promotions-handbillVariantUuid"
          percentage:
            $ref: "#/components/schemas/promotions-handbillVariantPercentage"
          ai:
            $ref: "#/components/schemas/promotions-handbillVariantAi"
          limits:
            $ref: "#/components/schemas/promotions-handbillVariantLimits"
          activity:
            $ref: "#/components/schemas/promotions-handbillVariantActivity"
          printout:
            $ref: "#/components/schemas/promotions-handbillVariantPrintout"
          filterIds:
            type: array
            description: An array of filter UUIDs
            deprecated: true
            items:
              type: string
              format: uuid
          types:
            $ref: "#/components/schemas/promotions-handbillVariantTypes"
          excludeByAvailableProducts:
            $ref: "#/components/schemas/promotions-handbillExcludeByAvailableProducts"
          slotFilters:
            $ref: "#/components/schemas/promotions-handbillVariantSlotFilters"
    promotions-handbillVariantName:
      type: string
      description: Name of the variant
    promotions-handbillVariantUuid:
      type: string
      format: uuid
      description: UUID of the variant. Generated automatically. Do not send this field in create/update requests.
    promotions-handbillVariantAi:
      type: object
      description: Additional configuration for the AI recommendations engine
      required:
        - controlVariant
      properties:
        controlVariant:
          type: boolean
          description: "When `true`, the promotions are assigned at random. When `false`, the promotions are assigned based on the AI recommendations settings: `varietyFactor`, `varietyGroupSize`,`redistributionFrequencyFactor`, `popularityBoosting`."
        varietyFactor:
          description: Adjust the variety of returned promotions. The higher the number, the more variety. The choice of promotions is calculated by the AI.
          type: number
          minimum: 0
          maximum: 1
          example: 0.5
        varietyGroupSize:
          description: Defines how many similar items may be recommended. This is calculated in according to `varietyFactor`.
          type: integer
          minimum: 1
          example: 1
        redistributionFrequencyFactor:
          description: Allows adjusting the frequency of promotion redistribution. The default value of 1 allows the model to decide how often to redistribute promotions. A value lower than 1 decreases redistribution frequency, a value higher than 1 increases it.
          type: number
          minimum: 0.5
          maximum: 1.5
          example: 0.5
        popularityBoosting:
          description: Allows adjusting how important product popularity is for the promotions model. Higher values increase the importance.
          type: number
          minimum: 0
          maximum: 1
          example: 1
    promotions-handbillVariantLimits:
      type: object
      nullable: true
      description: Daily redemption limits of this variant
      properties:
        limitPerDay:
          type: integer
          description: The maximum number of times each profile can redeem this handbill in a single day
          example: 6
          deprecated: true
        limitExceptions:
          type: array
          description: Days of the week when the limits are different
          nullable: true
          items:
            type: object
            required:
              - dayOfWeek
              - limitPerDay
            properties:
              dayOfWeek:
                type: integer
                description: Day of the week when the exception applies. "1" is Monday.
                minimum: 1
                maximum: 7
                example: 5
              limitPerDay:
                type: integer
                example: 8
                description: The maximum number of times each profile can redeem this promotion in the day defined for this exception.
        limitsPerBasket:
          type: array
          description: The minimum basket limits that should be met
          nullable: true
          items:
            type: object
            required:
              - basketSize
              - basketValue
              - condition
            properties:
              basketSize:
                type: integer
                description: Minimum basket size
                minimum: 0
                example: 12
              basketValue:
                type: number
                description: Minimum basket value
                minimum: 0
                example: 30.5
              condition:
                type: string
                description: Condition if minimum values should be conjunction or alternative
                enum:
                  - AND
                  - OR
        limitExclusion:
          type: array
          description: Items that should not be taken into consideration while calculating basket value and size
          nullable: true
          items:
            type: object
            required:
              - catalogId
            properties:
              catalogId:
                type: number
                description: Catalog that the products and/or filters belong to
                example: 22424
              products:
                type: array
                description: Products that should be excluded
                nullable: true
                items:
                  type: string
                  description: Product reference
                  example: UGG-BB-PUR-06
              filters:
                type: array
                description: Filter ids of products that should be excluded
                nullable: true
                items:
                  type: string
                  description: Filter ids
                  example: 7c1fbdf6-dd27-11ea-87d0-0242ac130003
    promotions-handbillVariantActivity:
      type: object
      nullable: true
      description: Defines how long the handbill promotions remain assigned to the profile after the handbill is generated.
      properties:
        lastingType:
          type: string
          description: Type of handbill expiration.
          default: RELATIVE
          enum:
            - RELATIVE
            - CRON
        lasting:
          type: object
          description: Defines a time period. Required if lastingType is `RELATIVE`.
          required:
            - value
            - unit
          properties:
            unit:
              description: The time unit
              enum:
                - HOURS
                - DAYS
            value:
              type: integer
              example: 24
              description: The amount of time units
        cronWeekdays:
          type: array
          description: 'Used when `"lastingType": "CRON"`. Array of week days when the handbill promotions expire'
          items:
            type: number
            description: Day of the week in crontab notation (0 is Sunday, 6 is Saturday)
          example:
            - 0
            - 1
            - 6
        cronTime:
          type: string
          description: 'Used when `"lastingType": "CRON"`. Clock time in UTC when the handbill promotions expire, in HH:MM format.'
          example: 12:34
        lastingAt:
          type: string
          format: date-time
          description: 'Used when `"lastingType": "RELATIVE"`. Time when the handbill expires.'
        timeExclusions:
          type: object
          nullable: true
          required:
            - uuid
          properties:
            uuid:
              type: string
              format: uuid
              example: 6a177f3e-748f-44d4-ac30-a457a5199685
    promotions-handbillVariantPrintout:
      type: object
      description: Details for printing the coupon
      nullable: true
      required:
        - template
      properties:
        template:
          type: string
          description: Template in [Pug format](https://pugjs.org/api/getting-started.html). The template can contain references to variables in the definition of the promotion, for example `promotion.name`, `promotion.tags[1]`. You can also use the [Moment.js library](https://momentjs.com/). The `#{}` elements allow you to insert JS code with the scope limited to `promotion`, `moment`, and `JSON`.
          example: "|#{promotion.name};#{promotion.discountType == 'EXACT_PRICE' ? 'Price':'Discount'} #{promotion.discountValue} #{promotion.discountType == 'PERCENT'? '%' : 'USD'};Valid for;#{moment.utc(coupon.createdAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')} - #{moment.utc(coupon.lastingAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!"
        maxLineLength:
          type: integer
          description: Maximum number of characters to print on a line
          example: 18
        newLineDelimiter:
          type: string
          description: Line delimiter
          example: ;
    promotions-handbillVariantTypes:
      type: array
      nullable: true
      description: Array of promotions types which will be taken as promotion candidates to assign. When set to null, only promotions with HANDBILL type will be considered as candidates.  For type HANDBILL, promotions are assigned with lasting date calculated by `activity` settings in variant, so all get promotions endpoints consider those dates when filtering by `lastingOnly` flag. For other types than HANDBILL, promotions lasting date is only respected in `/get-for-client/handbill/:handbillUuid` endpoint. Other get promotions endpoints don't filter those promotions by `lastingOnly` flag.
      items:
        type: string
        description: Promotion type
        enum:
          - MEMBERS_ONLY
          - HANDBILL
          - CUSTOM
          - GENERAL
      example:
        - MEMBERS_ONLY
        - HANDBILL
    promotions-handbillExcludeByAvailableProducts:
      description: When `true`, promotions aren't generated for items which already belong to another assigned promotion.
      type: boolean
      example: true
      default: true
      nullable: false
    promotions-handbillVariantSlotFilters:
      type: object
      description: Slots to include in the coupon
      nullable: true
      required:
        - order
        - slots
      properties:
        order:
          type: string
          enum:
            - GIVEN
            - AI
          description: |-
            The type of slot ordering when they are returned, where:
                `GIVEN` - slots are returned in the order they were created
                `AI` - order of slots is changed by AI engine score
        slots:
          type: array
          description: Slots in the coupon. You can use them, for example, to create a slot that will only show promotions for a certain brand, and another for all the other brands. This is done by applying filters that include certain promotions.
          items:
            type: object
            required:
              - filterId
              - limit
            properties:
              filterId:
                description: UUID of a filter with promotions
                type: string
                format: uuid
              limit:
                description: Number of promotions to be returned a in given slot
                type: number
                minimum: 1
                maximum: 50
                example: 5
    promotions-handbillVariantPercentage:
      type: integer
      description: The size of the group, in relation to the entire group to which the promotion applies. The control group and the groups for each variant must sum up to 100%.
    promotions-objectCreatedAt:
      type: string
      format: date-time
      description: Time when the object was created
    promotions-objectUpdatedAt:
      type: string
      format: date-time
      description: Time when the object was last updated
    promotions-clientKey:
      type: string
      example: clientId
      description: Type of profile identifier
      enum:
        - externalId
        - clientId
        - email
        - phone
        - uuid
    promotions-clientKeyValue:
      description: Value of the selected identifier
      type: string
      example: "434428563"
    promotions-senderName:
      description: Name of the points sender
      type: string
    promotions-recipientName:
      description: Name of the points recipient
      type: string
    promotions-responseCode:
      type: number
      description: Response code. 0 is the same as HTTP 200. Other HTTP codes are sent as usual.
    promotions-responseDescription:
      type: string
      description: Description of the response. Used for diagnostics and troubleshooting.
    promotions-responseMeta:
      type: object
      description: Optional metadata
      properties:
        code:
          type: integer
          description: HTTP code
        limit:
          type: integer
          description: The number of items per page
        link:
          type: array
          description: Links to other pages
          items:
            type: object
            description: Link to another page on the list
            properties:
              rel:
                type: string
                enum:
                  - first
                  - last
                  - next
                  - prev
                description: The type of relationship to the current page
              url:
                type: string
                description: The URL of the page
        page:
          type: integer
          description: The current page
        totalCount:
          type: integer
          description: The total number of items on all pages
        totalPages:
          type: integer
          description: The total number of pages
    promotions-ResponseError:
      type: string
      description: Summary of the error
    promotions-ResponseErrorMessage:
      type: string
      description: Error details
    promotions-ErrorTimestamp:
      type: string
      description: Time when the error occurred
    promotions-ErrorCode:
      type: integer
      description: HTTP code of the problem
    promotions-ErrorObject:
      type: object
      title: JSON content issue
      properties:
        message:
          $ref: "#/components/schemas/promotions-ResponseError"
        error:
          description: Details of the error
          anyOf:
            - type: array
              description: An array of objects with error details
              items:
                type: object
                description: Details of an error
                properties:
                  message:
                    $ref: "#/components/schemas/promotions-ErrorV2Message"
                  additionalProperties:
                    description: Additional information, if applicable
            - type: string
              description: Description of the error
    promotions-ErrorV2Timestamp:
      type: string
      format: date-time
      description: Date and time when the error occurred
      example: 2020-10-05T10:59:21.000Z
    promotions-ErrorV2TraceId:
      type: string
      description: TraceId of the request which resulted in the error
      example: 8705651679b203e7
    promotions-ErrorV2Message:
      type: string
      description: Short description of the error
      example: Internal Error
    promotions-ErrorV2HttpStatus:
      type: number
      description: HTTP status of the error
      example: 500
    promotions-ErrorV2Code:
      type: string
      description: Error code which helps identify the issue. See [API error reference](https://hub.synerise.com/api-reference/errors.html).
      example: ERR-001
    promotions-OptionalErrorV2Code:
      type: string
      description: Error code which helps identify the issue. See [API error reference](https://hub.synerise.com/api-reference/errors.html).
      example: ERR-001
      nullable: true
    promotions-PromotionActivationErrorSchema:
      type: object
      description: Details of an error
      properties:
        errorCode:
          $ref: "#/components/schemas/promotions-OptionalErrorV2Code"
        message:
          $ref: "#/components/schemas/promotions-ResponseErrorMessage"
      example:
        message: Points not met limits for activation
        name: PointsNotMetError
        errorCode: ERR-042
    promotions-GenericErrorV2Schema:
      type: object
      description: Details of an error
      properties:
        timestamp:
          $ref: "#/components/schemas/promotions-ErrorV2Timestamp"
        traceId:
          $ref: "#/components/schemas/promotions-ErrorV2TraceId"
        errorCode:
          $ref: "#/components/schemas/promotions-ErrorV2Code"
        message:
          $ref: "#/components/schemas/promotions-ErrorV2Message"
        httpStatus:
          $ref: "#/components/schemas/promotions-ErrorV2HttpStatus"
    promotions-ClientNotFoundError:
      allOf:
        - $ref: "#/components/schemas/promotions-GenericErrorV2Schema"
        - description: Profile not found
          example:
            errorCode: CLI-001
            httpStatus: 404
            message: Profile not found
            timestamp: 2020-10-05T10:59:21.000Z
            traceId: 8705651679b203e7
    promotions-ProfileNotFoundErrorV1:
      description: Profile not found
      properties:
        message:
          $ref: "#/components/schemas/promotions-ResponseErrorMessage"
      example:
        message: Profile not found
    promotions-PromotionNotFoundErrorV1:
      description: Promotion not found
      properties:
        message:
          $ref: "#/components/schemas/promotions-ResponseErrorMessage"
      example:
        message: Promotion not found
    promotions-PromotionNotActivatedErrorV1:
      description: Promotion not activated
      properties:
        message:
          $ref: "#/components/schemas/promotions-ResponseErrorMessage"
      example:
        message: Promotion not activated
    promotions-PromotionRedeemLimitExceededErrorV1:
      description: Promotion redeem limit exceeded
      properties:
        message:
          $ref: "#/components/schemas/promotions-ResponseErrorMessage"
      example:
        message: Promotion redeem limit exceeded
    promotions-PromotionAlreadyRedeemedErrorV1:
      description: Promotion already redeemed
      properties:
        message:
          $ref: "#/components/schemas/promotions-ResponseErrorMessage"
      example:
        message: Promotion already redeemed
    promotions-LockNotFoundErrorV1:
      description: Lock not found
      properties:
        message:
          $ref: "#/components/schemas/promotions-ResponseErrorMessage"
      example:
        message: Lock not found
    promotions-ErrorV2InvalidBodySource:
      type: object
      properties:
        pointer:
          description: JSON pointer to the object which was source of the error
          example: /exampleKey
    promotions-InvalidDataErrorV2:
      allOf:
        - $ref: "#/components/schemas/promotions-GenericErrorV2Schema"
        - description: Details of a body validation error
          properties:
            errors:
              type: array
              items:
                type: object
                description: Details of a validation error
                properties:
                  errorCode:
                    $ref: "#/components/schemas/promotions-ErrorV2Message"
                  source:
                    $ref: "#/components/schemas/promotions-ErrorV2InvalidBodySource"
          example:
            errorCode: ERR-042
            httpStatus: 400
            message: Invalid data
            timestamp: 2020-10-05T10:59:21.000Z
            traceId: 8705651679b203e7
    promotions-ClientNotHaveRequiredPointsError:
      allOf:
        - $ref: "#/components/schemas/promotions-GenericErrorV2Schema"
        - description: Profile does not have the required number of points
          example:
            errorCode: PRO-015
            httpStatus: 422
            message: Profile does not have the required number of points
            timestamp: 2020-10-05T10:59:21.000Z
            traceId: 8705651679b203e7
    promotions-ClientPointsSenderNotInSegmentError:
      allOf:
        - $ref: "#/components/schemas/promotions-GenericErrorV2Schema"
        - description: Point sender is not in the required segmentation
          example:
            errorCode: PRO-034
            httpStatus: 422
            message: Point sender is not in the required segmentation
            timestamp: 2020-10-05T10:59:21.000Z
            traceId: 8705651679b203e7
    promotions-ClientPointsRecipientNotInSegmentError:
      allOf:
        - $ref: "#/components/schemas/promotions-GenericErrorV2Schema"
        - description: Point recipient is not in required segmentation
          example:
            errorCode: PRO-035
            httpStatus: 422
            message: Point recipient is not in required segmentation
            timestamp: 2020-10-05T10:59:21.000Z
            traceId: 8705651679b203e7
    promotions-ClientPointsLockErrorV2:
      allOf:
        - $ref: "#/components/schemas/promotions-GenericErrorV2Schema"
        - description: Profile points are locked. Waiting for releasing lock for the profile
          example:
            errorCode: PRO-016
            httpStatus: 423
            message: Profile points are locked. Waiting for releasing lock for the profile.
            timestamp: 2020-10-05T10:59:21.000Z
            traceId: 8705651679b203e7
    push-devices-service-Updated:
      type: string
      description: Tokens updated before this date will be deleted.
      format: date-time
    push-devices-service-WebPushCleanupRequest:
      oneOf:
        - type: object
          title: By update time
          required:
            - type
            - updated
          properties:
            type:
              type: string
              enum:
                - BY_UPDATED_BEFORE
            updated:
              $ref: "#/components/schemas/push-devices-service-Updated"
        - type: object
          title: By version
          required:
            - type
            - version
          properties:
            type:
              type: string
              enum:
                - BY_VERSION
            version:
              type: string
              example: 0.0.1
              description: Tokens with this service worker version will be deleted.
    push-devices-service-MobilePushCleanupRequest:
      type: object
      properties:
        type:
          type: string
          enum:
            - BY_UPDATED_BEFORE
        updated:
          $ref: "#/components/schemas/push-devices-service-Updated"
      required:
        - type
        - updated
    push-devices-service-inBodyClientDeviceId:
      type: string
      description: Unique Android or iOS device ID
    push-devices-service-LinkaClientdeviceRequest:
      type: object
      required:
        - deviceId
        - type
        - registrationId
      properties:
        deviceId:
          $ref: "#/components/schemas/push-devices-service-inBodyClientDeviceId"
        registrationId:
          type: string
          description: Registration ID for [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging/)
        type:
          type: string
          description: Device type
          enum:
            - android
            - ios
            - windows
        bluetoothAddress:
          type: string
          description: Bluetooth MAC address of the device
        macAddress:
          type: string
          description: MAC address of the network adapter
        manufacturer:
          type: string
          description: Manufacturer of the device
        model:
          type: string
          description: Model of the device
        osVersion:
          type: string
          description: Operating system of the device
        product:
          type: string
          description: Additional information about the OS on the device
          example: a51ul_htc_europe
        screenHeight:
          type: integer
          format: int32
          description: Screen height in pixels
        screenWidth:
          type: integer
          format: int32
          description: Screen width in pixels
        publicKey:
          type: string
          description: Public key used to encrypt push messages
    push-devices-service-HTTP400:
      type: object
      properties:
        error:
          type: string
          description: Summary of the error
        status:
          type: integer
          format: int32
          description: Status code
        timestamp:
          type: string
          description: Time when the message was sent
        path:
          type: string
          description: URL of the requested resource
        message:
          type: string
          description: Description of the problem
        errors:
          type: array
          description: Additional details of the errors, if applicable
          items:
            $ref: "#/components/schemas/push-devices-service-Error"
    push-devices-service-Error:
      type: object
      properties:
        code:
          type: integer
          format: int32
          example: 12082
          description: A numeric identifier of the error type
        field:
          type: string
          example: countryCode
          description: Field in the request body that caused the error
        message:
          type: string
          example: Country Code must have 0 or 3 characters as per ISO format.
          description: A detailed description of the problem
        rejectedValue:
          type: string
          example: Poland
          description: The value that caused the error
    query-rules-v2-Error:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        status:
          type: integer
          description: Status code
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
        path:
          type: string
          description: URL of the requested resource
      required:
        - timestamp
        - status
        - message
    query-rules-v2-PaginatedRules:
      type: object
      properties:
        data:
          type: array
          description: A list of rules
          items:
            $ref: "#/components/schemas/query-rules-v2-RuleWithStatus"
        extras:
          type: object
          description: Additional information
          properties:
            statuses:
              type: object
              description: The number of rules with each status. All rules are considered.
              properties:
                Finished:
                  type: integer
                Draft:
                  type: integer
                Paused:
                  type: integer
                Scheduled:
                  type: integer
                Active:
                  type: integer
        meta:
          $ref: "#/components/schemas/query-rules-v2-PaginationMeta"
    query-rules-v2-PaginationMeta:
      type: object
      description: 'Optional pagination metadata (sent if `"includeMeta": true`)'
      properties:
        totalPages:
          type: number
          description: The total number of pages
        totalCount:
          type: number
          description: The total number of campaigns
        page:
          type: number
          description: The current page
        limit:
          type: number
          description: The maximal number of items on a page
        sortedBy:
          type: string
          description: The column (attribute) that the campaigns were sorted by
        ordering:
          type: string
          description: Sorting order
        code:
          type: number
          description: HTTP response code
        link:
          type: array
          description: Links to neighboring pages, first page, and last page in pagination
          items:
            type: object
            properties:
              url:
                description: Page URL
                type: string
              rel:
                type: string
                description: Position of the linked page
                enum:
                  - first
                  - next
                  - prev
                  - last
    query-rules-v2-RuleWithStatus:
      type: object
      description: Details of the rule
      properties:
        status:
          description: Status of the rule
          type: string
        rule:
          type: object
          description: Configuration of the rule
          properties:
            id:
              $ref: "#/components/schemas/query-rules-v2-RuleId"
            name:
              $ref: "#/components/schemas/query-rules-v2-RuleName"
            author:
              $ref: "#/components/schemas/query-rules-v2-RuleAuthor"
            state:
              $ref: "#/components/schemas/query-rules-v2-RuleState"
            activeFrom:
              $ref: "#/components/schemas/query-rules-v2-RuleActiveFromDatetime"
            activeTo:
              $ref: "#/components/schemas/query-rules-v2-RuleActiveToDatetime"
            timezone:
              $ref: "#/components/schemas/query-rules-v2-RuleTimezoneSchema"
            updatedAt:
              $ref: "#/components/schemas/query-rules-v2-RuleUpdateDatetime"
            createdAt:
              $ref: "#/components/schemas/query-rules-v2-RuleCreatedDatetime"
            data:
              $ref: "#/components/schemas/query-rules-v2-RuleDataSchema"
    query-rules-v2-RuleId:
      type: integer
      description: ID of the rule
    query-rules-v2-RuleName:
      type: string
      description: Name of the rule
    query-rules-v2-RuleMatchingType:
      type: string
      description: Match logic of the rule
      enum:
        - is
        - startsWith
        - endsWith
        - contains
    query-rules-v2-RuleAuthor:
      description: The user who created the rule
      type: integer
    query-rules-v2-RuleState:
      type: string
      description: State of the rule
      enum:
        - draft
        - active
        - paused
        - finished
    query-rules-v2-RuleUpdateDatetime:
      type: string
      description: Last update time in YYYY-MM-DD HH-MM-SS format
    query-rules-v2-RuleCreatedDatetime:
      type: string
      description: Creation time in YYYY-MM-DD HH-MM-SS format
    query-rules-v2-RuleActiveToDatetime:
      type: string
      description: Time when the rule becomes inactive, in YYYY-MM-DD HH-MM-SS format
    query-rules-v2-RuleActiveFromDatetime:
      type: string
      description: Time when the rules becomes active, in YYYY-MM-DD HH-MM-SS format
    query-rules-v2-RuleTimezoneSchema:
      type: string
      description: Timezone in `UTC[+/-]X` format, for example `UTC+4`, `UTC+0`, `UTC-3`
    query-rules-v2-RuleDataSchema:
      type: object
      description: This object contains the details of what the rule does
      required:
        - conditions
        - queryConsequences
        - postQueryConsequences
      properties:
        audience:
          type: object
          description: Optional audience the rule will be applied to
          properties:
            segmentationIds:
              type: array
              description: Ids of segmentations to which client belongs
              example:
                - 34ab56cd-789be-22ee-11ab-123456789abc
                - 12xy34z5-456b-33cc-7o52-987654321ece
              items:
                type: string
        conditions:
          type: object
          description: Additional conditions
          properties:
            patterns:
              type: array
              description: Strings that trigger this rule when included in the query
              example:
                - phone
                - notebook
                - mouse {color} {brand}
              items:
                type: string
            matchingType:
              $ref: "#/components/schemas/query-rules-v2-RuleMatchingType"
            contexts:
              type: array
              description: Contexts for which the rule will be considered during matching
              example:
                - listing
                - web
                - mobile
              items:
                type: string
            filters:
              type: object
              description: You can configure a condition so that the rule only applies depending on the filters used in a search query.
              properties:
                textFilters:
                  $ref: "#/components/schemas/query-rules-v2-ConditionsTextFiltersSchema"
                rangeFilters:
                  $ref: "#/components/schemas/query-rules-v2-ConditionsRangeFiltersSchema"
                datetimeFilters:
                  $ref: "#/components/schemas/query-rules-v2-ConditionsDatetimeFiltersSchema"
        queryConsequences:
          type: array
          description: An array of transformations to be performed on the query
          items:
            type: object
            properties:
              type:
                type: string
                description: |
                  The action to perform

                  - `removeWord` removes a word from the query.
                  - `replaceWord` replaces a word from the query with a string.
                  - `replaceQuery` replaces the entire query.

                  **IMPORTANT:**

                  These operations are performed on strings that match the pattern exactly. For example:

                  1. The pattern is `foo bar`.
                  1. The operation is set to `removeWord` and `word` is set to `foo`.
                  1. The user searches for `foo bar bar foo`.

                  **The result:** "foo" is removed from "foo bar" and the transformed query is now "bar bar foo".
                enum:
                  - removeWord
                  - replaceWord
                  - replaceQuery
              word:
                type: string
                description: The word to replace or remove
              replacement:
                type: string
                description: The string that replaces the word/query
        postQueryConsequences:
          type: object
          description: This object describes how the rule affects the search results
          properties:
            hideHits:
              type: array
              description: An array of items to hide from the results, identified by `itemId`
              items:
                type: string
            promoteHits:
              type: array
              description: An array of items to show first in the results
              items:
                type: object
                properties:
                  id:
                    description: "`productRetailerPartNo`"
                    type: string
                  position:
                    description: Item's position on the list of results
                    type: integer
            promoteHitsPositionStrategy:
              $ref: "#/components/schemas/query-rules-v2-PositionStrategy"
            standardFilters:
              $ref: "#/components/schemas/query-rules-v2-RuleFilters"
            elasticFilters:
              $ref: "#/components/schemas/query-rules-v2-RuleFilters"
            boostFilters:
              $ref: "#/components/schemas/query-rules-v2-BoostFilters"
            topHitsFilters:
              $ref: "#/components/schemas/query-rules-v2-TopHitsFilters"
            distinctFilter:
              $ref: "#/components/schemas/query-rules-v2-DistinctFilter"
            sortBy:
              type: object
              description: Sorting info
              properties:
                attribute:
                  type: string
                  description: Name of the attribute by which the data will be sorted
                ordering:
                  description: Sorting order
                  type: string
                  enum:
                    - desc
                    - asc
            customData:
              type: string
              description: Custom JSON that will be returned with the search results
              example: '{"customLandingPage": "https://synerise.com/"}'
            returnNoData:
              type: boolean
              description: When set to `true`, forces the search result to be empty
              example: false
            pinFacets:
              type: array
              description: |
                Forces specific facets to be included in the response, regardless of coverage score or
                automatic facet selection. Each entry may optionally specify a 1-based `position` to pin
                the facet at a specific slot in the response `facetsOrdering`.

                A pin without `position` is placed before any non-pinned facets (in input order).
                A pin with `position` greater than the final list size is appended at the tail; multiple
                such pins keep their relative ordering by ascending `position`.
                A facet that is also `hideFacets` is dropped (hide wins).
                A pin's attribute must exist in the index's facetable attributes; positions cannot exceed
                the number of facetable attributes.
              items:
                type: object
                required:
                  - attribute
                properties:
                  attribute:
                    type: string
                    description: Name of the facet attribute to pin.
                    example: size
                  position:
                    type: integer
                    minimum: 1
                    maximum: 100
                    description: |
                      Optional 1-based slot in `facetsOrdering`. Omit to pin without specifying a slot.
                    example: 1
              example:
                - attribute: size
                  position: 1
                - attribute: width
                  position: 2
                - attribute: gift_wrap
            hideFacets:
              type: array
              description: |
                Forces specific facets to be excluded from the response, even if they would otherwise be
                selected by automatic facet selection or were explicitly requested by the API caller.
                Hidden attributes are also stripped from `customFilteredFacets` for the matched request.
              items:
                type: string
                description: Facet attribute to hide.
              example:
                - material
                - fabric
                - sleeve_length
    query-rules-v2-ConditionsTextFiltersSchema:
      type: object
      description: Condition filters for text attributes
      example:
        color:
          values:
            - green
            - red
          matchingType: InUserFilters
      additionalProperties:
        $ref: "#/components/schemas/query-rules-v2-SingleTextFiltersSchema"
    query-rules-v2-SingleTextFiltersSchema:
      type: object
      description: Values and a matching type for a single text attribute. The name of this object must be the same as the name of the attribute.
      properties:
        values:
          type: array
          description: An array of strings to match the attribute value with
          items:
            type: string
        matchingType:
          $ref: "#/components/schemas/query-rules-v2-ConditionsFiltersMatchingType"
    query-rules-v2-ConditionsRangeFiltersSchema:
      type: object
      description: Condition filters for range attributes
      example:
        price:
          ranges:
            - rightEnd:
                value: 20
                inclusive: true
          matchingType: Exact
      additionalProperties:
        $ref: "#/components/schemas/query-rules-v2-SingleRangeFiltersSchema"
    query-rules-v2-SingleRangeFiltersSchema:
      type: object
      description: Ranges and a matching type for a single range attribute. The name of this object must be the same as the name of the attribute.
      properties:
        ranges:
          type: array
          description: An array of ranges to match the attribute value with.
          items:
            type: object
            properties:
              leftEnd:
                description: Lower boundary of the range. If not defined (this object is not sent at all), defaults to infinity.
                allOf:
                  - $ref: "#/components/schemas/query-rules-v2-RangeEndSchema"
              rightEnd:
                description: Upper boundary of the range. If not defined (this object is not sent at all), defaults to infinity.
                allOf:
                  - $ref: "#/components/schemas/query-rules-v2-RangeEndSchema"
        matchingType:
          $ref: "#/components/schemas/query-rules-v2-ConditionsFiltersMatchingType"
    query-rules-v2-ConditionsDatetimeFiltersSchema:
      type: object
      description: Condition filters for datetime attributes
      example:
        created:
          ranges:
            - rightEnd:
                value: 2024-01-01
                inclusive: true
          matchingType: Exact
      additionalProperties:
        $ref: "#/components/schemas/query-rules-v2-SingleDatetimeFiltersSchema"
    query-rules-v2-SingleDatetimeFiltersSchema:
      type: object
      description: Ranges and a matching type for a single datetime attribute. The name of this object must be the same as the name of the attribute.
      properties:
        ranges:
          type: array
          description: An array of ranges to match the attribute value with.
          items:
            type: object
            properties:
              leftEnd:
                description: Lower boundary of the range. If not defined (this object is not sent at all), defaults to infinity.
                allOf:
                  - $ref: "#/components/schemas/query-rules-v2-DatetimeEndSchema"
              rightEnd:
                description: Upper boundary of the range. If not defined (this object is not sent at all), defaults to infinity.
                allOf:
                  - $ref: "#/components/schemas/query-rules-v2-DatetimeEndSchema"
        matchingType:
          $ref: "#/components/schemas/query-rules-v2-ConditionsFiltersMatchingType"
    query-rules-v2-ConditionsFiltersMatchingType:
      type: string
      description: |
        Match logic of the filters for a given attribute. Condition filters and customer search filters are compared as mathematical sets.

        - `Exact`: the customer's search filters must be exactly the same as this condition filter.
        - `ContainsUserFilters`: this condition filter must contain all the customer's search filters (but can also contain other filters).
        - `InUserFilters`: the customer's search filter must contain all of this condition filter (but can also contain other filters)
        - `NonEmptyIntersectionWithUserFilters`: at least one of the customer's search filters must match a value from this condition filter.

        **Example:**:

        - The customer's filters are `color == "green" OR color == "white" OR color == "red"`.
        - The condition filter is `color == ["green","red"]`.

        The result is:
        - `Exact`: does not match, the sets are different.
        - `ContainsUserFilters`: does not match, some customer filters are not included in the condition filters
        - `InUserFilters`: matches, `"green"` and `"red"` are included in `["green","white","red"]`.
        - `NonEmptyIntersectionWithUserFilters`: matches, there is at least one common element
      enum:
        - Exact
        - ContainsUserFilters
        - InUserFilters
        - NonEmptyIntersectionWithUserFilters
    query-rules-v2-RangeEndSchema:
      type: object
      properties:
        value:
          type: number
          description: Numerical value
        inclusive:
          type: boolean
          description: If TRUE, `<` becomes `<=` and `>` becomes `>=`.
    query-rules-v2-DatetimeEndSchema:
      type: object
      properties:
        value:
          type: string
          description: ISO datetime value
        inclusive:
          type: boolean
          description: If TRUE, `<` becomes `<=` and `>` becomes `>=`.
    query-rules-v2-BoostFilters:
      type: array
      description: Filters that boost the results
      items:
        type: object
        properties:
          weight:
            type: integer
            description: |
              The boost percentage. Positive values boost scores of results that match
              the provided filters. Negative values demotes scores of matching items.
            minimum: -100
            maximum: 100
            not:
              enum:
                - 0
          filters:
            $ref: "#/components/schemas/query-rules-v2-RuleFilters"
    query-rules-v2-TopHitsFilters:
      type: array
      description: Filters that move a specified number of items to the front
      items:
        type: object
        properties:
          hitsNumber:
            type: integer
            description: |
              Number of top-scoring items that match the provided filters 
              and will be moved to the front of the results
            minimum: 1
            maximum: 20
          filters:
            $ref: "#/components/schemas/query-rules-v2-RuleFilters"
    query-rules-v2-DistinctFilter:
      type: object
      required:
        - attribute
        - maxNumItems
      description: Distinct filter definition
      properties:
        attribute:
          type: string
          description: Name of the attribute for distinct filter
        maxNumItems:
          type: integer
          description: Max number of items having the same attribute value
        categoryLevelModifier:
          type: integer
          description: Category level modifier to use with `category` attribute
    query-rules-v2-RuleFilters:
      type: object
      description: Filters for the query
      properties:
        textFilters:
          type: array
          description: Text-type filters
          items:
            type: object
            properties:
              attribute:
                type: string
                description: Attribute to be filtered
                example: brand
              mode:
                type: string
                description: |
                  Information whether to include or exclude filtered results.

                  - `include`: includes filtered results
                  - `exclude`: excludes filtered results
                enum:
                  - include
                  - exclude
                example: include
            oneOf:
              - properties:
                  values:
                    type: array
                    description: Values to be used during filtering. May contain both strings and patterns.
                    example:
                      - A-Brand
                      - B-Brand
                      - "{brand}"
                    items:
                      type: string
              - properties:
                  aggregateId:
                    type: string
                    description: Uuid of an aggregate to be used during filtering.
                    example: 32be9640-37e5-3196-abb6-6dc192002dab
              - properties:
                  expressionId:
                    type: string
                    description: Uuid of an expression to be used during filtering.
                    example: ad29ff7a-7148-4a5c-8a2a-4491e3ae7e9d
        rangeFilters:
          type: array
          description: Range-type filters
          items:
            type: object
            properties:
              attribute:
                type: string
                description: Attribute to be filtered
                example: price
              operator:
                type: string
                description: |
                  Operator to be used during filtering.

                  - `gt`: greater than
                  - `gte`: greater or equal
                  - `lt`: less than
                  - `lte`: less than or equal
                  - `eq`/`neq`: equal/not equal
                enum:
                  - gt
                  - gte
                  - lt
                  - lte
                  - eq
                  - neq
            oneOf:
              - properties:
                  value:
                    description: Value to use during filtering
                    oneOf:
                      - type: string
                        description: Placeholder value to use during filtering. The placeholder must be included in all of the patterns defined in the `conditions` object.
                        example: "{price}"
                      - type: number
                        format: float
                        description: Float value to use during filtering
                        example: 19.99
              - properties:
                  aggregateId:
                    type: string
                    description: Uuid of an aggregate to be used during filtering.
                    example: 32be9640-37e5-3196-abb6-6dc192002dab
              - properties:
                  expressionId:
                    type: string
                    description: Uuid of an expression to be used during filtering.
                    example: ad29ff7a-7148-4a5c-8a2a-4491e3ae7e
        datetimeFilters:
          type: array
          description: Range-type datetime filters
          items:
            type: object
            properties:
              attribute:
                type: string
                description: Attribute to be filtered
                example: created
              operator:
                type: string
                description: |
                  Operator to be used during filtering.

                  - `gt`: greater than
                  - `gte`: greater or equal
                  - `lt`: less than
                  - `lte`: less than or equal
                  - `eq`/`neq`: equal/not equal
                enum:
                  - gt
                  - gte
                  - lt
                  - lte
                  - eq
                  - neq
            oneOf:
              - properties:
                  value:
                    description: Value to use during filtering
                    oneOf:
                      - type: string
                        description: Placeholder value to use during filtering. The placeholder must be included in all of the patterns defined in the `conditions` object.
                        example: "{created}"
                      - type: string
                        description: ISO datetime value to use during filtering
                        example: 2024-01-01T00:00:00Z
              - properties:
                  aggregateId:
                    type: string
                    description: Uuid of an aggregate to be used during filtering.
                    example: 32be9640-37e5-3196-abb6-6dc192002dab
              - properties:
                  expressionId:
                    type: string
                    description: Uuid of an expression to be used during filtering.
                    example: ad29ff7a-7148-4a5c-8a2a-4491e3ae7e
              - properties:
                  relativeValue:
                    $ref: "#/components/schemas/query-rules-v2-RelativeDatetime"
    query-rules-v2-RelativeDatetime:
      type: object
      required:
        - value
        - unit
      properties:
        value:
          type: integer
          description: The numerical duration value.
        unit:
          type: string
          description: The unit of duration.
          enum:
            - seconds
            - minutes
            - hours
            - days
      example:
        value: 2
        unit: days
    query-rules-v2-PositionStrategy:
      oneOf:
        - $ref: "#/components/schemas/query-rules-v2-ManualType"
        - $ref: "#/components/schemas/query-rules-v2-CustomType"
        - $ref: "#/components/schemas/query-rules-v2-AscendingType"
      discriminator:
        propertyName: type
        mapping:
          manual: "#/components/schemas/query-rules-v2-ManualType"
          custom: "#/components/schemas/query-rules-v2-CustomType"
          ascending: "#/components/schemas/query-rules-v2-AscendingType"
      example:
        type: custom
    query-rules-v2-ManualType:
      type: object
      properties:
        type:
          type: string
          enum:
            - manual
          example: manual
      required:
        - type
      additionalProperties: false
    query-rules-v2-CustomType:
      type: object
      properties:
        type:
          type: string
          enum:
            - custom
          example: custom
      required:
        - type
      additionalProperties: false
    query-rules-v2-AscendingType:
      type: object
      properties:
        type:
          type: string
          enum:
            - ascending
          example: ascending
        start:
          type: integer
          example: 1
        step:
          type: integer
          example: 2
      required:
        - type
        - start
        - step
      additionalProperties: false
    recommendation-campaigns-CrossWorkspaceMode:
      type: object
      properties:
        enabled:
          type: boolean
          description: Specifies if campaign should support multibrand cross workspace segmentation.
    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-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-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-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-MetricsRecommendationsCampaignParameters:
      allOf:
        - $ref: "#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters"
        - type: object
          properties:
            personalizedBoostingStrength:
              $ref: "#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength"
          required:
            - sortMetric
    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-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-SectionRecommendationsCampaignParameters:
      allOf:
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationsCampaignParameters"
        - type: object
          properties:
            metadataCatalogId:
              type: string
    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-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-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-ItemsCatalogId:
      type: string
      description: Only items from this catalog will be recommended.
    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-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-SlotName:
      type: string
      description: Slot name
    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-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-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-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-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-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-CampaignTitle:
      type: string
      description: Campaign title
    recommendation-campaigns-CampaignTypeSimilar:
      type: string
      description: Campaign type
      enum:
        - similar
    recommendation-campaigns-CampaignTypeCrossSell:
      type: string
      description: Campaign type
      enum:
        - cross-sell
    recommendation-campaigns-CampaignTypeComplementary:
      type: string
      description: Campaign type
      enum:
        - set-complement
    recommendation-campaigns-CampaignTypeLastViewed:
      type: string
      description: Campaign type
      enum:
        - last-viewed
    recommendation-campaigns-CampaignTypeMetrics:
      type: string
      description: Campaign type
      enum:
        - metrics
    recommendation-campaigns-CampaignTypePersonalized:
      type: string
      description: Campaign type
      enum:
        - personalized
    recommendation-campaigns-CampaignTypeVisuallySimilar:
      type: string
      description: Campaign type
      enum:
        - visually-similar
    recommendation-campaigns-CampaignTypeItemComparison:
      type: string
      description: Campaign type
      enum:
        - item-comparison
    recommendation-campaigns-CampaignTypeRecentInteractions:
      type: string
      description: Campaign type
      enum:
        - recent-interactions
    recommendation-campaigns-CampaignTypeSection:
      type: string
      description: Campaign type
      enum:
        - section
    recommendation-campaigns-CampaignTypeAttribute:
      type: string
      description: Campaign type
      enum:
        - attribute
    recommendation-campaigns-CampaignTypeNextInteraction:
      type: string
      description: Campaign type
      enum:
        - next-interaction
    recommendation-campaigns-CampaignTypeExternalItems:
      type: string
      description: Campaign type
      enum:
        - external-items
    recommendation-campaigns-CampaignDescription:
      type: string
      description: Campaign description
    recommendation-campaigns-EndDate:
      type: string
      description: End date for the campaign
    recommendation-campaigns-StartDate:
      type: string
      description: Start date for the campaign
    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-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-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-State:
      type: string
      description: Campaign status
      enum:
        - draft
        - active
        - paused
        - deleted
    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-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-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-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-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-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-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-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-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-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-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-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-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-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-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
    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-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-RecommendationCampaignUpdateRequest:
      oneOf:
        - $ref: "#/components/schemas/recommendation-campaigns-RecommendationCampaignDefinitionV2"
        - $ref: "#/components/schemas/recommendation-campaigns-RecommendationCampaignUpdateFromAnotherCampaign"
    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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-RecommendationStateChangeResponseV2:
      type: array
      description: Array of updated campaigns IDs.
      items:
        type: string
    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-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-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-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-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-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-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-CampaignTitle:
      type: string
      description: Title of the campaign used in the preview.
      default: preview
    recommendations-api-materializer-CampaignId:
      type: string
      description: ID of the campaign used in the preview.
      default: preview
    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-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-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-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-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-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-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-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-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-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-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-RecommendationRequestItemsSourceType:
      type: string
      enum:
        - aggregate
        - expression
      description: Type of the items' source.
    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-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-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-RecommendationRequestItemsSourceId:
      type: string
      description: ID of the items' source (aggregate or expression)
    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-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-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-ItemsCatalogId:
      type: string
      description: Only items from this catalog will be recommended.
    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-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-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-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-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-CampaignTypeCrossSell:
      type: string
      description: Campaign type
      enum:
        - cross-sell
    recommendations-api-materializer-CampaignTypeSimilar:
      type: string
      description: Campaign type
      enum:
        - similar
    recommendations-api-materializer-CampaignTypeComplementary:
      type: string
      description: Campaign type
      enum:
        - set-complement
    recommendations-api-materializer-CampaignTypeLastViewed:
      type: string
      description: Campaign type
      enum:
        - last-viewed
    recommendations-api-materializer-CampaignTypeMetrics:
      type: string
      description: Campaign type
      enum:
        - metrics
    recommendations-api-materializer-CampaignTypePersonalized:
      type: string
      description: Campaign type
      enum:
        - personalized
    recommendations-api-materializer-CampaignTypeVisuallySimilar:
      type: string
      description: Campaign type
      enum:
        - visually-similar
    recommendations-api-materializer-CampaignTypeItemComparison:
      type: string
      description: Campaign type
      enum:
        - item-comparison
    recommendations-api-materializer-CampaignTypeRecentInteractions:
      type: string
      description: Campaign type
      enum:
        - recent-interactions
    recommendations-api-materializer-CampaignTypeSection:
      type: string
      description: Campaign type
      enum:
        - section
    recommendations-api-materializer-CampaignTypeAttribute:
      type: string
      description: Campaign type
      enum:
        - attribute
    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-SlotName:
      type: string
      description: Slot name
    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-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-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-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-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-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-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-SectionRecommendationsCampaignParameters:
      allOf:
        - $ref: "#/components/schemas/recommendations-api-materializer-BaseRecommendationsCampaignParameters"
        - type: object
          properties:
            metadataCatalogId:
              type: string
    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-ClientUUID:
      description: UUID of the client
      type: string
      format: uuid
    recommendations-api-materializer-Item:
      type: string
      description: ID of an entity in the item feed
    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-IncludeContextItems:
      type: boolean
      default: false
      description: The recommendation results will include context items from the request.
    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-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-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-config-CrossWorkspaceMode:
      type: object
      description: Cross-workspace mode configuration
      properties:
        enabled:
          type: boolean
          description: Whether cross-workspace mode is enabled
    recommendations-config-CrossWorkspaceModeStatus:
      type: object
      description: Cross-workspace mode status for a model
      properties:
        state:
          type: string
          description: |
            Cross-workspace mode state.
              - Disabled: cross-workspace mode is disabled.
              - Events: cross-workspace events are enabled.
              - Full: cross-workspace model training and events are enabled.
          enum:
            - Disabled
            - Events
            - Full
      required:
        - state
    recommendations-config-ModelEnabled:
      type: boolean
      description: "`true` when the model is enabled for this feed"
    recommendations-config-DefaultFilters:
      type: array
      deprecated: true
      description: |
        Default filters that apply to all recommendation requests from this feed and model. For syntax, see [https://hub.synerise.com/developers/iql/](https://hub.synerise.com/developers/iql/).
        This field is kept in bidirectional sync with `defaultItemFiltersConfiguration`
        - When `defaultItemFiltersConfiguration` is provided and non-empty, `defaultFilters` is automatically derived from it (the `iqlExpression` values).
        - When only `defaultFilters` is provided, `defaultItemFiltersConfiguration` is automatically derived from it. 
        - If both are provided, `defaultItemFiltersConfiguration` takes priority.
      items:
        type: string
    recommendations-config-Error:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        status:
          type: integer
          description: Status code
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
      required:
        - timestamp
        - status
        - message
    recommendations-config-SyneriseError:
      type: object
      properties:
        error:
          type: string
          description: A description of the error
        errorCode:
          type: string
          description: Synerise error code. See [API error code reference](https://developers.synerise.com/errors.html).
        httpStatus:
          type: string
          description: HTTP code of the error
        message:
          type: string
          description: A description of the error
        path:
          type: string
          description: The path to the resource where the error occurred
        status:
          type: number
          description: Internal status
        timestamp:
          type: string
          format: date-time
          description: Date and time when the problem occurred.
        requestId:
          type: string
          description: Unique ID for troubleshooting
        traceId:
          type: string
          description: Unique ID for troubleshooting
    recommendations-config-ItemsCreatedAt:
      type: string
      format: date-time
      description: Time of catalog creation, ISO 8601
    recommendations-config-ItemsUpdatedAt:
      type: string
      format: date-time
      description: Time of the last successful item update, ISO 8601
    recommendations-config-ModelsSchema:
      description: Model configurations for this feed
      type: object
      properties:
        complementToSet:
          $ref: "#/components/schemas/recommendations-config-BasicRecommendationModelSchema"
        complementary:
          $ref: "#/components/schemas/recommendations-config-BasicRecommendationModelSchema"
        lastViewed:
          $ref: "#/components/schemas/recommendations-config-BasicRecommendationModelSchema"
        metricsBased:
          $ref: "#/components/schemas/recommendations-config-BasicRecommendationModelSchema"
        personalized:
          $ref: "#/components/schemas/recommendations-config-BasicRecommendationModelSchema"
        section:
          $ref: "#/components/schemas/recommendations-config-BasicRecommendationModelSchema"
        attribute:
          $ref: "#/components/schemas/recommendations-config-BasicRecommendationModelSchema"
        similar:
          $ref: "#/components/schemas/recommendations-config-RecommendationModelWithTrainingSchema"
        visualSimilarity:
          $ref: "#/components/schemas/recommendations-config-VisualRecommendationModelSchema"
        itemComparison:
          $ref: "#/components/schemas/recommendations-config-RecommendationModelWithTrainingSchema"
        recentInteractions:
          $ref: "#/components/schemas/recommendations-config-BasicRecommendationModelSchema"
    recommendations-config-BasicRecommendationModelSchema:
      type: object
      properties:
        enabled:
          $ref: "#/components/schemas/recommendations-config-ModelEnabled"
        defaultFilters:
          $ref: "#/components/schemas/recommendations-config-DefaultFilters"
        defaultItemFiltersConfiguration:
          $ref: "#/components/schemas/recommendations-config-DefaultItemFiltersConfiguration"
        defaultDistinctFiltersConfiguration:
          $ref: "#/components/schemas/recommendations-config-DefaultDistinctFiltersConfiguration"
    recommendations-config-RecommendationModelWithTrainingSchema:
      type: object
      properties:
        enabled:
          $ref: "#/components/schemas/recommendations-config-ModelEnabled"
        defaultFilters:
          $ref: "#/components/schemas/recommendations-config-DefaultFilters"
        defaultItemFiltersConfiguration:
          $ref: "#/components/schemas/recommendations-config-DefaultItemFiltersConfiguration"
        defaultDistinctFiltersConfiguration:
          $ref: "#/components/schemas/recommendations-config-DefaultDistinctFiltersConfiguration"
        training:
          type: object
          description: Training configuration, applicable in some models
          properties:
            fields:
              type: array
              items:
                type: string
                example: title
    recommendations-config-VisualRecommendationModelSchema:
      type: object
      properties:
        enabled:
          $ref: "#/components/schemas/recommendations-config-ModelEnabled"
        defaultFilters:
          $ref: "#/components/schemas/recommendations-config-DefaultFilters"
        defaultItemFiltersConfiguration:
          $ref: "#/components/schemas/recommendations-config-DefaultItemFiltersConfiguration"
        training:
          type: object
          description: Training configuration, applicable in some models
          properties:
            imageLink:
              type: string
            additionalImageLinks:
              type: string
            availability:
              type: string
    recommendations-config-DisplayedAttributesSchema:
      description: Attributes shown in the recommendation results
      example:
        - brand
        - color
        - title
      type: array
      items:
        type: string
    recommendations-config-LinkAttributeSchema:
      description: Name of the attribute which will be used as link to an item
      type: string
    recommendations-config-LinkAttributesSchema:
      description: Names of attributes which will be used as link to an item
      type: array
      items:
        $ref: "#/components/schemas/recommendations-config-LinkAttributeSchema"
    recommendations-config-DistinctAttributesSchema:
      description: Names of attributes which can be used in distinct filters
      type: array
      items:
        allOf:
          - type: string
    recommendations-config-PreviewAttributesSchema:
      description: Mapping of attributes which will be used for preview
      type: object
      properties:
        title:
          type: string
          description: The name of the attribute in the source catalog that stores the title.
        category:
          type: string
          description: The name of the attribute in the source catalog that stores the category.
        imageLink:
          type: string
          description: The name of the attribute in the source catalog that stores the item's image link.
        itemLink:
          type: string
          description: The name of the attribute in the source catalog that stores the item's page link.
        price:
          type: string
          description: The name of the attribute in the source catalog that stores the item's price.
        additionalAttributes:
          type: object
          description: Other parameter mappings
          additionalProperties:
            type: string
    recommendations-config-RecommendationModelStateSchema:
      type: object
      description: Current state of the model
      properties:
        name:
          type: string
          description: |
            State name.
              - ServingDisabled: the model wasn't enabled in the configuration.
              - Active: the model is active and working.
              - NotEnoughData: the model can't be trained because there aren't enough events in the database.
              - TrainingInProgress: the model is currently being trained.
              - TrainingDisabled: the model didn't receive any requests in 30 days and isn't scheduled for training. It can still accept requests and return a recommendation. If a request to the model is made, training is re-enabled.
              - Inactive: the model didn't receive any requests for 60 days and was deactivated. It must be re-enabled in the configuration.
          enum:
            - ServingDisabled
            - TrainingDisabled
            - TrainingInProgress
            - NotEnoughData
            - Active
            - Inactive
        cause:
          type: string
          description: The cause of the transition into the current state
          enum:
            - Inactivity
        changedAfterNumOfDays:
          type: number
          description: The number of days after which a model was transitioned to the `TrainingDisabled` or `ServingDisabled` state.
      required:
        - name
    recommendations-config-RecommendationRequirements:
      type: object
      description: Model requirements
      properties:
        lastCheckDate:
          type: string
          format: date-time
          description: Date and time when the requirements were last checked.
        minimal:
          type: array
          description: Minimum requirements of the model type
          items:
            $ref: "#/components/schemas/recommendations-config-RecommendationSingleRequirement"
        recommended:
          type: array
          description: Recommended requirements of the model type
          items:
            $ref: "#/components/schemas/recommendations-config-RecommendationSingleRequirement"
    recommendations-config-DefaultDistinctFiltersConfiguration:
      description: Default distinct filters configuration that can be applied to a specific campaign slot.
      type: object
      properties:
        filters:
          description: List of default distinct filters.
          type: array
          items:
            $ref: "#/components/schemas/recommendations-config-DistinctFilterConfigEntry"
        elastic:
          description: Specify if default distinct filters are elastic.
          type: boolean
    recommendations-config-DefaultItemFiltersConfiguration:
      description: |
        Default item filters configuration that apply to all recommendation campaigns.
        This field is kept in bidirectional sync with `defaultFilters`.
        - When this field is provided and non-empty, it takes priority and `defaultFilters` is derived from the `iqlExpression` values.
        - When only `defaultFilters` is provided, this field is automatically populated from it. This format supports additional metadata such as `description` per filter entry.
      type: object
      properties:
        filters:
          description: List of individual default item filters.
          type: array
          items:
            $ref: "#/components/schemas/recommendations-config-ItemFilterConfigEntry"
    recommendations-config-DistinctFilterConfigEntry:
      type: object
      properties:
        field:
          type: string
          description: Name of the attribute for distinct filter
        levelRangeModifier:
          type: integer
          description: |
            If the attribute is `category`, you can manipulate how many levels of the category are used for filtering by removing levels from the left (highest levels) or right (lowest levels) of the category chain.     
            For example, if the category is `A > B > C > D`
            - using `1` changes the category to `A > B > C`
            - using `-1` changes the category to `B > C > D`
        maxNumItems:
          type: integer
          description: The maximum number of items which can have the same attribute value
        description:
          type: string
          maxLength: 300
          description: Human-readable description of the default distinct filter, cannot be longer than 300 characters.
    recommendations-config-ItemFilterConfigEntry:
      type: object
      properties:
        iqlExpression:
          type: string
          description: IQL expression of item filters that will be applied to all recommendation campaigns
        description:
          type: string
          maxLength: 300
          description: Human readable description of the item filter, cannot be longer than 300 characters.
    recommendations-config-RecommendationSingleRequirement:
      type: object
      properties:
        code:
          type: string
          description: Unique code of the requirement
        explanation:
          type: string
          description: Explanation of the requirement, with variables that should be replaced with with a value from `values` to display a human-readable explanation.
        isSatisfied:
          type: boolean
          description: "`true` when the requirement is satisfied."
        values:
          type: object
          description: Map of pairs (key, value) where keys in explanation field should be replaced with values. The keys correspond to the variables in in `description`, their names depend on the model type.
          additionalProperties:
            type: number
    recommendations-config-RecommendationFeedConfigurationWithModelsStateV3Schema:
      type: object
      properties:
        config:
          $ref: "#/components/schemas/recommendations-config-RecommendationCatalogConfigurationV3Schema"
        modelsState:
          $ref: "#/components/schemas/recommendations-config-RecommendationCatalogModelsStateV3ArraySchema"
    recommendations-config-RecommendationCatalogConfigurationV3Schema:
      type: object
      description: Configuration of the item feed
      properties:
        displayedAttributes:
          $ref: "#/components/schemas/recommendations-config-DisplayedAttributesSchema"
        linkAttribute:
          $ref: "#/components/schemas/recommendations-config-LinkAttributeSchema"
        linkAttributes:
          $ref: "#/components/schemas/recommendations-config-LinkAttributesSchema"
        models:
          $ref: "#/components/schemas/recommendations-config-ModelsV3Schema"
        itemsCreatedAt:
          $ref: "#/components/schemas/recommendations-config-ItemsCreatedAt"
        itemsUpdatedAt:
          $ref: "#/components/schemas/recommendations-config-ItemsUpdatedAt"
        crossWorkspaceMode:
          $ref: "#/components/schemas/recommendations-config-CrossWorkspaceMode"
    recommendations-config-ModelsV3Schema:
      description: Model configurations for this feed
      type: object
      properties:
        complementToSet:
          $ref: "#/components/schemas/recommendations-config-BasicRecommendationModelV3Schema"
        complementary:
          $ref: "#/components/schemas/recommendations-config-BasicRecommendationModelV3Schema"
        lastViewed:
          $ref: "#/components/schemas/recommendations-config-BasicRecommendationModelV3Schema"
        metricsBased:
          $ref: "#/components/schemas/recommendations-config-BasicRecommendationModelV3Schema"
        personalized:
          $ref: "#/components/schemas/recommendations-config-BasicRecommendationModelV3Schema"
        section:
          $ref: "#/components/schemas/recommendations-config-BasicRecommendationModelV3Schema"
        attribute:
          $ref: "#/components/schemas/recommendations-config-BasicRecommendationModelV3Schema"
        similar:
          $ref: "#/components/schemas/recommendations-config-RecommendationModelWithTrainingV3Schema"
        visualSimilarity:
          $ref: "#/components/schemas/recommendations-config-VisualRecommendationModelV3Schema"
        itemComparison:
          $ref: "#/components/schemas/recommendations-config-RecommendationModelWithTrainingV3Schema"
        recentInteractions:
          $ref: "#/components/schemas/recommendations-config-BasicRecommendationModelV3Schema"
    recommendations-config-BasicRecommendationModelV3Schema:
      type: object
      properties:
        defaultFilters:
          $ref: "#/components/schemas/recommendations-config-DefaultFilters"
        defaultItemFiltersConfiguration:
          $ref: "#/components/schemas/recommendations-config-DefaultItemFiltersConfiguration"
        defaultDistinctFiltersConfiguration:
          $ref: "#/components/schemas/recommendations-config-DefaultDistinctFiltersConfiguration"
    recommendations-config-RecommendationModelWithTrainingV3Schema:
      type: object
      properties:
        defaultFilters:
          $ref: "#/components/schemas/recommendations-config-DefaultFilters"
        defaultItemFiltersConfiguration:
          $ref: "#/components/schemas/recommendations-config-DefaultItemFiltersConfiguration"
        defaultDistinctFiltersConfiguration:
          $ref: "#/components/schemas/recommendations-config-DefaultDistinctFiltersConfiguration"
        training:
          type: object
          description: Training configuration, applicable in some models
          properties:
            fields:
              type: array
              items:
                type: string
                example: title
    recommendations-config-VisualRecommendationModelV3Schema:
      type: object
      properties:
        defaultFilters:
          $ref: "#/components/schemas/recommendations-config-DefaultFilters"
        defaultItemFiltersConfiguration:
          $ref: "#/components/schemas/recommendations-config-DefaultItemFiltersConfiguration"
        training:
          type: object
          description: Training configuration, applicable in some models
          properties:
            imageLink:
              type: string
            additionalImageLinks:
              type: string
            availability:
              type: string
    recommendations-config-RecommendationCatalogModelsStateV3ArraySchema:
      type: array
      description: Models and their states
      items:
        $ref: "#/components/schemas/recommendations-config-RecommendationModelV3Schema"
    recommendations-config-RecommendationModelV3Schema:
      type: object
      properties:
        modelType:
          type: string
          description: Model type
        enabled:
          type: boolean
          description: "`true` when the model is enabled"
        state:
          $ref: "#/components/schemas/recommendations-config-RecommendationModelStateSchema"
        requirements:
          $ref: "#/components/schemas/recommendations-config-RecommendationRequirements"
        crossWorkspaceMode:
          $ref: "#/components/schemas/recommendations-config-CrossWorkspaceModeStatus"
      required:
        - modelType
        - enabled
        - state
    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-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-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-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-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-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-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-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-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-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-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-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-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-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
    recommendations-rust-all-MetadataCatalogId:
      type: string
      description: ID of the catalog which stores attribute metadata
    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-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-NumRows:
      type: integer
      description: The number of rows in the slot.
      minimum: 1
      maximum: 10
    recommendations-rust-all-NumItems:
      type: integer
      description: The number of items in each row in the slot.
      minimum: 1
      maximum: 100
    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-MaxNumItems:
      type: integer
      description: The maximal number of returned item recommendations.
      maximum: 100
      default: 5
    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-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-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-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-ExcludePurchasedItemsSince:
      description: Limits the application of the `excludePurchasedItems` filter to a specified number of days.
      type: integer
    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-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-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-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-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
    sauth-OauthAuthBody:
      required:
        - accessToken
        - apiKey
        - uuid
      type: object
      properties:
        accessToken:
          type: string
          description: OAuth token
        apiKey:
          type: string
          description: Profile API key (same as for Profile login)
        uuid:
          $ref: "#/components/schemas/sauth-inBodyClientUuid"
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
        agreements:
          $ref: "#/components/schemas/sauth-Agreements"
        attributes:
          $ref: "#/components/schemas/sauth-Attributes"
        tags:
          $ref: "#/components/schemas/sauth-Tags"
        customId:
          type: string
          description: If `mappedExternal` is set to FALSE in OAuth settings, this field is required.
    sauth-ClientRefreshRequest:
      type: object
      required:
        - apiKey
      properties:
        apiKey:
          $ref: "#/components/schemas/sauth-ClientApiKey"
      title: ClientRefreshRequest
    sauth-JWTtoken:
      type: object
      properties:
        token:
          type: string
          description: "[JWT](https://jwt.io/) token"
    sauth-JWTtokenV3:
      type: object
      properties:
        token:
          type: string
          description: "[JWT](https://jwt.io/) token"
        expiration:
          type: integer
          example: 1649283173
        created:
          type: integer
          example: 1649277173668
        origin:
          type: string
          example: SYNERISE
        customId:
          type: string
          example: card123
        realm:
          type: string
          example: client
    sauth-BanSettingsPayload:
      type: object
      properties:
        blockingForClientEnabled:
          type: boolean
          description: When TRUE, first- and second-level bans are enabled. Permanent bans are always enabled.
        firstBanCollectingTime:
          type: integer
          format: int32
          description: |
            Time in seconds. If a Profile fails to log in too many times during this time, the account is banned. The number of login attempts is defined in `firstBanThreshold` and the duration is defined in `firstBanDuration`.

            **Note:** The timer starts at the first login attempt and is common for first-level, second-level, and permanent bans.
        firstBanDuration:
          type: integer
          format: int32
          description: Duration of the first-level ban in seconds. The first-level ban is applied to a Profile's identifier and cancelled after a successful password reset.
        firstBanThreshold:
          type: integer
          format: int32
          description: The number of failed login attempts before the first-level ban is applied.
        secondBanCollectingTime:
          type: integer
          format: int32
          description: |
            Time in seconds. If a Profile fails to log in too many times during this time, the account is banned. The number of login attempts is defined in `secondBanThreshold` and the duration is defined in `secondBanDuration`.

            **Note:** The timer starts at the first login attempt and is common for first-level, second-level, and permanent bans.
        secondBanDuration:
          type: integer
          format: int32
          description: Duration of the second-level ban in seconds. The second-level ban is applied to a Profile's identifier and cancelled after a successful password reset.
        secondBanThreshold:
          type: integer
          format: int32
          description: The number of failed login attempts before the second-level ban is applied.
        permanentBanCollectingTime:
          type: integer
          format: int32
          description: |
            Time in seconds. If a Profile fails to log in too many times during this time, the account is banned. The number of login attempts is defined in `permanentBanThreshold` and the duration is defined in `permanentBanDuration`.

            **Note:** The timer starts at the first login attempt and is common for first-level, second-level, and permanent bans.
        permanentBanDuration:
          type: integer
          format: int32
          description: Duration of the permanent ban in seconds. The permanent ban is applied to an IP address and cancelled after a successful password reset.
        permanentBanThreshold:
          type: integer
          format: int32
          description: The number of failed login attempts before the permanent ban is applied.
    sauth-ClientActivationResendRequest:
      type: object
      properties:
        email:
          type: string
          description: Email address
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
        uuid:
          type: string
          description: UUID of the Client
    sauth-AuthenticationRequestV2_and_3:
      type: object
      required:
        - apiKey
        - identityProvider
      properties:
        apiKey:
          $ref: "#/components/schemas/sauth-ClientApiKey"
        identityProvider:
          type: string
          description: The identity provider.
          enum:
            - SYNERISE
            - FACEBOOK
            - OAUTH
            - APPLE
            - GOOGLE
            - UNKNOWN
        identityProviderToken:
          $ref: "#/components/schemas/sauth-AuthIdentityProviderToken"
        email:
          $ref: "#/components/schemas/sauth-AuthClientEmail"
        customId:
          $ref: "#/components/schemas/sauth-AuthClientCustomId"
        password:
          $ref: "#/components/schemas/sauth-AuthClientPassword"
        uuid:
          $ref: "#/components/schemas/sauth-AuthClientUuid"
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
        agreements:
          $ref: "#/components/schemas/sauth-Agreements"
        attributes:
          $ref: "#/components/schemas/sauth-Attributes"
        tags:
          $ref: "#/components/schemas/sauth-Tags"
      title: AuthenticationRequestV2_and_3
    sauth-ClientEmailChangeRequest:
      type: object
      properties:
        email:
          type: string
          description: New email address
        uuid:
          $ref: "#/components/schemas/sauth-inBodyClientUuid"
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
    sauth-ClientPinActivationResendRequest:
      type: object
      properties:
        email:
          $ref: "#/components/schemas/sauth-inBodyClientEmail"
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
        uuid:
          $ref: "#/components/schemas/sauth-inBodyClientUuid"
      title: ClientPinActivationResendRequest
    sauth-PinCodeConfirmationRequest:
      type: object
      properties:
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
        email:
          $ref: "#/components/schemas/sauth-inBodyClientEmail"
        pinCode:
          type: string
          description: The PIN code received by email
        uuid:
          $ref: "#/components/schemas/sauth-inBodyClientUuid"
    sauth-LogInAsClientRequestBody:
      type: object
      properties:
        apiKey:
          $ref: "#/components/schemas/sauth-ClientApiKey"
        email:
          type: string
          description: Profile email
        password:
          type: string
          description: Profile password
        uuid:
          $ref: "#/components/schemas/sauth-inBodyClientUuid"
        deviceId:
          type: string
          description: "**Important:** deviceId is required during login if device control is enabled."
    sauth-ChangeClientPasswordRequestBody:
      type: object
      properties:
        oldPassword:
          type: string
          description: Current password
        password:
          type: string
          description: New password
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
    sauth-LogInAnonymouslyRequestBody:
      type: object
      properties:
        apiKey:
          $ref: "#/components/schemas/sauth-ClientApiKey"
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
        uuid:
          $ref: "#/components/schemas/sauth-inBodyClientUuid"
    sauth-LogInAnonymouslyV2RequestBody:
      type: object
      properties:
        apiKey:
          $ref: "#/components/schemas/sauth-ClientApiKey"
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
        uuid:
          $ref: "#/components/schemas/sauth-inBodyClientUuid"
    sauth-LogInAnonymouslyV3RequestBody:
      type: object
      required:
        - apiKey
        - uuid
      properties:
        apiKey:
          $ref: "#/components/schemas/sauth-ClientApiKey"
        uuid:
          $ref: "#/components/schemas/sauth-inBodyClientUuid"
        deviceId:
          type: string
          description: Unique iOS or Android device identifier.
    sauth-ConfirmAClientAccountRequestBody:
      type: object
      description: Activation token received by email
      properties:
        token:
          description: Activation token received by email
          type: string
    sauth-AuthenticateWithAppleRequestBody:
      type: object
      properties:
        accessToken:
          type: string
          description: Apple token
        apiKey:
          $ref: "#/components/schemas/sauth-ClientApiKey"
        uuid:
          $ref: "#/components/schemas/sauth-inBodyClientUuid"
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
        agreements:
          $ref: "#/components/schemas/sauth-Agreements"
        attributes:
          $ref: "#/components/schemas/sauth-Attributes"
        tags:
          $ref: "#/components/schemas/sauth-Tags"
    sauth-DeleteAppleClientRequestBody:
      type: object
      properties:
        accessToken:
          type: string
          description: Apple access token
        uuid:
          $ref: "#/components/schemas/sauth-inBodyClientUuid"
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
        customId:
          $ref: "#/components/schemas/sauth-inBodyClientCustomId"
    sauth-LoginWithAppleWithoutRegistrationRequestBody:
      type: object
      properties:
        accessToken:
          type: string
          description: Apple token
        apiKey:
          $ref: "#/components/schemas/sauth-ClientApiKey"
        uuid:
          $ref: "#/components/schemas/sauth-inBodyClientUuid"
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
        agreements:
          $ref: "#/components/schemas/sauth-Agreements"
        attributes:
          $ref: "#/components/schemas/sauth-Attributes"
        tags:
          $ref: "#/components/schemas/sauth-Tags"
    sauth-AuthenticateWithFacebookRequestBody:
      type: object
      properties:
        facebookToken:
          type: string
          description: Facebook authentication token
        apiKey:
          $ref: "#/components/schemas/sauth-ClientApiKey"
        uuid:
          $ref: "#/components/schemas/sauth-inBodyClientUuid"
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
        agreements:
          $ref: "#/components/schemas/sauth-Agreements"
        attributes:
          $ref: "#/components/schemas/sauth-Attributes"
        tags:
          $ref: "#/components/schemas/sauth-Tags"
    sauth-AuthenticateWithFacebookWithoutRegistrationRequestBody:
      type: object
      properties:
        facebookToken:
          type: string
          description: Facebook Authentication Token
        apiKey:
          $ref: "#/components/schemas/sauth-ClientApiKey"
        uuid:
          $ref: "#/components/schemas/sauth-inBodyClientUuid"
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
        agreements:
          $ref: "#/components/schemas/sauth-Agreements"
        attributes:
          $ref: "#/components/schemas/sauth-Attributes"
        tags:
          $ref: "#/components/schemas/sauth-Tags"
    sauth-DeleteAFacebookClientAccountRequestBody:
      type: object
      properties:
        facebookToken:
          type: string
          description: Facebook authentication token
        uuid:
          $ref: "#/components/schemas/sauth-inBodyClientUuid"
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
    sauth-DeleteAccountV2RequestBody:
      type: object
      required:
        - password
        - identityProvider
      properties:
        password:
          type: string
          description: Profile password. Only applicable if the Profile is **not** authenticated by an external identity provider.
        uuid:
          $ref: "#/components/schemas/sauth-inBodyClientUuid"
        externalToken:
          type: string
          description: External authorization token. Only applicable if the Profile is authenticated by an external identity provider.
        customId:
          type: string
          description: Custom ID of the Profile, if applicable
        identityProvider:
          type: string
          enum:
            - FACEBOOK
            - OAUTH
            - APPLE
            - SYNERISE
          description: Authorization provider
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
    sauth-ConfirmClientEmailChangeRequestBody:
      type: object
      properties:
        token:
          type: string
          format: uuid
          example: 58acd5bd-8efd-47ed-b101-32eb56e13839
          description: Token received by email
        newsletterAgreement:
          type: boolean
          description: Permission to receive email newsletters
    sauth-RequestClientEmailChangeRequestBody:
      type: object
      properties:
        email:
          type: string
          description: New email address
        password:
          type: string
          description: Profile password
        uuid:
          $ref: "#/components/schemas/sauth-inBodyClientUuid"
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
    sauth-DeleteAccountV1RequestBody:
      type: object
      properties:
        password:
          type: string
          description: Profile password
        uuid:
          type: string
          description: Profile UUID
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
    sauth-DeleteOauthClientRequestBody:
      type: object
      properties:
        accessToken:
          type: string
          description: OAuth access token
        uuid:
          $ref: "#/components/schemas/sauth-inBodyClientUuid"
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
        customId:
          $ref: "#/components/schemas/sauth-inBodyClientCustomId"
    sauth-RegisterAClientRequestBody:
      type: object
      properties:
        email:
          $ref: "#/components/schemas/sauth-inBodyClientEmail"
        password:
          type: string
          description: Password for the Profile
        phone:
          $ref: "#/components/schemas/sauth-inBodyClientPhone"
        customId:
          $ref: "#/components/schemas/sauth-inBodyClientCustomId"
        firstName:
          $ref: "#/components/schemas/sauth-inBodyClientFirstName"
        lastName:
          $ref: "#/components/schemas/sauth-inBodyClientLastName"
        displayName:
          $ref: "#/components/schemas/sauth-inBodyClientDisplayName"
        uuid:
          $ref: "#/components/schemas/sauth-inBodyClientUuid"
        avatarUrl:
          $ref: "#/components/schemas/sauth-inBodyClientAvatarUrl"
        whatsAppId:
          type: string
          description: WhatsApp identifier of the Profile
          maxLength: 255
        birthDate:
          $ref: "#/components/schemas/sauth-inBodyClientBirthDate"
        company:
          $ref: "#/components/schemas/sauth-inBodyClientCompany"
        city:
          $ref: "#/components/schemas/sauth-inBodyClientCity"
        address:
          $ref: "#/components/schemas/sauth-inBodyClientAddress"
        zipCode:
          $ref: "#/components/schemas/sauth-inBodyClientZipCode"
        province:
          $ref: "#/components/schemas/sauth-inBodyClientProvince"
        countryCode:
          $ref: "#/components/schemas/sauth-inBodyClientCountryCode"
        sex:
          $ref: "#/components/schemas/sauth-inBodyClientSex"
        agreements:
          $ref: "#/components/schemas/sauth-Agreements"
        attributes:
          $ref: "#/components/schemas/sauth-Attributes"
        tags:
          $ref: "#/components/schemas/sauth-Tags"
    sauth-TemplateSettingsData:
      type: object
      properties:
        clientEmailChangeRequestMailSubject:
          type: string
          description: Subject of the email change confirmation email. This is sent to the new address.
        clientEmailChangeRequestMailBody:
          nullable: true
          type: string
          description: HTML body of the email change confirmation email. All `"` characters must be escaped and all the code must be a single line. This is sent to the new address.
        clientEmailChangeRequestMailTemplateId:
          nullable: true
          type: string
          description: ID of the email change confirmation email body template. This email is sent to the new address. If you use a template, it overrides the content sent in `clientEmailChangeRequestMailBody`.
        clientEmailChangeNotificationMailSubject:
          type: string
          description: Subject of the email change notification email. This is sent to the current address.
        clientEmailChangeNotificationMailBody:
          nullable: true
          type: string
          description: HTML body of the email change notification email. All `"` characters must be escaped and all the code must be a single line. This is sent to the current address.
        clientEmailChangeNotificationMailTemplateId:
          nullable: true
          type: string
          description: ID of the email change notification email template. This email is sent to the current address. If you use a template, it overrides the content sent in `clientEmailChangeNotificationMailBody`.
      title: TemplateSettingsData
    sauth-ClientLogoutRequest:
      type: object
      properties:
        action:
          type: string
          enum:
            - LOGOUT
            - LOGOUT_WITH_SESSION_CLEARING
    sauth-DeviceControlSettingsPayload:
      type: object
      properties:
        deviceControlMode:
          type: string
          description: |
            Defines the type of device authorization.

            - OFF: No device authorization.
            - SOFT: The Profile is notified about logins from a new device, but the access is not blocked.
            - HARD: Login attempts from the new device are blocked until the Profile authorizes the device with the link or token received by email.
            - CONDITIONAL_BASED_ON_LOCATION: If a Profile logs in from a new device in Poland, they receive a notification (same as with SOFT setting). If the new device is outside of Poland, it must be authorized with a link or token received by email (same as with HARD setting). Other countries will be supported in the future.
          enum:
            - OFF
            - SOFT
            - HARD
            - CONDITIONAL_BASED_ON_LOCATION
        hardMailBody:
          type: string
          description: HTML body of the device authorization email for hard mode. All `"` characters must be escaped and all the code must be a single line.
        hardMailTitle:
          type: string
          description: Subject of the device authorization email for hard mode.
        hardTemplateId:
          type: string
          description: ID of the device authorization email template for hard mode. If you use a template, it overrides the content sent in `hardMailBody`.
        softMailBody:
          type: string
          description: HTML body of the device authorization email for soft mode. All `"` characters must be escaped and all the code must be a single line.
        softMailTitle:
          type: string
          description: Subject of the device authorization email for soft mode.
        softTemplateId:
          type: string
          description: ID of the device authorization email template for soft mode. If you use a template, it overrides the content sent in `softMailBody`.
        deviceUnlockSuccessRedirectUrl:
          type: string
        deviceUnlockAlreadyConfirmedRedirectUrl:
          type: string
    sauth-AppleAuthSettingsPayload:
      type: object
      properties:
        enabled:
          type: boolean
          description: Defines if Sign in with Apple is enabled in this workspace.
        bundle:
          type: string
          description: Name of your application package
          example: com.synerise.sdk.sample-swift
    sauth-GenericClientEmailChangeRequest:
      type: object
      required:
        - email
        - uuid
      properties:
        email:
          description: New email address
          type: string
        externalToken:
          type: string
          description: External authorization token. Only applicable if the Profile is authenticated by an external identity provider.
        password:
          type: string
          description: Profile password. Only applicable if the Profile is **not** authenticated by an external identity provider.
        uuid:
          $ref: "#/components/schemas/sauth-inBodyClientUuid"
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
        customId:
          type: string
          description: Custom ID of the Profile, if applicable
      title: GenericClientEmailChangeRequest
    sauth-GeneralSettingsData:
      type: object
      required:
        - tokenLifetimeInSeconds
      properties:
        tokenLifetimeInSeconds:
          $ref: "#/components/schemas/sauth-TokenLifetimeInSeconds"
        voucherPoolUuid:
          $ref: "#/components/schemas/sauth-VoucherPoolUuid"
        allowOverwriteCustomIdentify:
          $ref: "#/components/schemas/sauth-AllowOverwriteCustomIdentify"
        allowOverwriteExternalId:
          $ref: "#/components/schemas/sauth-AllowOverwriteExternalId"
        allowEmailChangeFromWebForm:
          $ref: "#/components/schemas/sauth-AllowEmailChangeFromWebForm"
        allowToPassCustomIdentifyWithVoucherPool:
          $ref: "#/components/schemas/sauth-AllowToPassCustomIdentifyWithVoucherPool"
      title: GeneralSettingsData
    sauth-SyneriseAuthSettingsData:
      required:
        - enabled
        - registrationType
      type: object
      properties:
        enabled:
          type: boolean
        registrationType:
          $ref: "#/components/schemas/sauth-RegistrationType"
        pinConfirmationType:
          type: string
          default: ON_CONFLICT_WITH_EXTERNAL_ACCOUNT
          enum:
            - EVERYONE
            - ON_CONFLICT_WITH_EXTERNAL_ACCOUNT
          description: Defines if PIN confirmation (if enabled) is required for all new accounts or only if there is a conflict with an existing account registered by using third-party Identity Providers.
        pinConfirmationLength:
          type: integer
          description: The number of characters in the PIN
          default: 6
        pinConfirmationValidInSeconds:
          type: integer
          default: 300
          description: TTL of the PIN code before it expires and cannot be used
        allowPinResendFromDifferentDeviceId:
          type: boolean
          default: false
          description: |
            When TRUE, a PIN email re-send can be requested from a different device than the last device that requested a PIN email.

            **NOTE:** Regardless of this setting, the activation request can only be sent from the last device that requested a PIN email.
        confirmationRedirectLink:
          $ref: "#/components/schemas/sauth-ConfirmationRedirectLink"
        confirmationMailSubject:
          type: string
          description: Subject of the account activation email
        confirmationMailBody:
          nullable: true
          type: string
          description: HTML body of the account activation email. All `"` characters must be escaped and all the code must be a single line.
        confirmationMailTemplateId:
          nullable: true
          type: string
          description: ID of the account activation email body template. If you use a template, it overrides the content sent in `confirmationMailBody`.
        passwordResetMailTemplateId:
          nullable: true
          type: string
          description: ID of the password reset confirmation email body template
        passwordResetMailSubject:
          type: string
          description: Subject of the password reset confirmation email
        passwordResetMailBody:
          nullable: true
          type: string
          description: HTML body of the password reset confirmation email. All `"` characters must be escaped and all the code must be a single line.
        pinConfirmationMailSubject:
          type: string
          description: Subject of the email with the PIN needed to confirm an account.
        pinConfirmationMailBody:
          nullable: true
          type: string
          description: HTML body of the email with the PIN needed to confirm an account. All `"` characters must be escaped and all the code must be a single line. The PIN code is inserted using the `{{ pin_code }}` Jinjava insert.
        pinConfirmationMailTemplateId:
          nullable: true
          type: string
          description: ID of the template for the email with the PIN needed to confirm an account. If you use a template, it overrides the content sent in `pinConfirmationMailBody`.
        maxLength:
          type: integer
          format: int32
          description: Maximum length of the password
        minLength:
          type: integer
          format: int32
          description: Minimum length of the password
        requireAtLeastOneLowercaseLetter:
          type: boolean
          description: When TRUE, the password must include at least one lowercase letter.
          default: false
        requireAtLeastOneNonAlphaNumericCharacter:
          type: boolean
          description: When TRUE, the password must include at least one non-alphanumeric character.
          default: false
        requireAtLeastOneNumber:
          type: boolean
          description: When TRUE, the password must include at least one number.
          default: false
        requireAtLeastOneUppercaseLetter:
          type: boolean
          description: When TRUE, the password must include at least one uppercase letter.
          default: false
    sauth-GoogleOauthSettingsPayload:
      required:
        - enabled
      type: object
      properties:
        enabled:
          type: boolean
    sauth-FacebookOauthSettingsPayload:
      required:
        - enabled
      type: object
      properties:
        enabled:
          type: boolean
    sauth-OauthSettingsRequest:
      anyOf:
        - type: object
          title: "Mode: SERVER"
          properties:
            enabled:
              type: boolean
            mode:
              $ref: "#/components/schemas/sauth-OauthMode"
            name:
              $ref: "#/components/schemas/sauth-OauthName"
            endpoint:
              $ref: "#/components/schemas/sauth-OauthEndpoint"
            headers:
              $ref: "#/components/schemas/sauth-OauthHeaders"
            mapping:
              $ref: "#/components/schemas/sauth-OauthMapping"
            mappedExternal:
              $ref: "#/components/schemas/sauth-OauthMappedExternal"
            syncDataOnLogin:
              $ref: "#/components/schemas/sauth-OauthSyncDataOnLogin"
        - type: object
          title: "Mode: JWT_TOKEN"
          properties:
            enabled:
              type: boolean
            mode:
              $ref: "#/components/schemas/sauth-OauthMode"
            name:
              $ref: "#/components/schemas/sauth-OauthName"
            jwkEndpoint:
              $ref: "#/components/schemas/sauth-OauthJwkEndpoint"
            mapping:
              $ref: "#/components/schemas/sauth-OauthMapping"
            mappedExternal:
              $ref: "#/components/schemas/sauth-OauthMappedExternal"
            syncDataOnLogin:
              $ref: "#/components/schemas/sauth-OauthSyncDataOnLogin"
            validation:
              $ref: "#/components/schemas/sauth-OauthValidation"
    sauth-OauthSettingsResponse:
      type: object
      properties:
        enabled:
          type: boolean
        mode:
          $ref: "#/components/schemas/sauth-OauthMode"
        endpoint:
          $ref: "#/components/schemas/sauth-OauthEndpoint"
        jwkEndpoint:
          $ref: "#/components/schemas/sauth-OauthJwkEndpoint"
        headers:
          $ref: "#/components/schemas/sauth-OauthHeaders"
        mapping:
          $ref: "#/components/schemas/sauth-OauthMapping"
        name:
          $ref: "#/components/schemas/sauth-OauthName"
        mappedExternal:
          $ref: "#/components/schemas/sauth-OauthMappedExternal"
        syncDataOnLogin:
          $ref: "#/components/schemas/sauth-OauthSyncDataOnLogin"
        validation:
          $ref: "#/components/schemas/sauth-OauthValidation"
    sauth-OauthName:
      type: string
      description: Name of the integration
    sauth-OauthMode:
      type: string
      enum:
        - JWT_TOKEN
        - SERVER
      description: |
        The mode of authentication:

        - SERVER: Your OAuth server returns a token to the client device; the client device passes it to the Synerise backend; Synerise backend verifies the token with your OAuth backend
        - JWT_TOKEN: Your OAuth server returns a JWT to the client device; the client device passes it to the Synerise backend; the Synerise backends verifies it with the provided JWK. This mode requires fewer resources from your backend.
    sauth-OauthJwkEndpoint:
      type: string
      description: |
        URL of the JWK when the `JWT_TOKEN` mode is selected.  
        If you want to pass the token from your backend in the URL, use the `{{_snrs_access_token}}` insert.
    sauth-OauthEndpoint:
      type: string
      description: |
        URL of the OAuth authorization endpoint when the `SERVER` mode is selected.  
        If you want to pass the token from your backend in the URL, use the `{{_snrs_access_token}}` insert.
    sauth-OauthHeaders:
      type: object
      description: |
        'Headers for the authorization request when `SERVER` mode is selected. For example, `"X-Custom-Header": "someValue"`  
        If you want to pass the token from your backend in a header, use the `{{_snrs_access_token}}` insert'
      example:
        Content-Type: application/json
        Authorization: Bearer {{_snrs_access_token}}
        Cache-control: no-cache
      additionalProperties:
        type: string
    sauth-OauthMapping:
      type: object
      description: 'A mapping of fields from the Synerise endpoint to your OAuth endpoint. For example, if your field is called `token` and its counterpart in Synerise is `accessToken`, the mapping is `"accessToken": "token"`'
      additionalProperties:
        type: string
    sauth-OauthValidation:
      type: object
      description: A validation mapping of fields from jwt token.
      additionalProperties:
        type: string
    sauth-OauthMappedExternal:
      type: boolean
      default: true
      description: If set to FALSE, the authentication request must include the customer's `customId` in the body.
    sauth-OauthSyncDataOnLogin:
      type: boolean
      default: false
      description: When set to TRUE, profile data from an external authentication provider is uploaded into the Synerise database every time the profile logs in. When FALSE, the data is saved only the first time a profile logs in, so that the amount of data is reduced in later authentication requests.
    sauth-ConditionalAuthenticationResponse:
      type: object
      properties:
        conditions:
          type: array
          description: Reserved for future use.
          items:
            type: string
        status:
          type: string
          description: Login status. Currently, only `SUCCESS` is used.
          enum:
            - SUCCESS
            - UNAUTHORIZED
            - ACTIVATION_REQUIRED
            - REGISTRATION_REQUIRED
            - APPROVAL_REQUIRED
            - TERMS_ACCEPTANCE_REQUIRED
            - MFA_REQUIRED
        token:
          type: string
          description: "[JWT](https://jwt.io/) token"
      title: ConditionalAuthenticationResponse
    sauth-ServerAuthenticationRequestV2_and_3:
      allOf:
        - type: object
          required:
            - ipAddress
          properties:
            ipAddress:
              type: string
              description: The IP address of the client device that is logging in.
        - $ref: "#/components/schemas/sauth-AuthenticationRequestV2_and_3"
    sauth-ConditionalAuthenticationResponseV3:
      type: object
      properties:
        conditions:
          type: array
          description: Reserved for future use.
          items:
            type: string
        status:
          type: string
          description: Login status. Currently, only `SUCCESS` is used.
          enum:
            - SUCCESS
            - UNAUTHORIZED
            - ACTIVATION_REQUIRED
            - REGISTRATION_REQUIRED
            - APPROVAL_REQUIRED
            - TERMS_ACCEPTANCE_REQUIRED
            - MFA_REQUIRED
        token:
          type: string
          description: "[JWT](https://jwt.io/) token"
        expiration:
          type: integer
          example: 1649283173
        created:
          type: integer
          example: 1649277173668
        origin:
          type: string
          example: SYNERISE
        customId:
          type: string
          example: card123
        realm:
          type: string
          example: client
      title: ConditionalAuthenticationResponseV3
    sauth-ClientApiKey:
      type: string
      description: Profile (formerly "Client") API key
    sauth-AuthIdentityProviderToken:
      type: string
      description: Third-party authentication token used to authenticate with the Identity Provider. Required if `identityProvider` is different than `SYNERISE`.
    sauth-AuthClientEmail:
      type: string
      description: Profile email. Required if `identityProvider` is `SYNERISE` and email is the unique identifier (default setting).
    sauth-AuthClientPassword:
      type: string
      description: Profile password. Required if `identityProvider` is `SYNERISE`.
    sauth-AuthClientUuid:
      type: string
      description: Profile UUID. Required if `identityProvider` is `SYNERISE`.
    sauth-AuthClientCustomId:
      description: Profile customId. Required if `identityProvider` is `SYNERISE` and customId is the unique identifier (see https://hub.synerise.com/docs/settings/configuration/non-unique-emails/).
    sauth-inBodyClientCompany:
      type: string
      description: Profile's company
    sauth-inBodyClientBirthDate:
      type: string
      description: Profile's date of birth
    sauth-inBodyClientAvatarUrl:
      type: string
      nullable: true
      description: URL of the Profile's avatar picture
    sauth-inBodyClientDisplayName:
      type: string
      description: Currently unused
    sauth-inBodyClientLastName:
      type: string
      description: Profile's last name
    sauth-inBodyClientCustomId:
      type: string
      description: Profile's custom ID
    sauth-inBodyClientPhone:
      type: string
      description: Phone number of the Profile. Can only include digits, spaces, and an optional `+` at the beginning
      example: "+48111222333"
    sauth-inBodyClientEmail:
      type: string
      description: Profile's email address
    sauth-inBodyClientFirstName:
      type: string
      description: Profile's first name
    sauth-inBodyClientUuid:
      type: string
      description: UUID of the Profile
      example: 07243772-008a-42e1-ba37-c3807cebde8f
    sauth-inBodyClientDeviceId:
      type: string
      description: |
        Unique Android or iOS device ID.

        We recommend sending this attribute every time, to assign a web push registration to the device.

        Required when any form of [unknown device control](https://hub.synerise.com/docs/settings/tool/iam-for-apps/access/#unknown-device-control) is enabled.
    sauth-inBodyClientCity:
      type: string
      description: Profile's city of residence
    sauth-inBodyClientAddress:
      type: string
      description: Profile's street address
    sauth-inBodyClientZipCode:
      type: string
      description: Profile's zip code
    sauth-inBodyClientProvince:
      type: string
      description: Profile's province of residence
    sauth-inBodyClientCountryCode:
      type: string
      description: Code of Profile's country of residence (Alpha-2 code according to ISO 3166-1)
      example: PL
    sauth-inBodyClientSex:
      type: string
      description: Profile's sex
      enum:
        - FEMALE
        - MALE
        - NOT_SPECIFIED
        - OTHER
    sauth-Tags:
      type: array
      description: Tags can be used to group Profile accounts.
      items:
        type: string
    sauth-Attributes:
      type: object
      description: |
        Custom attributes (with any names)

        <strong><span style="color:red">WARNING<span></strong>: Some attributes cannot be sent in this object and will be ignored. Some of these are reserved for system use, and others must be sent as properties of the profile in the root object of the request body instead of inside the `attributes` object.

        <details><summary><span style="background:red;color:white">Click to expand the list of reserved attributes</span></summary>
        <code>email</code><br><code>id</code><br><code>clientId</code><br><code>phone</code><br><code>customId</code><br><code>uuid</code><br><code>firstName</code><br><code>lastName</code><br>
        <code>displayName</code><br><code>company</code><br><code>address</code><br><code>city</code><br><code>province</code><br><code>zipCode</code><br><code>countryCode</code><br>
        <code>birthDate</code><br><code>sex</code><br><code>avatarUrl</code><br><code>anonymous</code><br><code>agreements</code><br><code>tags</code><br><code>businessProfileId</code><br>
        <code>time</code><br><code>ip</code><br><code>source</code><br><code>newsletter_agreement</code><br><code>custom_identify</code><br><code>firstname</code><br>
        <code>lastname</code><br><code>created</code><br><code>updated</code><br><code>last_activity_date</code><br><code>birthdate</code><br><code>external_avatar_url</code><br>
        <code>displayname</code><br><code>receive_smses</code><br><code>receive_push_messages</code><br><code>receive_webpush_messages</code><br>
        <code>receive_btooth_messages</code><br><code>receive_rfid_messages</code><br><code>receive_wifi_messages</code><br><code>receive_whatsapp_messages</code><br><code>whatsapp_id</code><br>
        <code>zipCode</code><br><code>anonymous_type</code><br><code>country_id</code><br><code>geo_loc_country</code><br><code>geo_loc_isp</code><br>
        <code>geo_loc_lat</code><br><code>geo_loc_lon</code><br><code>club_card_id</code><br><code>type</code><br><code>confirmed</code><br><code>facebookId</code><br><code>deletedAt</code><br><code>deleted_unique</code><br><code>status</code><br><code>recognized</code><br><code>previous_clients</code><br><code>testProfile</code><br>
        <code>apikey</code><br><code>apiKey</code><br><code>ApiKey</code><br><code>Apikey</code><br><code>tracker</code><br><code>snr_sdk_version</code><br>
        <code>eventCreateTime</code><br><code>correlationId</code>
        </details>
      additionalProperties:
        description: Can be numbers, strings, or booleans.
    sauth-Agreements:
      description: |-
        Marketing agreements of the Profile.

        You can also pass the values as strings (`"true"`;`"TRUE"`;`"True"`/`"false"`;`"FALSE"`;`"False"`) or integers (`1` for true and `0` for false).
      type: object
      properties:
        email:
          type: boolean
          description: Permission to receive marketing information by email
          default: true
        sms:
          type: boolean
          description: Permission to receive marketing information by SMS
          default: true
        push:
          type: boolean
          description: Permission to receive push notifications
          default: true
        bluetooth:
          type: boolean
          deprecated: true
          description: This field is ignored.
          default: false
        rfid:
          type: boolean
          deprecated: true
          description: This field is ignored.
          default: false
        wifi:
          type: boolean
          deprecated: true
          description: This field is ignored.
          default: false
        whatsApp:
          type: boolean
          description: Permission to receive WhatsApp messages
          default: false
      example:
        email: true
        sms: true
        push: true
        bluetooth: false
        rfid: false
        wifi: false
    sauth-ConfirmClientpasswordresetRequest:
      required:
        - password
        - token
      type: object
      properties:
        password:
          type: string
          description: New password
        token:
          type: string
          description: Token received by email
      example:
        password: testPass1!
        token: token_from_pass_reset_req
    sauth-RequestClientpasswordresetRequest:
      required:
        - email
      type: object
      properties:
        email:
          type: string
          description: Email address where the password reset link will be sent
      example:
        email: testDoc@example.com
    sauth-ConfirmationRedirectLink:
      type: string
      default: null
      description: Redirect URL of the confirmation link
    sauth-RegistrationType:
      type: string
      description: |
        Defines the Profile account activation type.

        - REQUIRE_ACTIVATION: the account is inactive until the link in the confirmation email is accessed.
        - REQUIRE_EMAIL_CONFIRMATION: the account is active and can be used immediately, but must be confirmed using the link from the confirmation email.
        - AUTOMATIC: no activation is required
        - REQUIRE_PIN_CONFIRMATION: PIN code confirmation is required. To send the PIN by email, the email template must include the `{{pin_code}}` jinjava tag.
      enum:
        - REQUIRE_ACTIVATION
        - REQUIRE_EMAIL_CONFIRMATION
        - REQUIRE_PIN_CONFIRMATION
        - AUTOMATIC
    sauth-TokenLifetimeInSeconds:
      type: integer
      format: int64
      default: 0
      description: "The time in seconds before the authorization tokens expire. If set to `0` (default), the global Synerise setting is applied: 60 minutes."
    sauth-VoucherPoolUuid:
      type: string
      default: null
      description: UUID of the voucher pool that stores `customId` values available for assignment to new Profiles, if applicable in your implementation.
    sauth-AllowOverwriteCustomIdentify:
      type: boolean
      default: false
      description: When set to TRUE, customers' `customId` values may be modified. By default, the `customId` cannot be changed.
    sauth-AllowOverwriteExternalId:
      type: boolean
      default: false
      description: |
        When set to TRUE, a profile's `externalId` value may be modified.

        This may be useful, for example, if someone deletes their account with an external authentication provider, and then registers a new account with the same email.
        The external provider assigns a new ID and you need to allow overwriting the existing external ID in Synerise in order to link the existing profile in Synerise with the newly created account from the external provider.
    sauth-AllowEmailChangeFromWebForm:
      type: boolean
      default: false
      description: When set to TRUE, email change can be requested/confirmed using a web form.
    sauth-AllowToPassCustomIdentifyWithVoucherPool:
      type: boolean
      default: false
      description: When set to TRUE, `customId` can be provided even if `voucher pool` is configured. In this case voucher will not be assigned.
    sauth-4xx-base:
      type: object
      properties:
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
        errors:
          type: array
          description: An array of detailed error messages, if applicable
          items:
            type: object
            properties:
              code:
                type: integer
                description: Error code
              field:
                type: string
                description: Name of the field that did not pass validation
              message:
                type: string
                description: Details of the problem
              rejectedValue:
                description: The value that did not pass validation
                anyOf:
                  - type: string
                  - type: number
                  - type: integer
                  - type: boolean
                  - type: array
                    items: {}
                  - type: object
        status:
          type: integer
          format: int32
          description: Status code
        timestamp:
          type: string
          description: Time when the message was sent
        path:
          type: string
          description: URL of the requested resource
        traceId:
          type: string
          description: ID for debugging
    schema-service-generateDocumentWithIdReq:
      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"
    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-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-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-PreviewGroup:
      type: object
      required:
        - id
        - name
        - children
      properties:
        id:
          $ref: "#/components/schemas/schema-service-groupUuid"
        name:
          $ref: "#/components/schemas/schema-service-groupName"
        children:
          type: array
          description: An array of documents in the group
          items:
            $ref: "#/components/schemas/schema-service-DocumentPreviewGroup"
    schema-service-DocumentPreviewGroup:
      type: object
      description: Details of a single document
      required:
        - id
        - name
        - status
        - priority
        - children
      properties:
        id:
          $ref: "#/components/schemas/schema-service-DocumentId"
        name:
          $ref: "#/components/schemas/schema-service-DocumentName"
        status:
          $ref: "#/components/schemas/schema-service-DocumentStatus"
        priority:
          $ref: "#/components/schemas/schema-service-DocumentPriority"
        children:
          type: array
          description: Documents that are included in the body of this document
          items:
            type: object
            description: Details of a single document
            required:
              - id
              - name
              - status
              - priority
              - children
            properties:
              id:
                $ref: "#/components/schemas/schema-service-DocumentId"
              name:
                $ref: "#/components/schemas/schema-service-DocumentName"
              status:
                $ref: "#/components/schemas/schema-service-DocumentStatus"
              priority:
                $ref: "#/components/schemas/schema-service-DocumentPriority"
              children:
                type: array
                description: Documents that are included in the body of this document. This is a recursive schema, `children` may have their own `children`.
                items:
                  type: object
                  $ref: "#/components/schemas/schema-service-DocumentPreviewGroup"
    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-UpdateDocumentRequest:
      type: object
      properties:
        name:
          $ref: "#/components/schemas/schema-service-DocumentName"
        priority:
          $ref: "#/components/schemas/schema-service-DocumentPriority"
        content:
          $ref: "#/components/schemas/schema-service-documentContentRaw"
        schema:
          $ref: "#/components/schemas/schema-service-DocumentSchema"
        groupId:
          $ref: "#/components/schemas/schema-service-DocumentGroupId"
        audience:
          $ref: "#/components/schemas/schema-service-Audience"
        schedule:
          $ref: "#/components/schemas/schema-service-EntrySchedule"
        directoryId:
          $ref: "#/components/schemas/schema-service-directoryId"
    schema-service-CreateDocumentRequest:
      type: object
      required:
        - name
        - priority
        - content
        - slug
        - audience
        - directoryId
      properties:
        name:
          $ref: "#/components/schemas/schema-service-documentName"
        priority:
          $ref: "#/components/schemas/schema-service-DocumentPriority"
        content:
          $ref: "#/components/schemas/schema-service-documentContentRaw"
        slug:
          $ref: "#/components/schemas/schema-service-DocumentSlug"
        schema:
          $ref: "#/components/schemas/schema-service-DocumentSchema"
        groupId:
          $ref: "#/components/schemas/schema-service-documentGroupId"
        audience:
          $ref: "#/components/schemas/schema-service-Audience"
        schedule:
          $ref: "#/components/schemas/schema-service-EntrySchedule"
        directoryId:
          $ref: "#/components/schemas/schema-service-directoryId"
    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-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-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-identifierValue:
      type: string
      description: Value of the profile identifier selected in `identifierType` (profile ID is sent as a string)
    schema-service-screenViewId:
      type: string
      format: uuid
      description: UUID of the screen view
    schema-service-screenViewVersion:
      type: string
      description: Version of the screen view
    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-screenViewParentVersion:
      type: string
      description: If the current was created from another version, this is is the UUID of the parent version.
    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-DocumentId:
      type: string
      format: uuid
      description: UUID of the document
    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-DocumentSlug:
      type: string
      description: Slug of the document
      example: basket
      pattern: "[a-z0-9]+(?:-[a-z0-9]+)*"
    schema-service-DocumentName:
      type: string
      description: Name of the document
    schema-service-DocumentSchema:
      type: string
      description: Schema of the document (called "Type" in the Synerise Web Application)
      example: containers
    schema-service-DocumentStatus:
      type: string
      enum:
        - DRAFT
        - ACTIVE
        - SCHEDULED
        - PAUSED
        - FINISHED
      description: Filter by status
    schema-service-DocumentPriority:
      type: integer
      format: int32
      maximum: 100
      description: Priority of the document
    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-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-DocumentContent:
      type: object
      description: Content of the document
      required:
        - priority
        - content
        - slug
        - schema
      properties:
        priority:
          $ref: "#/components/schemas/schema-service-DocumentPriority"
        content:
          type: object
          description: JSON structure of the document
          additionalProperties:
            $ref: "#/components/schemas/schema-service-anyProp"
        slug:
          $ref: "#/components/schemas/schema-service-DocumentSlug"
        schema:
          $ref: "#/components/schemas/schema-service-DocumentSchema"
        groupId:
          $ref: "#/components/schemas/schema-service-DocumentGroupId"
    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-Group:
      type: object
      description: Details of the document group
      required:
        - id
        - bpId
        - name
        - createdAt
      properties:
        id:
          $ref: "#/components/schemas/schema-service-DocumentGroupId"
        name:
          type: string
          description: Name of the group
        createdAt:
          type: string
          format: date-time
          description: Date and time when the group was created
        deletedAt:
          type: string
          format: date-time
          description: Date and time when the group was deleted, if applicable
          nullable: true
        nr:
          description: The number of documents in this group with status other than FINISHED
          type: integer
          format: int32
    schema-service-DocumentGroupId:
      type: string
      format: uuid
      example: 43c97b25-4a10-45d0-99b7-d472eea2bb24
      description: UUID of the group
    schema-service-RenameDirectory:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          description: New name for the directory
    schema-service-NewDirectory:
      type: object
      required:
        - name
      properties:
        name:
          $ref: "#/components/schemas/schema-service-DirectoryName"
    schema-service-PreviewDocumentByProfile:
      type: object
      required:
        - identifierValue
        - content
      properties:
        identifierValue:
          $ref: "#/components/schemas/schema-service-identifierValue"
        content:
          $ref: "#/components/schemas/schema-service-documentContentRaw"
        params:
          type: object
          description: Additional parameters
          additionalProperties:
            $ref: "#/components/schemas/schema-service-additionalPropertiesForGenerate"
    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-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-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-Document:
      type: object
      title: Documents
      required:
        - id
        - name
        - priority
        - status
        - scheduled
        - createdAt
        - updatedAt
        - author
        - content
        - audience
      properties:
        id:
          $ref: "#/components/schemas/schema-service-DocumentId"
        name:
          $ref: "#/components/schemas/schema-service-DocumentName"
        priority:
          $ref: "#/components/schemas/schema-service-DocumentPriority"
        content:
          $ref: "#/components/schemas/schema-service-documentContentRaw"
        slug:
          $ref: "#/components/schemas/schema-service-DocumentSlug"
        schema:
          $ref: "#/components/schemas/schema-service-DocumentSchema"
        scheduled:
          $ref: "#/components/schemas/schema-service-DocumentScheduled"
        status:
          $ref: "#/components/schemas/schema-service-DocumentStatus"
        audience:
          $ref: "#/components/schemas/schema-service-Audience"
        author:
          $ref: "#/components/schemas/schema-service-Author"
        directory:
          $ref: "#/components/schemas/schema-service-Directory"
        group:
          $ref: "#/components/schemas/schema-service-Group"
        createdAt:
          $ref: "#/components/schemas/schema-service-CreatedAt"
        updatedAt:
          $ref: "#/components/schemas/schema-service-UpdatedAt"
        deletedAt:
          $ref: "#/components/schemas/schema-service-DeletedAt"
    schema-service-Author:
      type: object
      description: Author of the resource
      required:
        - id
        - name
      properties:
        id:
          type: integer
          format: int32
          description: ID of the author
        name:
          type: string
          description: Name of the author
        avatar:
          type: string
          description: URL of the author's avatar
    schema-service-DocumentsListResponse:
      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-Document"
    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-documentId:
      type: object
      required:
        - slug
      properties:
        slug:
          type: string
          description: Slug of the document
        version:
          type: string
          description: Version of the document
    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-BrickworksRecord:
      type: object
      description: Object represents brickworks record id.
      required:
        - schemaId
        - objectId
      properties:
        schemaId:
          type: string
          format: uuid
        objectId:
          type: string
    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-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-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-publishRequest:
      type: object
      required:
        - overwrite
      properties:
        overwrite:
          description: Currently unused
          type: boolean
    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-screenViewActive:
      type: boolean
      description: Defines if the screen view is active.
    schema-service-screenViewBpId:
      type: integer
      description: ID of the workspace where this screen view is saved
    schema-service-screenViewName:
      type: string
      description: Name of the screen view
    schema-service-screenViewDescription:
      type: string
      description: Description of the screen view
    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-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-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-versionedScreenViewKey:
      type: object
      properties:
        screenViewId:
          $ref: "#/components/schemas/schema-service-screenViewId"
        screenViewVersion:
          $ref: "#/components/schemas/schema-service-screenViewVersion"
    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-UpdatedAt:
      type: string
      format: date-time
      description: Last update time
    schema-service-CreatedAt:
      type: string
      description: Creation date
      format: date-time
    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-path:
      type: string
      description: Url Path.
      example: /screenView
    schema-service-DeletedAt:
      type: string
      format: date-time
      description: Deletion time, if applicable
      nullable: true
    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-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-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-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-documentsResponse:
      type: object
      properties:
        data:
          type: array
          description: A list of documents that match the request
          items:
            $ref: "#/components/schemas/schema-service-documentView"
        total:
          type: integer
          description: The total number of documents that match the request
        offset:
          type: integer
          description: The current offset
        limit:
          type: integer
          description: The maximum number of items to retrieve for pagination
    schema-service-documentView:
      type: object
      properties:
        author:
          $ref: "#/components/schemas/schema-service-documentAuthor"
        content:
          $ref: "#/components/schemas/schema-service-documentContent"
        createdAt:
          $ref: "#/components/schemas/schema-service-CreatedAt"
        description:
          $ref: "#/components/schemas/schema-service-documentDescription"
        id:
          type: integer
          description: Document ID. Generated automatically.
        isActive:
          $ref: "#/components/schemas/schema-service-documentIsActive"
        name:
          $ref: "#/components/schemas/schema-service-documentName"
        published:
          $ref: "#/components/schemas/schema-service-documentPublished"
        schema:
          $ref: "#/components/schemas/schema-service-DocumentSchema"
        slug:
          $ref: "#/components/schemas/schema-service-DocumentSlug"
        uuid:
          type: string
          format: uuid
          description: Document UUID. Generated automatically.
        version:
          $ref: "#/components/schemas/schema-service-documentVersion"
    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-documentIsActive:
      type: boolean
      description: Informs if the document is isActive
      default: true
    schema-service-documentPublished:
      type: boolean
      description: Publishing status
      default: false
    schema-service-documentAuthor:
      type: integer
      description: ID of the user who created this version of the document
    schema-service-documentName:
      type: string
      description: Document name
    schema-service-documentDescription:
      type: string
      description: Document description. Can be an empty string.
    schema-service-documentContent:
      type: object
      description: JSON content of the document
    schema-service-documentContentRaw:
      description: Content of the document. It can contain inserts.
      anyOf:
        - type: object
          example:
            someBoolean: true
            someString: Lorem ipsum
            aNestedDocument: "{% document exampleslug %}"
          additionalProperties: true
        - type: string
          example: "{% document exampleslug %}"
    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-documentGroupId:
      type: string
      format: uuid
      description: UUID of a document group. Groups can be used to organize documents. When creating a screen view campaign, entire groups can be included instead of selecting each document separately.
    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-documentVersion:
      type: string
      description: Document version
    schema-service-createDocumentReq:
      type: object
      required:
        - name
        - slug
        - schema
        - content
        - version
        - description
      properties:
        slug:
          $ref: "#/components/schemas/schema-service-DocumentSlug"
        schema:
          $ref: "#/components/schemas/schema-service-DocumentSchema"
        name:
          $ref: "#/components/schemas/schema-service-documentName"
        description:
          $ref: "#/components/schemas/schema-service-documentDescription"
        content:
          $ref: "#/components/schemas/schema-service-documentContent"
        version:
          $ref: "#/components/schemas/schema-service-documentVersion"
    schema-service-previewReq:
      type: object
      required:
        - content
      properties:
        content:
          $ref: "#/components/schemas/schema-service-documentContent"
        schema:
          $ref: "#/components/schemas/schema-service-DocumentSchema"
    schema-service-anyProp:
      description: Any JSON entity or entities
    schema-service-groupUuid:
      type: string
      format: uuid
      description: UUID of a document group
    schema-service-groupName:
      type: string
      description: Group name
    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
    synonyms-crud-Error:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        status:
          type: integer
          description: Status code
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
        path:
          type: string
          description: URL of the requested resource
      required:
        - timestamp
        - status
        - message
    synonyms-crud-PaginatedSynonyms:
      type: object
      properties:
        data:
          type: array
          description: A list of synonyms
          items:
            $ref: "#/components/schemas/synonyms-crud-SingleSynonym"
        meta:
          $ref: "#/components/schemas/synonyms-crud-PaginationMeta"
    synonyms-crud-PaginationMeta:
      type: object
      description: 'Optional pagination metadata (sent if `"includeMeta": true`)'
      properties:
        totalPages:
          type: number
          description: The total number of pages
        totalCount:
          type: number
          description: The total number of campaigns
        page:
          type: number
          description: The current page
        limit:
          type: number
          description: The maximal number of items on a page
        sortedBy:
          type: string
          description: The column (attribute) that the campaigns were sorted by
        ordering:
          type: string
          description: Sorting order
        code:
          type: number
          description: HTTP response code
        link:
          type: array
          description: Links to neighboring pages, first page, and last page in pagination
          items:
            type: object
            properties:
              url:
                description: Page URL
                type: string
              rel:
                type: string
                description: Position of the linked page
                enum:
                  - first
                  - next
                  - prev
                  - last
    synonyms-crud-SingleSynonym:
      type: object
      description: Details of a single synonym
      properties:
        id:
          $ref: "#/components/schemas/synonyms-crud-SynonymId"
        type:
          $ref: "#/components/schemas/synonyms-crud-Type"
        word:
          $ref: "#/components/schemas/synonyms-crud-Word"
        synonyms:
          $ref: "#/components/schemas/synonyms-crud-Synonyms"
        createdAt:
          type: string
          description: Creation timestamp
        updatedAt:
          type: string
          description: Last update timestamp
        confidence:
          $ref: "#/components/schemas/synonyms-crud-Confidence"
        reason:
          $ref: "#/components/schemas/synonyms-crud-Reason"
        source:
          $ref: "#/components/schemas/synonyms-crud-SynonymSource"
        state:
          $ref: "#/components/schemas/synonyms-crud-SynonymState"
    synonyms-crud-BatchResponse:
      type: object
      properties:
        attemptedInserts:
          type: integer
          description: The number of attempted insertions
        actualInserts:
          type: integer
          description: The number of successful insertions
        errors:
          type: array
          description: A list of errors
          items:
            type: string
    synonyms-crud-SynonymId:
      type: integer
      description: Identifier of the synonym
    synonyms-crud-Word:
      type: string
      description: "The phrase that the synonym relates to. If `type: synonyms`, do not send this value."
    synonyms-crud-Synonyms:
      type: array
      description: A list of synonyms
      items:
        type: string
    synonyms-crud-Type:
      type: string
      description: |
        Type of the synonym.

          - `oneway`: when the word is searched, the results show the results as if the synonyms were searched. Searching for the synonyms does NOT return results for the word or the other synonyms.
          - `synonyms`: the `word` column is empty, all phrases in `synonym` return results for every other phrase in the list.
      enum:
        - oneway
        - synonyms
      default: oneway
    synonyms-crud-SynonymSource:
      type: string
      description: Origin of the synonym
      enum:
        - User
        - Agent
        - Import
      default: User
    synonyms-crud-SynonymState:
      type: string
      description: Current state of the synonym
      enum:
        - New
        - Accepted
        - Pending
        - Rejected
      default: Accepted
    synonyms-crud-Confidence:
      type: number
      format: float
      minimum: 0
      maximum: 1
      nullable: true
      description: Confidence score of the synonym (0.0 to 1.0)
    synonyms-crud-Reason:
      type: string
      nullable: true
      maxLength: 1024
      description: Reason or explanation for the synonym suggestion
    tags-collector-CreatedAt-collector:
      type: string
      format: date-time
      description: Creation time
    tags-collector-DirectoryCreateRequest-collector:
      type: object
      required:
        - name
      properties:
        name:
          $ref: "#/components/schemas/tags-collector-DirectoryName-collector"
        params:
          $ref: "#/components/schemas/tags-collector-DirectoryParams-collector"
        type:
          $ref: "#/components/schemas/tags-collector-DirectoryTypeHash-collector"
    tags-collector-DirectoryDto-collector:
      type: object
      description: Information about the directory where the tag is assigned. Can be `null`.
      properties:
        createdAt:
          $ref: "#/components/schemas/tags-collector-CreatedAt-collector"
        hash:
          type: string
          description: HashID of the directory
        name:
          $ref: "#/components/schemas/tags-collector-DirectoryName-collector"
        params:
          $ref: "#/components/schemas/tags-collector-DirectoryParams-collector"
        type:
          $ref: "#/components/schemas/tags-collector-DirectoryTypeDto-collector"
    tags-collector-DirectoryName-collector:
      type: string
      description: Name of the directory
    tags-collector-DirectoryParams-collector:
      type: object
      description: Free-form parameters
      additionalProperties:
        anyOf:
          - type: string
          - type: number
          - type: boolean
    tags-collector-DirectoryTypeHash-collector:
      type: string
      description: HashID of the directory type
    tags-collector-DirectoryTypeCreateRequest-collector:
      type: object
      required:
        - name
      properties:
        name:
          $ref: "#/components/schemas/tags-collector-DirectoryTypeName-collector"
    tags-collector-DirectoryTypeDto-collector:
      type: object
      description: Details of the directory type
      properties:
        createdAt:
          $ref: "#/components/schemas/tags-collector-CreatedAt-collector"
        hash:
          $ref: "#/components/schemas/tags-collector-DirectoryTypeHash-collector"
        name:
          $ref: "#/components/schemas/tags-collector-DirectoryTypeName-collector"
    tags-collector-DirectoryTypeName-collector:
      type: string
      description: Name of the directory type
    tags-collector-DirectoryTypeUpdateRequest-collector:
      type: object
      properties:
        directoryTypeHash:
          type: string
          description: HashID of the directory type
    tags-collector-DirectoryUpdateRequest-collector:
      type: object
      properties:
        name:
          $ref: "#/components/schemas/tags-collector-DirectoryName-collector"
        params:
          $ref: "#/components/schemas/tags-collector-DirectoryParams-collector"
    tags-collector-TagHash-collector:
      type: string
      description: HashID of a tag
    tags-collector-PaginatedDirectoryDto-collector:
      type: object
      description: Details of the directory where the tag is assigned
      properties:
        createdAt:
          $ref: "#/components/schemas/tags-collector-CreatedAt-collector"
        hash:
          type: string
          description: Hash ID of the directory
        name:
          $ref: "#/components/schemas/tags-collector-DirectoryName-collector"
        type:
          $ref: "#/components/schemas/tags-collector-DirectoryTypeDto-collector"
    tags-collector-PaginatedTagDto-collector:
      type: object
      properties:
        authorId:
          $ref: "#/components/schemas/tags-collector-UserId-collector"
        color:
          $ref: "#/components/schemas/tags-collector-TagColor-collector"
        createdAt:
          $ref: "#/components/schemas/tags-collector-CreatedAt-collector"
        description:
          type: string
          description: Description of the tag
        directory:
          $ref: "#/components/schemas/tags-collector-PaginatedDirectoryDto-collector"
        hash:
          $ref: "#/components/schemas/tags-collector-TagHash-collector"
        icon:
          $ref: "#/components/schemas/tags-collector-TagIcon-collector"
        priority:
          $ref: "#/components/schemas/tags-collector-TagPriority-collector"
        value:
          $ref: "#/components/schemas/tags-collector-TagValue-collector"
    tags-collector-PaginationInfo-collector:
      type: object
      description: Pagination details
      properties:
        limit:
          type: integer
          format: int32
          description: Limit of items per page
          default: 10
        page:
          type: integer
          format: int32
          description: Current page number
          default: 0
        pages:
          type: integer
          format: int32
          description: Total number of pages
        total:
          type: integer
          format: int64
          description: Total number of items on all pages
    tags-collector-TagColor-collector:
      type: string
      description: Hex code of the tag color
      nullable: true
    tags-collector-TagCreateRequest-collector:
      type: object
      required:
        - value
        - priority
      properties:
        color:
          $ref: "#/components/schemas/tags-collector-TagColor-collector"
        description:
          $ref: "#/components/schemas/tags-collector-TagDescription-collector"
        directory:
          $ref: "#/components/schemas/tags-collector-TagDirectory-collector"
        icon:
          $ref: "#/components/schemas/tags-collector-TagIcon-collector"
        priority:
          $ref: "#/components/schemas/tags-collector-TagPriority-collector"
        value:
          $ref: "#/components/schemas/tags-collector-TagValue-collector"
    tags-collector-TagDescription-collector:
      type: string
      description: Description of the tag
    tags-collector-TagDirectory-collector:
      type: string
      description: Hash ID of the directory where the tag is assigned
      nullable: true
    tags-collector-TagDto-collector:
      type: object
      properties:
        authorId:
          $ref: "#/components/schemas/tags-collector-UserId-collector"
        color:
          $ref: "#/components/schemas/tags-collector-TagColor-collector"
        createdAt:
          $ref: "#/components/schemas/tags-collector-CreatedAt-collector"
        description:
          $ref: "#/components/schemas/tags-collector-TagDescription-collector"
        directory:
          $ref: "#/components/schemas/tags-collector-DirectoryDto-collector"
        hash:
          type: string
          description: Hash ID of the tag
        icon:
          $ref: "#/components/schemas/tags-collector-TagIcon-collector"
        priority:
          $ref: "#/components/schemas/tags-collector-TagPriority-collector"
        value:
          $ref: "#/components/schemas/tags-collector-TagValue-collector"
    tags-collector-TagIcon-collector:
      type: string
      description: URL of the tag's icon
      nullable: true
    tags-collector-TagPriority-collector:
      type: integer
      description: Tag priority. Lower values mean higher priority.
      default: 0
    tags-collector-TagUpdateRequest-collector:
      type: object
      properties:
        color:
          $ref: "#/components/schemas/tags-collector-TagColor-collector"
        description:
          $ref: "#/components/schemas/tags-collector-TagDescription-collector"
        directory:
          $ref: "#/components/schemas/tags-collector-TagDirectory-collector"
        icon:
          $ref: "#/components/schemas/tags-collector-TagIcon-collector"
        priority:
          $ref: "#/components/schemas/tags-collector-TagPriority-collector"
        value:
          $ref: "#/components/schemas/tags-collector-TagValue-collector"
    tags-collector-TagValue-collector:
      type: string
      description: Name of the tag
    tags-collector-UserId-collector:
      type: integer
      description: ID of the user who created the tag
    tags-collector-PaginationResponse_PaginatedTagDto_:
      type: object
      properties:
        data:
          type: array
          description: A list of tags on the retrieved page
          items:
            $ref: "#/components/schemas/tags-collector-PaginatedTagDto-collector"
        pagination:
          $ref: "#/components/schemas/tags-collector-PaginationInfo-collector"
    template-backend-TemplateId:
      type: integer
      format: int64
      description: Template ID
    template-backend-TemplateHashId:
      type: string
      description: Template hashId (UUID)
      example: e0326a2d-7697-4ae9-b490-31f97041adcb
    template-backend-BusinessProfileId:
      type: integer
      description: Workspace ID
      example: 594
    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-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-IncludeSafeArea:
      type: boolean
      description: Define if in_app template should include safe area
      default: false
      nullable: true
    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-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-ThumbnailUrl:
      type: string
      description: URL of the template's thumbnail
      example: https://foo.bar
    template-backend-Author:
      type: integer
      format: int64
      description: Author ID
      example: 123
    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-TemplateName:
      type: string
      description: Name of the template
      default: null
      nullable: true
    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-ParsedData:
      type: object
      properties:
        links:
          type: object
    template-backend-ParsedContent:
      type: string
    template-backend-FunctionType:
      type: string
      description: Function type
      example: Password Change
    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-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-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-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"
    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-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-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-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-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-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-PreviewHashId:
      type: string
      description: Preview hashId (UUID)
      example: e0326a2d-7697-4ae9-b490-31f97041adcb
    template-backend-Html:
      type: string
      description: Html of the preview
    template-backend-Css:
      type: string
      description: Css of the preview
    template-backend-Js:
      type: string
      description: Js of the preview
    template-backend-PreviewCreateRequest:
      type: object
      required:
        - html
        - css
        - js
      properties:
        html:
          $ref: "#/components/schemas/template-backend-Html"
        css:
          $ref: "#/components/schemas/template-backend-Css"
        js:
          $ref: "#/components/schemas/template-backend-Js"
        previewContext:
          $ref: "#/components/schemas/template-backend-PreviewContext"
    template-backend-PreviewContext:
      type: object
      required:
        - campaignId
        - variantId
      properties:
        campaignId:
          type: string
        variantId:
          type: string
    template-backend-PreviewUpdateRequest:
      type: object
      required:
        - html
        - css
        - js
      properties:
        html:
          $ref: "#/components/schemas/template-backend-Html"
        css:
          $ref: "#/components/schemas/template-backend-Css"
        js:
          $ref: "#/components/schemas/template-backend-Js"
        previewContext:
          $ref: "#/components/schemas/template-backend-PreviewContext"
    template-backend-PreviewGetResponse:
      type: object
      required:
        - html
        - css
        - js
      properties:
        html:
          $ref: "#/components/schemas/template-backend-Html"
        css:
          $ref: "#/components/schemas/template-backend-Css"
        js:
          $ref: "#/components/schemas/template-backend-Js"
        previewContext:
          $ref: "#/components/schemas/template-backend-PreviewContext"
    template-backend-PreviewResponse:
      type: object
      required:
        - id
        - html
        - css
        - js
      properties:
        id:
          $ref: "#/components/schemas/template-backend-PreviewHashId"
        html:
          $ref: "#/components/schemas/template-backend-Html"
        css:
          $ref: "#/components/schemas/template-backend-Css"
        js:
          $ref: "#/components/schemas/template-backend-Js"
        previewContext:
          $ref: "#/components/schemas/template-backend-PreviewContext"
    uauth-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
    uauth-BusinessProfileAuthenticationRequest:
      required:
        - apiKey
      type: object
      properties:
        apiKey:
          type: string
          description: |
            Workspace API key

            <span style="color:red"><strong>WARNING:</strong></span> Workspace API keys can be used to access all customer data and manage the workspace. They should only be used for server-to-server communication in integrations. **DO NOT use workspace API keys in your mobile applications or websites**.
          example: 64c09614-1b2a-42f7-804d-f647243eb1ab
    uauth-TokenResponse:
      type: object
      properties:
        token:
          type: string
          description: "[JWT](https://jwt.io) token"
    uauth-ApiConsumer:
      type: object
      description: Details of the authenticated user
      properties:
        type:
          type: string
          enum:
            - USER
        businessProfileId:
          type: integer
          description: ID of the selected workspace
        name:
          type: string
          description: The user's login
        id:
          type: integer
          description: ID of the user
        authorities:
          type: array
          description: A list of permissions
          items:
            type: string
        roles:
          type: string
          description: IDs of the roles assigned to the user
    uauth-AuthenticationResponse:
      required:
        - consumer
      type: object
      properties:
        consumer:
          $ref: "#/components/schemas/uauth-ApiConsumer"
        mfaMethods:
          type: array
          items:
            type: string
            enum:
              - TOTP_AUTHENTICATOR
              - EMAIL
              - SMS
        authorizationError:
          $ref: "#/components/schemas/uauth-AuthorizationError"
        multiFactorCodeSent:
          $ref: "#/components/schemas/uauth-MultiFactorSendCodeResponse"
        defaultMfaMethod:
          type: string
          enum:
            - TOTP_AUTHENTICATOR
            - EMAIL
            - SMS
        forcedToSetMfa:
          type: boolean
    uauth-AuthorizationError:
      type: string
      enum:
        - USER_FORCED_TO_CHANGE_PASSWORD
    uauth-BusinessProfileGuid:
      type: string
      description: UUID of the workspace
    uauth-BusinessProfileId:
      type: integer
      description: ID of the workspace
    uauth-BusinessProfileAccessRestriction:
      type: string
      enum:
        - OFF
        - PASS
        - FAIL
        - ENFORCED
    uauth-BusinessProfileInvitationResponse:
      type: object
      properties:
        success:
          type: array
          items:
            type: string
          description: List of successfully invited email addresses
        fail:
          type: array
          items:
            $ref: "#/components/schemas/uauth-BusinessProfileInvitationFail"
          description: List of failed invitations
    uauth-BusinessProfileInvitationFail:
      type: object
      properties:
        email:
          type: string
        cause:
          type: string
    uauth-BusinessProfileInvitationRequest:
      type: object
      properties:
        email:
          $ref: "#/components/schemas/uauth-UserEmail"
        firstName:
          $ref: "#/components/schemas/uauth-UserFirstName"
        lastName:
          $ref: "#/components/schemas/uauth-UserLastName"
        roles:
          $ref: "#/components/schemas/uauth-UserRoles"
    uauth-BusinessProfileBulkInvitationRequest:
      type: object
      properties:
        invitations:
          type: array
          description: An array of users to invite
          items:
            $ref: "#/components/schemas/uauth-BusinessProfileInvitationRequest"
    uauth-BusinessProfilePasswordSettingsData:
      type: object
      properties:
        attempts:
          $ref: "#/components/schemas/uauth-PasswordAttempts"
        block:
          $ref: "#/components/schemas/uauth-PasswordBlock"
        businessProfileId:
          $ref: "#/components/schemas/uauth-BusinessProfileId"
        different:
          $ref: "#/components/schemas/uauth-PasswordDifferent"
        digits:
          $ref: "#/components/schemas/uauth-PasswordDigits"
        expiration:
          $ref: "#/components/schemas/uauth-PasswordExpiration"
        lowerLetters:
          $ref: "#/components/schemas/uauth-PasswordLowerLetters"
        maxIdleTime:
          $ref: "#/components/schemas/uauth-PasswordMaxIdleTime"
        maxLength:
          $ref: "#/components/schemas/uauth-PasswordMaxLength"
        minLength:
          $ref: "#/components/schemas/uauth-PasswordMinLength"
        nextChange:
          $ref: "#/components/schemas/uauth-PasswordNextChange"
        specialChars:
          $ref: "#/components/schemas/uauth-PasswordSpecialChars"
        upperLetters:
          $ref: "#/components/schemas/uauth-PasswordUpperLetters"
    uauth-CurrentBusinessProfileResponse:
      type: object
      properties:
        selected:
          type: boolean
        data:
          $ref: "#/components/schemas/uauth-BusinessProfileWithLabelsResponse"
    uauth-MarkUserFavoriteBusinessProfile:
      type: object
      properties:
        businessProfileGuid:
          type: string
        favorite:
          type: boolean
    uauth-BusinessProfileWithLabelsResponse:
      type: object
      properties:
        id:
          type: integer
          format: int32
        name:
          type: string
        logo:
          type: string
        businessProfileGuid:
          type: string
        created:
          type: string
          format: date-time
        subdomain:
          type: string
        ipRestriction:
          $ref: "#/components/schemas/uauth-BusinessProfileAccessRestriction"
        mfaRestriction:
          $ref: "#/components/schemas/uauth-BusinessProfileAccessRestriction"
        labels:
          type: array
          items:
            type: string
        emailAttributeName:
          type: string
        organizationGuid:
          type: string
        businessProfileGroup:
          $ref: "#/components/schemas/uauth-BusinessProfileGroupSimpleResponse"
    uauth-BusinessProfileGroupSimpleResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        profileIdentifier:
          type: string
    uauth-BusinessProfileResponse:
      type: object
      properties:
        businessProfileGuid:
          $ref: "#/components/schemas/uauth-BusinessProfileGuid"
        logo:
          type: string
          description: URL of the logo
        name:
          type: string
          description: Name of the workspace
        id:
          type: integer
          description: ID of the workspace
        created:
          type: string
          format: date-time
          description: Creation date
        subdomain:
          type: string
          description: Sub-domain of the workspace
        ipRestricted:
          type: boolean
          description: Informs if the workspace has IP access restrictions.
        mfaRequired:
          type: boolean
          description: Informs if the workspace is only accessible to users with multi-factor authentication enabled.
    uauth-BusinessProfileUserSpecific:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/uauth-BusinessProfileId"
        ipRestriction:
          $ref: "#/components/schemas/uauth-BusinessProfileAccessRestriction"
        mfaRestriction:
          $ref: "#/components/schemas/uauth-BusinessProfileAccessRestriction"
        favorite:
          type: boolean
    uauth-ChangePasswordRequest:
      type: object
      properties:
        currentPassword:
          type: string
          description: The current password
        newPassword:
          type: string
          description: The new password
    uauth-ChangePasswordResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - OK
    uauth-InvitationResponse:
      type: object
      properties:
        email:
          $ref: "#/components/schemas/uauth-UserEmail"
        firstName:
          $ref: "#/components/schemas/uauth-UserFirstName"
        lastName:
          $ref: "#/components/schemas/uauth-UserLastName"
    uauth-InvitationUpdateRequest:
      type: object
      properties:
        firstName:
          $ref: "#/components/schemas/uauth-UserFirstName"
        lastName:
          $ref: "#/components/schemas/uauth-UserLastName"
        roles:
          $ref: "#/components/schemas/uauth-UserRoles"
    uauth-OptionalInvitationToken:
      type: string
      description: Invitation token, received from another user
    uauth-PasswordResetConfirmation:
      type: object
      properties:
        token:
          $ref: "#/components/schemas/uauth-PasswordResetToken"
        password:
          type: string
          description: The new password
    uauth-PasswordResetRequest:
      required:
        - email
      type: object
      properties:
        email:
          $ref: "#/components/schemas/uauth-UserEmail"
    uauth-PasswordResetToken:
      type: string
      description: Password reset token received by email
    uauth-PasswordSettingsData:
      type: object
      properties:
        attempts:
          $ref: "#/components/schemas/uauth-PasswordAttempts"
        block:
          $ref: "#/components/schemas/uauth-PasswordBlock"
        different:
          $ref: "#/components/schemas/uauth-PasswordDifferent"
        digits:
          $ref: "#/components/schemas/uauth-PasswordDigits"
        expiration:
          $ref: "#/components/schemas/uauth-PasswordExpiration"
        lowerLetters:
          $ref: "#/components/schemas/uauth-PasswordLowerLetters"
        maxIdleTime:
          $ref: "#/components/schemas/uauth-PasswordMaxIdleTime"
        maxLength:
          $ref: "#/components/schemas/uauth-PasswordMaxLength"
        minLength:
          $ref: "#/components/schemas/uauth-PasswordMinLength"
        nextChange:
          $ref: "#/components/schemas/uauth-PasswordNextChange"
        specialChars:
          $ref: "#/components/schemas/uauth-PasswordSpecialChars"
        upperLetters:
          $ref: "#/components/schemas/uauth-PasswordUpperLetters"
    uauth-PermissionGroupDetailsDTO:
      type: object
      description: "This schema is **recursive**: the `children` array can include more groups, which include more groups, etc."
      properties:
        id:
          type: integer
          description: ID of the group
          format: int64
        name:
          $ref: "#/components/schemas/uauth-PermissionGroupName"
        slug:
          $ref: "#/components/schemas/uauth-PermissionGroupSlug"
        path:
          type: string
          description: Permission group path (uses names)
          example: Ancestor Group < Parent Group < This Group
        left:
          type: integer
          format: int32
          description: Used by the frontend
        right:
          type: integer
          description: Used by the frontend
        deep:
          type: integer
          description: Used by the frontend
        canCreate:
          type: boolean
          description: When TRUE, the `create` permission exists in this group.
        canRead:
          type: boolean
          description: When TRUE, the `read` permission exists in this group.
        canUpdate:
          type: boolean
          description: When TRUE, the `update` permission exists in this group.
        canDelete:
          type: boolean
          description: When TRUE, the `delete` permission exists in this group.
        canExecute:
          type: boolean
          description: When TRUE, the `execute` permission exists in this group.
        create:
          type: boolean
          description: When TRUE, the `create` permission is enabled.
        read:
          type: boolean
          description: When TRUE, the `read` permission is enabled.
        update:
          type: boolean
          description: When TRUE, the `update` permission is enabled.
        delete:
          type: boolean
          description: When TRUE, the `delete` permission is enabled.
        execute:
          type: boolean
          description: When TRUE, the `execute` permission is enabled.
        createDisabled:
          type: boolean
          description: When TRUE, the `create` permission cannot be changed.
        readDisabled:
          type: boolean
          description: When TRUE, the `read` permission cannot be changed.
        updateDisabled:
          type: boolean
          description: When TRUE, the `update` permission cannot be changed.
        deleteDisabled:
          type: boolean
          description: When TRUE, the `delete` permission cannot be changed.
        executeDisabled:
          type: boolean
          description: When TRUE, the `execute` permission cannot be changed.
        children:
          type: array
          description: "An array of rule groups in this group. This schema is **recursive**: the `children` array can include more groups, which include more groups, etc."
          items:
            $ref: "#/components/schemas/uauth-PermissionGroupDetailsDTO"
    uauth-ReactUserEditRequest:
      type: object
      properties:
        firstName:
          $ref: "#/components/schemas/uauth-UserFirstName"
        lastName:
          $ref: "#/components/schemas/uauth-UserLastName"
        avatar:
          $ref: "#/components/schemas/uauth-AvatarUrl"
        phone:
          $ref: "#/components/schemas/uauth-UserPhone"
        language:
          $ref: "#/components/schemas/uauth-UserLanguage"
        organizationRole:
          $ref: "#/components/schemas/uauth-UserOrganizationRole"
        introduction:
          $ref: "#/components/schemas/uauth-UserIntroduction"
        confirmed:
          $ref: "#/components/schemas/uauth-UserConfirmed"
        mailAccountId:
          $ref: "#/components/schemas/uauth-UserMailAccountId"
        description:
          $ref: "#/components/schemas/uauth-UserDescription"
        dateFormatNotation:
          type: string
          enum:
            - US
            - EU
        timeFormatNotation:
          type: string
          enum:
            - US
            - EU
        numberFormatNotation:
          type: string
          enum:
            - US
            - EU
    uauth-ReactOtherUserEditRequest:
      required:
        - roles
      allOf:
        - $ref: "#/components/schemas/uauth-ReactUserEditRequest"
        - type: object
          properties:
            roles:
              $ref: "#/components/schemas/uauth-UserRoles"
    uauth-ReactUserProlongAccessRequest:
      type: object
      properties:
        expirationDate:
          type: string
          description: New access expiration time (ISO 8601, UTC time unless timezone is specified)
          format: date-time
    uauth-ActivationRequest:
      type: object
      properties:
        ids:
          type: array
          description: An array of user IDs
          items:
            $ref: "#/components/schemas/uauth-UserIdInteger"
    uauth-ReactUserResponse:
      type: object
      properties:
        avatar:
          $ref: "#/components/schemas/uauth-AvatarUrl"
        confirmed:
          $ref: "#/components/schemas/uauth-UserConfirmed"
        created:
          $ref: "#/components/schemas/uauth-UserCreated"
        description:
          $ref: "#/components/schemas/uauth-UserDescription"
        displayName:
          $ref: "#/components/schemas/uauth-UserDisplayName"
        email:
          $ref: "#/components/schemas/uauth-UserEmail"
        firstName:
          $ref: "#/components/schemas/uauth-UserFirstName"
        id:
          $ref: "#/components/schemas/uauth-UserIdInteger"
        introduction:
          $ref: "#/components/schemas/uauth-UserIntroduction"
        isTheSameUserAsLoggedIn:
          $ref: "#/components/schemas/uauth-IsTheSameUserAsLoggedIn"
        language:
          $ref: "#/components/schemas/uauth-UserLanguage"
        lastLogin:
          $ref: "#/components/schemas/uauth-UserLastLogin"
        lastName:
          $ref: "#/components/schemas/uauth-UserLastName"
        mailAccountId:
          $ref: "#/components/schemas/uauth-UserMailAccountId"
        organizationRole:
          $ref: "#/components/schemas/uauth-UserOrganizationRole"
        phone:
          $ref: "#/components/schemas/uauth-UserPhone"
        roles:
          $ref: "#/components/schemas/uauth-UserRoles"
        status:
          $ref: "#/components/schemas/uauth-UserStatus"
        superAdmin:
          $ref: "#/components/schemas/uauth-UserSuperAdmin"
        updated:
          $ref: "#/components/schemas/uauth-UserUpdated"
        isMfaEnabled:
          $ref: "#/components/schemas/uauth-UserIsMfaEnabled"
        passwordLastModificationDate:
          $ref: "#/components/schemas/uauth-UserPasswordLastModificationDate"
        dateFormatNotation:
          type: string
          enum:
            - US
            - EU
        timeFormatNotation:
          type: string
          enum:
            - US
            - EU
        numberFormatNotation:
          type: string
          enum:
            - US
            - EU
    uauth-ReactUsersListing:
      type: object
      properties:
        data:
          type: array
          description: A list of users
          items:
            $ref: "#/components/schemas/uauth-ReactUsersListingEntry"
        meta:
          $ref: "#/components/schemas/uauth-PaginationMeta"
    uauth-ReactUsersListingEntry:
      type: object
      properties:
        avatar:
          $ref: "#/components/schemas/uauth-AvatarUrl"
        created:
          $ref: "#/components/schemas/uauth-UserCreated"
        displayName:
          $ref: "#/components/schemas/uauth-UserDisplayName"
        email:
          $ref: "#/components/schemas/uauth-UserEmail"
        firstName:
          $ref: "#/components/schemas/uauth-UserFirstName"
        id:
          $ref: "#/components/schemas/uauth-UserIdInteger"
        lastLogin:
          $ref: "#/components/schemas/uauth-UserLastLogin"
        lastName:
          $ref: "#/components/schemas/uauth-UserLastName"
        roleNames:
          $ref: "#/components/schemas/uauth-UserRoleNames"
        roles:
          $ref: "#/components/schemas/uauth-UserRoles"
        status:
          $ref: "#/components/schemas/uauth-UserStatus"
        updated:
          $ref: "#/components/schemas/uauth-UserUpdated"
    uauth-PaginationMeta:
      type: object
      description: Metadata of the request
      properties:
        pagination:
          $ref: "#/components/schemas/uauth-PaginationMetaPagination"
    uauth-PaginationMetaPagination:
      type: object
      description: Pagination metadata
      properties:
        limit:
          type: integer
          format: int32
          description: The number of entries per page
        page:
          type: integer
          format: int32
          description: Page number, starting with `0`
        pages:
          type: integer
          format: int32
          description: The total number of pages
        total:
          type: integer
          format: int32
          description: The total number of entries on all pages
    uauth-ResendConfirmationPayload:
      type: object
      properties:
        email:
          $ref: "#/components/schemas/uauth-UserEmail"
    uauth-RoleDataRequest:
      type: object
      required:
        - name
        - group
      properties:
        group:
          $ref: "#/components/schemas/uauth-RoleGroupId"
        name:
          $ref: "#/components/schemas/uauth-RoleName"
        description:
          $ref: "#/components/schemas/uauth-RoleDescription"
    uauth-RoleDescription:
      type: string
      description: Description of the role
    uauth-RoleName:
      type: string
      description: The name of the role
    uauth-RoleId:
      type: integer
      format: int64
      description: ID of the role
    uauth-RoleGroupId:
      type: integer
      format: int64
      description: ID of the group that includes this role
    uauth-PermissionGroupName:
      type: string
      description: Name of the permission group
    uauth-PermissionGroupSlug:
      type: string
      description: Slug of the permission group
    uauth-RoleGroupName:
      type: string
      description: Name of the role group
    uauth-RoleGroupDescription:
      type: string
      description: Description of the role group
    uauth-RoleGroupDataRequest:
      type: object
      properties:
        name:
          $ref: "#/components/schemas/uauth-RoleGroupName"
        description:
          $ref: "#/components/schemas/uauth-RoleGroupDescription"
    uauth-RoleGroupResponse:
      type: object
      properties:
        data:
          type: array
          description: An array of roles in the group
          items:
            $ref: "#/components/schemas/uauth-RoleGroupRoleResponse"
        description:
          $ref: "#/components/schemas/uauth-RoleGroupDescription"
        editable:
          type: boolean
          description: Defines if the role group can be edited.
        id:
          type: integer
          format: int64
          description: ID of the role group
        name:
          $ref: "#/components/schemas/uauth-RoleGroupName"
    uauth-RoleGroupRoleResponse:
      type: object
      properties:
        author:
          $ref: "#/components/schemas/uauth-RoleGroupRoleUserResponse"
        description:
          $ref: "#/components/schemas/uauth-RoleDescription"
        editable:
          type: boolean
          description: Informs if the role is editable
        group:
          $ref: "#/components/schemas/uauth-RoleGroupId"
        id:
          $ref: "#/components/schemas/uauth-RoleId"
        name:
          $ref: "#/components/schemas/uauth-RoleName"
        updated:
          type: string
          format: date-time
          description: Date and time of the last update
    uauth-RoleGroupRoleUserResponse:
      type: object
      description: Details of the role's creator
      properties:
        avatar:
          $ref: "#/components/schemas/uauth-AvatarUrl"
        displayName:
          $ref: "#/components/schemas/uauth-UserDisplayName"
        firstName:
          $ref: "#/components/schemas/uauth-UserFirstName"
        id:
          $ref: "#/components/schemas/uauth-UserIdInteger"
        lastName:
          $ref: "#/components/schemas/uauth-UserLastName"
    uauth-RoleFullResponse:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/uauth-RoleId"
        name:
          $ref: "#/components/schemas/uauth-RoleName"
        businessProfileId:
          $ref: "#/components/schemas/uauth-BusinessProfileId"
        shownAsResource:
          type: boolean
          description: Deprecated field
          deprecated: true
        manageable:
          type: boolean
          description: Defines if the role can be modified.
        pii:
          type: boolean
          description: Indicates if the role has access to personally identifiable information
        group:
          type: integer
          format: int64
          description: ID of the role group this role belongs to
        author:
          $ref: "#/components/schemas/uauth-RoleGroupRoleUserResponse"
        editable:
          type: boolean
          description: Informs if the role is editable
        description:
          type: string
          description: Description of the role
    uauth-RoleResponse:
      type: object
      properties:
        businessProfileId:
          $ref: "#/components/schemas/uauth-BusinessProfileId"
        id:
          $ref: "#/components/schemas/uauth-RoleId"
        manageable:
          type: boolean
          description: Defines if the role can be modified.
        name:
          $ref: "#/components/schemas/uauth-RoleName"
        shownAsResource:
          type: boolean
          description: Deprecated field
          deprecated: true
        pii:
          type: boolean
          description: Indicates if the role has access to personally identifiable information
    uauth-MyAccountUserResponse:
      type: object
      properties:
        id:
          type: integer
          format: int64
        email:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        displayName:
          type: string
        avatar:
          type: string
        phone:
          type: string
        language:
          $ref: "#/components/schemas/uauth-UserLanguage"
        organizationRole:
          type: string
        introduction:
          type: string
        confirmed:
          type: boolean
        mailAccountId:
          type: integer
          format: int32
        superAdmin:
          type: boolean
        created:
          type: string
          format: date-time
        updated:
          type: string
          format: date-time
        lastLogin:
          type: string
          format: date-time
        status:
          type: string
          enum:
            - ACTIVE
            - PENDING
            - EXPIRED
            - INACTIVE
        roles:
          type: array
          items:
            type: integer
            format: int64
        isTheSameUserAsLoggedIn:
          type: boolean
        description:
          type: string
        isMfaEnabled:
          type: boolean
        passwordLastModificationDate:
          type: string
          format: date-time
        canBeEdited:
          type: boolean
        dateFormatNotation:
          type: string
          enum:
            - US
            - EU
        timeFormatNotation:
          type: string
          enum:
            - US
            - EU
        numberFormatNotation:
          type: string
          enum:
            - US
            - EU
        mfaTokenExpirationHours:
          type: integer
          format: int32
        defaultMfaMethod:
          $ref: "#/components/schemas/uauth-MultiFactorMethod"
        labels:
          type: array
          items:
            type: string
    uauth-UserAuthenticationRequest:
      required:
        - password
        - username
      type: object
      properties:
        username:
          type: string
          description: The login (email address) of the user
        password:
          type: string
          description: The user's password
        deviceId:
          type: string
          description: Identifier of user's current device
        externalProviderToken:
          type: string
        externalProviderType:
          type: string
          enum:
            - GOOGLE
        organizationName:
          type: string
          description: Optional organization name for login context
    uauth-UserAutoCompleteResponse:
      type: object
      properties:
        avatarUrl:
          $ref: "#/components/schemas/uauth-AvatarUrl"
        displayName:
          $ref: "#/components/schemas/uauth-UserDisplayName"
        email:
          $ref: "#/components/schemas/uauth-UserEmail"
        userId:
          $ref: "#/components/schemas/uauth-UserIdInteger"
    uauth-IpPolicySettings:
      type: object
      properties:
        enabled:
          type: boolean
          description: When TRUE, the policy is active and only the included addresses are allowed to connect.
        enableSupportSubnets:
          type: boolean
          description: When TRUE, the IP addresses used by Synerise for service work are added to the allowlist. These addresses depend on the configuration.
          default: true
        ipPolicy:
          $ref: "#/components/schemas/uauth-IpPolicy"
    uauth-UserRegistrationRequest:
      required:
        - email
        - password
      type: object
      properties:
        email:
          $ref: "#/components/schemas/uauth-UserEmail"
        password:
          $ref: "#/components/schemas/uauth-UserPassword"
        invitationToken:
          $ref: "#/components/schemas/uauth-OptionalInvitationToken"
        externalProviderToken:
          type: string
        externalProviderType:
          type: string
          enum:
            - GOOGLE
    uauth-MultiFactorAuthInitResponse:
      type: object
      properties:
        url:
          type: string
          description: URL of the QR code
        secret:
          type: string
          description: Multifactor authentication secret
    uauth-MultiFactorSendCodeResponse:
      type: object
      properties:
        method:
          $ref: "#/components/schemas/uauth-MultiFactorMethod"
        status:
          $ref: "#/components/schemas/uauth-MultiFactorSendCodeStatus"
        nextTryInSeconds:
          type: integer
          format: int32
    uauth-MultiFactorSendCodeStatus:
      type: string
      enum:
        - OK
        - LIMIT_REACHED
        - ERROR
    uauth-MultiFactorAuthConfirmResponse:
      type: object
      properties:
        backupCode:
          type: string
          description: Code used to recover the account if the device with the token generator is lost. Store the code in a secure way.
    uauth-MultiFactorAuthConfirmRequest:
      type: object
      required:
        - verificationCode
      properties:
        verificationCode:
          type: string
          description: Multi-factor verification code
    uauth-MultiFactorMethod:
      type: string
      enum:
        - TOTP_AUTHENTICATOR
        - EMAIL
    uauth-MultiFactorAuthVerificationRequest:
      type: object
      required:
        - verificationCode
      properties:
        verificationCode:
          type: string
          description: Multi-factor verification code
        deviceId:
          type: string
        externalProviderToken:
          type: string
        externalProviderType:
          type: string
          enum:
            - GOOGLE
        organizationName:
          type: string
          description: Optional organization name for login context
    uauth-ManagedDomainRequest:
      type: object
      required:
        - domain
      properties:
        domain:
          $ref: "#/components/schemas/uauth-ManagedDomainDomain"
    uauth-ManagedDomainVerificationRequest:
      type: object
      required:
        - domain
        - verificationMethod
      properties:
        domain:
          $ref: "#/components/schemas/uauth-ManagedDomainDomain"
        verificationMethod:
          $ref: "#/components/schemas/uauth-ManagedDomainVerificationMethod"
    uauth-ManagedDomainDomain:
      type: string
      description: Domain name
      example: synerise.com
    uauth-ManagedDomainVerificationMethod:
      type: string
      enum:
        - TXT_RECORD
        - FILE_CHECK
        - INTERNAL
        - NONE
      description: |
        Verification method. The verification string can be retrieved by using [this method](#operation/initializeManagedDomainUsingPOST).

        - TXT_RECORD: the verification string needs to be added to your DNS as a TXT record.
        - FILE_CHECK: the site must include an HTML file whose name is the verification string. The file does not need any content.
        - INTERNAL; NONE - currently not used
    uauth-ManagedDomainResponse:
      type: object
      properties:
        id:
          type: number
          format: int64
          description: ID of the managed domain
        domain:
          $ref: "#/components/schemas/uauth-ManagedDomainDomain"
        created:
          type: string
          format: date-time
          description: Creation time
        verificationMethod:
          $ref: "#/components/schemas/uauth-ManagedDomainVerificationMethod"
        verificationStatus:
          type: string
          description: Verification status
          enum:
            - VERIFIED
            - NOT_VERIFIED
        updated:
          type: string
          format: date-time
          description: Time of last update
        managedByProfile:
          $ref: "#/components/schemas/uauth-BusinessProfileId"
        usersCount:
          type: number
          format: int64
          description: Number of users who belong to the domain
    uauth-ManagedDomainCodeResponse:
      type: object
      properties:
        verificationCode:
          type: string
          description: Verification code
          format: uuid
        businessProfileId:
          $ref: "#/components/schemas/uauth-BusinessProfileId"
    uauth-ManagedDomainListing:
      type: object
      properties:
        meta:
          $ref: "#/components/schemas/uauth-PaginationMeta"
        data:
          type: array
          description: An array of domains managed by the workspace
          items:
            $ref: "#/components/schemas/uauth-ManagedDomainResponse"
    uauth-UserDisplayName:
      type: string
      description: User's display name
    uauth-UserEmail:
      type: string
      description: User's email address
    uauth-UserIdInteger:
      type: integer
      format: int64
      description: User ID
    uauth-AvatarUrl:
      type: string
      description: URL of the user's avatar
    uauth-UserFirstName:
      type: string
      description: First name of the user
    uauth-UserLastName:
      type: string
      description: Last name of the user
    uauth-UserConfirmed:
      type: boolean
      description: Informs if the account is confirmed
    uauth-UserCreated:
      type: string
      format: date-time
      description: Account creation date
    uauth-UserDescription:
      type: string
      description: User's description
    uauth-UserIntroduction:
      type: string
      description: User's introduction
    uauth-IsTheSameUserAsLoggedIn:
      type: boolean
      description: Informs if the user who made the request is the same as the subject of the request
    uauth-UserLanguage:
      type: string
      enum:
        - pl
        - es
        - pt
        - en-GB
        - en-US
      description: User's interface language
    uauth-UserLastLogin:
      type: string
      format: date-time
      description: Last login time
    uauth-UserMailAccountId:
      type: integer
      description: Unused field
    uauth-UserOrganizationRole:
      type: string
      description: User's role in the organization
    uauth-UserPhone:
      type: string
      description: User's phone number
    uauth-UserRoles:
      type: array
      description: An array of roles (IDs) assigned to the user in the currently selected workspace
      items:
        type: integer
        format: int64
    uauth-UserStatus:
      type: string
      description: Account status
      enum:
        - ACTIVE
        - PENDING
    uauth-UserSuperAdmin:
      type: boolean
      description: Informs if the user is a super admin
    uauth-UserUpdated:
      type: string
      format: date-time
      description: Last update time
    uauth-UserIsMfaEnabled:
      type: boolean
      description: Informs if multi-factor authentication for the user is active
    uauth-UserPasswordLastModificationDate:
      type: string
      format: date-time
      description: Date and time of last password change
    uauth-UserRoleNames:
      type: array
      description: An array of roles (names) assigned to the user in the currently selected workspace
      items:
        type: string
    uauth-UserPassword:
      type: string
      description: Account password
    uauth-PasswordAttempts:
      type: integer
      format: int32
      description: The number of failed sign-in attempts after which an account is blocked
    uauth-PasswordBlock:
      type: integer
      format: int32
      description: The number of days after which an account is blocked after the password expires.
    uauth-PasswordDifferent:
      type: integer
      format: int32
      description: |
        Defines how many previous passwords are compared.

        For example, if set to 3, the new password must be different than the 3 last passwords.
    uauth-PasswordDigits:
      type: integer
      format: int32
      description: The minimum number of digits in a password
    uauth-PasswordExpiration:
      type: integer
      format: int32
      description: The number of days after which the passwords expire
    uauth-PasswordLowerLetters:
      type: integer
      format: int32
      description: The minimum number of lower-case letters in a password
    uauth-PasswordMaxIdleTime:
      type: integer
      format: int32
      description: Time (in seconds) after which an idle user is signed out
    uauth-PasswordMaxLength:
      type: integer
      format: int32
      description: The maximum number of characters in a password
    uauth-PasswordMinLength:
      type: integer
      format: int32
      description: The minimum number of characters in a password
    uauth-PasswordNextChange:
      type: integer
      format: int32
      description: Currently not used
    uauth-PasswordSpecialChars:
      type: integer
      format: int32
      description: The minimum number of special characters in a password
    uauth-PasswordUpperLetters:
      type: integer
      format: int32
      description: The minimum number of upper-case letters in a password
    uauth-IpPolicy:
      type: array
      description: List of allowed IPv4 addresses
      items:
        type: string
        description: IP address
    uploader-service-ttlInMinutes:
      description: Defines the amount of time (expressed in minutes) the file or files are available. If this parameter is not sent, the default time to live of the files is 30 days.
      type: number
    uploader-service-identifierValue:
      description: Contains the value of a customer identifier a file is dedicated for. The type of the value is defined in the path parameters of the endpoint (`identifierType`). If `id` is used, it must be sent as a string.
      type: string
      example: "1234"
    uploader-service-parameters:
      description: Custom parameters of the files.
      type: object
      additionalProperties: true
    uploader-service-FileRequest:
      type: object
      required:
        - id
        - businessProfileId
        - clientId
        - ttlInMinutes
        - params
        - createdAt
      properties:
        id:
          type: string
          format: uuid
          description: Unique ID of the file or batch of files
        businessProfileId:
          type: number
          format: int32
          description: ID of the workspace where the file or files are stored
        clientId:
          type: number
          format: int64
          example: 1234
          description: ID of the profile to which the file or files are assigned
        ttlInMinutes:
          $ref: "#/components/schemas/uploader-service-ttlInMinutes"
        params:
          $ref: "#/components/schemas/uploader-service-parameters"
        createdAt:
          type: string
          format: date-time
          description: Date and time when the file or files were created
    uploader-service-AddFile:
      type: object
      required:
        - files
        - ttlInMinutes
        - identifierValue
        - parameters
      properties:
        files:
          type: array
          description: Up to 5 files can be sent at once. The order in the array is reflected in the generated `attachment.upload` event, and the files from the event can then be accessed by their index in the array.
          items:
            $ref: "#/components/schemas/uploader-service-InputFile"
        ttlInMinutes:
          $ref: "#/components/schemas/uploader-service-ttlInMinutes"
        identifierValue:
          $ref: "#/components/schemas/uploader-service-identifierValue"
        parameters:
          $ref: "#/components/schemas/uploader-service-parameters"
    uploader-service-InputFile:
      type: object
      required:
        - content
        - mimetype
        - filename
        - extension
      properties:
        content:
          type: string
          description: The file encoded into base64.
          example: 77u/dGhpcyBpcyBqdXN0IGFuIGV4YW1wbGUgZmlsZQ==
        mimetype:
          type: string
          description: The media type, in the type/type format, for example `text/csv`
          example: text/csv
        filename:
          type: string
          description: The name of the file
          example: myexamplefile
        extension:
          type: string
          description: The extension of the uploaded file
          example: csv
    uploader-service-FileInfo:
      type: object
      properties:
        author:
          description: Name of the user who uploaded the file
          type: string
        canEdit:
          description: Defines if the file can be edited
          type: boolean
        canRemove:
          description: Defines if the file can be deleted
          type: boolean
        created:
          description: Creation date
          type: string
        filename:
          description: Name of the file
          type: string
        id:
          description: ID of the file
          type: string
        uuid:
          type: string
          description: UUID of the file, without dashes
        isStarred:
          type: boolean
          description: Informs if the file is starred.
        mimetype:
          type: string
          description: The MIME type of the file.
          enum:
            - image/png
            - image/jpeg
            - image/jpg
            - image/gif
            - video/mp4
            - application/pdf
            - application/vnd.openxmlformats-officedocument.wordprocessingml.document
            - application/vnd.ms-excel
        path:
          $ref: "#/components/schemas/uploader-service-Path"
        size:
          type: number
          description: Size of the file in bytes
        storageId:
          type: string
          description: Name of the container where the file is stored
        updated:
          type: string
          description: Year of last update
        url:
          type: string
          description: URL of the file
        user_id:
          type: number
          description: ID of the user who uploaded the file
    uploader-service-FileDataV2:
      type: object
      properties:
        author:
          $ref: "#/components/schemas/uploader-service-AuthorV2"
        permissions:
          type: object
          properties:
            canEdit:
              type: boolean
            canRemove:
              type: boolean
        createdAt:
          description: Creation date
          type: string
        filename:
          description: Name of the file
          type: string
        id:
          description: ID of the file
          type: string
        uuid:
          type: string
          description: UUID of the file, without dashes
        isStarred:
          type: boolean
          description: Informs if the file is starred.
        mimetype:
          type: string
          description: The MIME type of the file.
          enum:
            - image/png
            - image/jpeg
            - image/jpg
            - image/gif
            - video/mp4
            - application/pdf
            - application/vnd.openxmlformats-officedocument.wordprocessingml.document
            - application/vnd.ms-excel
        path:
          $ref: "#/components/schemas/uploader-service-Path"
        size:
          type: number
          description: Size of the file in bytes
        storageId:
          type: string
          description: Name of the container where the file is stored
        updatedYear:
          type: integer
          description: Year of last update
        url:
          type: string
          description: URL of the file
    uploader-service-AuthorV2:
      type: object
      description: Author of a file.
      properties:
        id:
          type: number
        email:
          type: string
        displayName:
          type: string
        avatar:
          type: string
      required:
        - id
        - email
        - displayName
    uploader-service-Path:
      type: object
      description: Paths to different versions of the resource. Some MIME types only have `origin`.
      properties:
        large:
          type: string
          description: Path to the large version of the file
        origin:
          type: string
          description: Path to the original file
        thumb:
          type: string
          description: Path to the thumbnail
    uploader-service-UploadResult:
      type: object
      properties:
        result:
          type: object
          description: Information about the result
          properties:
            files:
              type: array
              description: File information
              items:
                $ref: "#/components/schemas/uploader-service-FileInfo"
            storageId:
              type: string
              description: Name of the container where the file is stored
    uploader-service-FileUuids:
      description: File UUIDs, without dashes (stringified JSON array) <br/>Example:<br/>`["0ac106beb55c401bac8bc8244e367512","03dc506041e24c3cae284fd3f6611082"]`
      type: string
    uploader-service-Error:
      type: object
      properties:
        details:
          type: string
        errorCode:
          type: string
        errors:
          type: array
          items:
            $ref: "#/components/schemas/uploader-service-Error"
        field:
          type: string
        help:
          type: string
        httpStatus:
          type: number
        message:
          type: string
        source:
          type: string
        timestamp:
          type: string
        traceId:
          type: string
    vouchers-voucherActionRequestAsProfileReq:
      required:
        - poolUuid
        - clientUuid
      type: object
      properties:
        poolUuid:
          $ref: "#/components/schemas/vouchers-inBodyPoolUuid"
        clientUuid:
          $ref: "#/components/schemas/vouchers-inBodyClientUuid"
    vouchers-voucherActionRequestByClientIdentifierAsProfileReq:
      required:
        - poolUuid
        - clientIdentifierValue
      type: object
      properties:
        poolUuid:
          $ref: "#/components/schemas/vouchers-inBodyPoolUuid"
        clientIdentifierValue:
          $ref: "#/components/schemas/vouchers-inBodyClientIdentifierValue"
    vouchers-voucherActionRequestAsClientReq:
      required:
        - poolUuid
      type: object
      properties:
        poolUuid:
          $ref: "#/components/schemas/vouchers-inBodyPoolUuid"
        clientUuid:
          $ref: "#/components/schemas/vouchers-deprecatedInBodyClientUuid"
    vouchers-voucherRedeemReq:
      required:
        - code
      type: object
      properties:
        code:
          type: string
          description: |
            Voucher code
            Must match the pattern: `^.{0,36}$`
          example: code123
          nullable: false
    vouchers-voucherCode:
      type: string
      description: |
        Voucher code
        Must match the pattern: `^.{0,36}$`
      example: code123
      nullable: true
    vouchers-voucher-HTTP400Res:
      required:
        - message
        - error
      type: object
      properties:
        message:
          type: string
          description: Description of the problem
          example: Out of scope. Pool is empty.
        error:
          type: array
          items:
            $ref: "#/components/schemas/vouchers-errorObj"
          description: Details of the problem
    vouchers-errorObj:
      type: object
      properties:
        field:
          type: string
          description: Name of the field that cause the problem (if applicable)
          example: code
        message:
          type: string
          example: code must be unique
          description: Details of the problem
        validatorKey:
          type: string
          example: not_unique
          description: System ID of the problem (if applicable)
    vouchers-voucherResponseMessage:
      required:
        - message
      type: object
      properties:
        message:
          type: string
          description: Details of the response
    vouchers-bulkCreateResponse:
      properties:
        message:
          type: string
          default: Create object with success
        data:
          type: object
          properties:
            vouchersCreated:
              type: integer
              description: Number of created vouchers
              example: 3
            duplicatedCodes:
              type: array
              items:
                type: string
                example: code123
              description: Codes which are duplicated (already exists for given workspace) and was ignored while creating vouchers
    vouchers-redeemAt:
      type: string
      format: date-time
      description: Time when the voucher was redeemed. Defaults to current time when redeeming.
      nullable: true
    vouchers-expireIn:
      type: string
      format: date-time
      description: Date when the voucher expires.
      nullable: true
    vouchers-assignedAt:
      type: string
      format: date-time
      description: Time when the voucher was assigned. Defaults to current time when assigning.
      nullable: true
    vouchers-createdAt:
      type: string
      format: date-time
      description: Time when the voucher was created.
    vouchers-updatedAt:
      type: string
      format: date-time
      description: Time when the voucher was last updated.
    vouchers-voucherStatus:
      type: string
      description: Voucher status
      enum:
        - ASSIGNED
        - UNASSIGNED
        - REDEEMED
        - CANCELED
      example: ASSIGNED
    vouchers-voucherRedeemedStatus:
      type: string
      default: REDEEMED
    vouchers-getOrAssignAndGetVoucherDataRes:
      type: object
      description: Details of the voucher
      properties:
        code:
          $ref: "#/components/schemas/vouchers-voucherCode"
        expireIn:
          $ref: "#/components/schemas/vouchers-expireIn"
        redeemAt:
          $ref: "#/components/schemas/vouchers-redeemAt"
        assignedAt:
          $ref: "#/components/schemas/vouchers-assignedAt"
        createdAt:
          $ref: "#/components/schemas/vouchers-createdAt"
        updatedAt:
          $ref: "#/components/schemas/vouchers-updatedAt"
    vouchers-inBodyPoolUuid:
      type: string
      description: UUID of the voucher pool
      example: faec32b0-c343-4362-ba32-c6148c649da4
    vouchers-inBodyClientUuid:
      type: string
      description: UUID of the Profile
      example: 07243772-008a-42e1-ba37-c3807cebde8f
    vouchers-inBodyClientIdentifierValue:
      description: Value of the profile identifier. For example `clientIdentifierValue=custom_identify_1234`
      oneOf:
        - type: string
          maxLength: 100
          example: custom_identify_1234
        - type: integer
          format: int64
          maxLength: 100
          example: 1234
    vouchers-deprecatedInBodyClientUuid:
      deprecated: true
      type: string
      nullable: true
      description: UUID of the Profile. This field is ignored.
      example: 17243772-008a-42e1-ba37-c3807cebde8f
    vouchers-inBodyClientId:
      type: integer
      description: ID of the Profile
    vouchers-data:
      required:
        - uuid
        - poolUuid
        - createdAt
        - updatedAt
      type: object
      description: Details of the voucher
      properties:
        uuid:
          type: string
          description: UUID of the voucher
        poolUuid:
          $ref: "#/components/schemas/vouchers-inBodyPoolUuid"
        clientId:
          $ref: "#/components/schemas/vouchers-inBodyClientId"
        createdAt:
          type: string
          format: date-time
          description: Time when the voucher was created
        updatedAt:
          type: string
          format: date-time
          description: Time when the voucher was last updated
    vouchers-voucherData:
      required:
        - poolUuid
      type: object
      properties:
        poolUuid:
          $ref: "#/components/schemas/vouchers-inBodyPoolUuid"
        clientUuid:
          $ref: "#/components/schemas/vouchers-inBodyClientUuid"
        clientId:
          $ref: "#/components/schemas/vouchers-inBodyClientId"
        code:
          $ref: "#/components/schemas/vouchers-voucherCode"
        expireIn:
          $ref: "#/components/schemas/vouchers-expireIn"
        redeemAt:
          $ref: "#/components/schemas/vouchers-redeemAt"
        assignedAt:
          $ref: "#/components/schemas/vouchers-assignedAt"
        status:
          $ref: "#/components/schemas/vouchers-voucherStatus"
        createdAt:
          $ref: "#/components/schemas/vouchers-createdAt"
        updatedAt:
          $ref: "#/components/schemas/vouchers-updatedAt"
    vouchers-voucherDataRedeemed:
      type: object
      properties:
        poolUuid:
          $ref: "#/components/schemas/vouchers-inBodyPoolUuid"
        clientUuid:
          $ref: "#/components/schemas/vouchers-inBodyClientUuid"
        clientId:
          $ref: "#/components/schemas/vouchers-inBodyClientId"
        code:
          $ref: "#/components/schemas/vouchers-voucherCode"
        expireIn:
          $ref: "#/components/schemas/vouchers-expireIn"
        redeemAt:
          $ref: "#/components/schemas/vouchers-redeemAt"
        assignedAt:
          $ref: "#/components/schemas/vouchers-assignedAt"
        status:
          $ref: "#/components/schemas/vouchers-voucherRedeemedStatus"
        createdAt:
          $ref: "#/components/schemas/vouchers-createdAt"
        updatedAt:
          $ref: "#/components/schemas/vouchers-updatedAt"
    vouchers-bulkCreateVouchersReq:
      required:
        - poolUuid
        - codeList
      type: object
      properties:
        poolUuid:
          $ref: "#/components/schemas/vouchers-inBodyPoolUuid"
        codeList:
          type: string
          description: A list of unique voucher codes, separated by semicolons
          example: 3845734682364756454534;384574634564545456;567868678345234346748
    vouchers-poolDataRes:
      type: object
      properties:
        uuid:
          $ref: "#/components/schemas/vouchers-poolUuid"
        name:
          $ref: "#/components/schemas/vouchers-poolName"
        description:
          $ref: "#/components/schemas/vouchers-poolDescription"
        barcodeType:
          $ref: "#/components/schemas/vouchers-poolBarcodeType"
        voucherPrefix:
          $ref: "#/components/schemas/vouchers-voucherPrefix"
        poolLimit:
          $ref: "#/components/schemas/vouchers-poolLimit"
        redeemedLimitPerClient:
          $ref: "#/components/schemas/vouchers-redeemedLimitPerClient"
        startAt:
          $ref: "#/components/schemas/vouchers-poolStartAt"
        expireIn:
          $ref: "#/components/schemas/vouchers-poolExpireIn"
        userId:
          $ref: "#/components/schemas/vouchers-userId"
        assignedCount:
          $ref: "#/components/schemas/vouchers-assignedCount"
        activeCount:
          $ref: "#/components/schemas/vouchers-activeCount"
        countAt:
          $ref: "#/components/schemas/vouchers-countAt"
        lastingTime:
          $ref: "#/components/schemas/vouchers-lastingTime"
    vouchers-poolName:
      type: string
      description: Name of the voucher pool
    vouchers-poolDescription:
      type: string
      description: A description of the pool
    vouchers-poolLimit:
      type: integer
      default: 0
      description: Maximum number of vouchers to store in the pool
    vouchers-poolBarcodeType:
      type: string
      description: The type of codes in the pool
      enum:
        - NONE
        - UPC
        - EAN-13
        - CODE-39
        - CODE-128
        - ISBN
        - ISSN
        - QR-CODE
      default: NONE
    vouchers-voucherPrefix:
      type: string
      default: "0"
      description: A prefix added to each voucher in the pool
    vouchers-redeemedLimitPerClient:
      type: integer
      default: 0
      description: Maximum number of times that one Profile can retrieve a voucher from this pool
    vouchers-poolStartAt:
      type: string
      format: date-time
      description: Time when the pool starts functioning. Defaults to current time.
    vouchers-poolExpireIn:
      type: string
      format: date-time
      description: Time when the pool stops functioning. Defaults to current time. Must be later than `startAt`.
    vouchers-poolUuid:
      type: string
      description: UUID of the voucher pool
      example: 8465c240-d38e-42f8-af29-b9fa1ed05115
    vouchers-poolData:
      type: object
      description: Voucher pool details
      properties:
        uuid:
          $ref: "#/components/schemas/vouchers-poolUuid"
        name:
          $ref: "#/components/schemas/vouchers-poolName"
        barcodeType:
          $ref: "#/components/schemas/vouchers-poolBarcodeType"
        description:
          $ref: "#/components/schemas/vouchers-poolDescription"
        voucherPrefix:
          $ref: "#/components/schemas/vouchers-voucherPrefix"
        poolLimit:
          $ref: "#/components/schemas/vouchers-poolLimit"
        redeemedLimitPerClient:
          $ref: "#/components/schemas/vouchers-redeemedLimitPerClient"
        startAt:
          $ref: "#/components/schemas/vouchers-poolStartAt"
        expireIn:
          $ref: "#/components/schemas/vouchers-poolExpireIn"
        lastingTime:
          $ref: "#/components/schemas/vouchers-lastingTime"
        userId:
          $ref: "#/components/schemas/vouchers-userId"
        assignedCount:
          $ref: "#/components/schemas/vouchers-assignedCount"
        activeCount:
          $ref: "#/components/schemas/vouchers-activeCount"
        countAt:
          $ref: "#/components/schemas/vouchers-countAt"
    vouchers-createAVoucherPoolReq:
      required:
        - name
        - expireIn
      type: object
      properties:
        name:
          $ref: "#/components/schemas/vouchers-poolName"
        barcodeType:
          $ref: "#/components/schemas/vouchers-poolBarcodeType"
        description:
          $ref: "#/components/schemas/vouchers-poolDescription"
        voucherPrefix:
          $ref: "#/components/schemas/vouchers-voucherPrefix"
        poolLimit:
          $ref: "#/components/schemas/vouchers-poolLimit"
        redeemedLimitPerClient:
          $ref: "#/components/schemas/vouchers-redeemedLimitPerClient"
        startAt:
          $ref: "#/components/schemas/vouchers-poolStartAt"
    vouchers-paginationMeta:
      type: object
      description: Optional metadata
      properties:
        link:
          type: array
          description: Links to other pages
          items:
            type: object
            description: Link to another page on the list
            properties:
              rel:
                type: string
                enum:
                  - first
                  - last
                  - next
                  - prev
                description: The type of relationship to the current page
              url:
                type: string
                description: The URL of the page
        totalCount:
          type: integer
          description: The total number of items on all pages
        totalPages:
          type: integer
          description: The total number of pages
        page:
          type: integer
          description: The current page
        limit:
          type: integer
          description: The number of items per page
        code:
          type: integer
          description: HTTP code
    vouchers-listVouchersSuccessRes:
      required:
        - data
      type: object
      properties:
        data:
          type: array
          description: An array of vouchers
          items:
            $ref: "#/components/schemas/vouchers-voucherData"
        meta:
          $ref: "#/components/schemas/vouchers-paginationMeta"
    vouchers-getVouchersCountRes:
      required:
        - data
      type: object
      properties:
        data:
          type: object
          properties:
            assignedCount:
              type: integer
              format: int32
              example: 130
              description: Number of assigned vouchers
            activeCount:
              type: integer
              format: int32
              example: 130
              description: Number of active vouchers
            countAt:
              type: string
              format: date-time
              description: Time when the calculation was made
    vouchers-vouchersDataList:
      type: object
      properties:
        data:
          type: array
          description: An array of vouchers
          items:
            $ref: "#/components/schemas/vouchers-voucherData"
    vouchers-lastingTime:
      type: integer
      format: int32
      description: Lasting time of the voucher
    vouchers-userId:
      type: integer
      format: int32
      description: ID of the User who created the pool
    vouchers-assignedCount:
      type: integer
      format: int32
      description: Number of assigned vouchers. **To refresh the counter, use [this endpoint](#operation/getVouchersCount).**
    vouchers-activeCount:
      type: integer
      format: int32
      description: Number of active vouchers. **To refresh the counter, use [this endpoint](#operation/getVouchersCount).**
    vouchers-countAt:
      type: string
      format: date-time
      description: Time when the pool starts functioning. Defaults to current time.
  responses:
    activities-api-EventResponse:
      description: Events
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/activities-api-PaginatedEvents"
    analytics-genericError:
      description: See error message for details
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/analytics-Error"
    api-service-400-apiv4:
      description: "Bad request: input data missing or malformed"
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/api-service-HTTP400-apiv4"
          example:
            timestamp: 2018-06-07T07:28:26.078+00:00
            status: 400
            error: Bad Request
            message: Version header content is invalid
            path: /path_of_the_endpoint
    api-service-401-apiv4:
      description: "Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc."
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/api-service-HTTP400-apiv4"
          example:
            error: Bad Request
            status: 400
            timestamp: 2020-10-29T13:08:16.235Z
            path: /exampleEndpoint
            message: Some fields did not pass validation
            errors:
              - code: 120
                field: exampleField
                message: "120"
                rejectedValue: exampleValue
    api-service-403-apiv4:
      description: Forbidden; insufficient permissions (when PII protection is enabled, PII permissions are required in addition to the permissions listed in the method description)
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/api-service-HTTP400-apiv4"
          example:
            timestamp: 2018-06-07T07:29:27.489+00:00
            status: 403
            error: Forbidden
            message: Forbidden
            path: /path_of_the_endpoint
    api-service-404-pii:
      description: Profile not found or access blocked by PII protection settings
      content:
        application/json:
          schema:
            type: string
            description: Description of the problem. If the access is blocked by insufficient PII permissions, the message is the same as when the profile doesn't exist.
            example: Client 5005535044 not found
    api-service-415-apiv4:
      description: Unsupported Media Type
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/api-service-HTTP400-apiv4"
          example:
            timestamp: 2018-06-07T07:27:23.136+00:00
            status: 415
            error: Unsupported Media Type
            message: Content type 'application/xml' not supported
            path: /path_of_the_endpoint
    automation-brain-genericError:
      description: See error message for details
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/automation-brain-Error"
    automation-brain-400:
      description: "Bad request: input data missing or malformed"
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/automation-brain-HTTP400"
    automation-brain-401:
      description: "Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc."
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/automation-brain-HTTP400"
    automation-brain-403:
      description: Forbidden; insufficient permissions
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/automation-brain-HTTP400"
    automation-brain-404:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/automation-brain-HTTP400"
    brickworks-service-GenericError:
      description: See error message for details.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/brickworks-service-ObjectsError"
    brickworks-service-GenericBadRequestError:
      description: Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/brickworks-service-ObjectsError"
    brickworks-service-GenericUnauthorizedError:
      description: "Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details."
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/brickworks-service-GatewayError"
    brickworks-service-GenericForbiddenError:
      description: Forbidden; insufficient permissions. See error message for details.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/brickworks-service-GatewayError"
    brickworks-service-GenericNotFoundError:
      description: Resource not found. See error message for details.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/brickworks-service-ObjectsError"
    brickworks-service-GenericConflictError:
      description: The request could not be completed due to a conflict with the current state of the resource. See error message for details.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/brickworks-service-ObjectsError"
    brickworks-service-GenericUnprocessableContentError:
      description: The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/brickworks-service-ObjectsError"
    brickworks-service-GeneratedObject:
      description: Processed content of a record
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/brickworks-service-GeneratedObject"
    brickworks-service-207Response:
      description: Some operations failed
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/brickworks-service-207ResponseBody"
    business-profile-service-4xx-bpservice:
      description: Request failed. See response for details.
      content:
        application/json:
          schema:
            type: object
            required:
              - message
              - timestamp
            properties:
              httpStatus:
                $ref: "#/components/schemas/business-profile-service-ErrorStatus"
              errorCode:
                $ref: "#/components/schemas/business-profile-service-ErrorCode"
              timestamp:
                $ref: "#/components/schemas/business-profile-service-ErrorTimestamp"
              message:
                $ref: "#/components/schemas/business-profile-service-ErrorMessage"
              traceId:
                type: string
                description: Trace ID for troubleshooting
              errors:
                $ref: "#/components/schemas/business-profile-service-ErrorErrorsArray"
    business-profile-service-401-bpservice:
      description: "Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc."
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/business-profile-service-AuthError"
    business-profile-service-403-bpservice:
      description: "Unauthorized: insufficient permissions."
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/business-profile-service-AuthError"
    catalogs-400generic:
      description: A problem occurred. See the error message for details.
      content:
        application/json:
          schema:
            type: object
            properties:
              timestamp:
                type: string
                description: Time when the error occurred
              errorCode:
                type: string
                description: Error code. See [API error code reference](https://developers.synerise.com/errors.html).
              httpStatus:
                type: integer
                description: HTTP code of the error
              message:
                type: string
                description: A summary of the problem
              traceId:
                type: string
                nullable: true
                description: Trace ID for troubleshooting, if applicable
    catalogs-400:
      description: Invalid or insufficient data
      content:
        text/plain:
          schema:
            type: string
    catalogs-401:
      description: "Unauthorized: token missing/expired/invalid; invalid API key; etc."
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/catalogs-ErrorResponse"
    catalogs-403:
      description: "Forbidden: insufficient permissions; wrong consumer scope"
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/catalogs-ErrorResponse"
    catalogs-404:
      description: Entity not found
      content:
        text/plain:
          schema:
            type: string
    crm-404-pii:
      description: Resource not found or access blocked by PII protection settings
      content:
        text/plain:
          schema:
            type: string
            description: Description of the problem
    items-search-FullTextSearchResponse200:
      description: Search result
      content:
        application/json:
          schema:
            oneOf:
              - $ref: "#/components/schemas/items-search-FullTextSearchResponse"
              - $ref: "#/components/schemas/items-search-SuggestionResponse"
    items-search-FullTextSearchResponse200WithExplanation:
      description: Search result
      content:
        application/json:
          schema:
            oneOf:
              - $ref: "#/components/schemas/items-search-FullTextSearchResponseWithExplanation"
              - $ref: "#/components/schemas/items-search-SuggestionResponseWithExplanation"
    items-search-AutocompleteSearchResponse200:
      description: Search result
      content:
        application/json:
          schema:
            oneOf:
              - $ref: "#/components/schemas/items-search-AutocompleteResponse"
              - $ref: "#/components/schemas/items-search-SuggestionResponse"
    items-search-AutocompleteSearchResponse200WithExplanation:
      description: Search result
      content:
        application/json:
          schema:
            oneOf:
              - $ref: "#/components/schemas/items-search-AutocompleteResponseWithExplanation"
              - $ref: "#/components/schemas/items-search-SuggestionResponseWithExplanation"
    items-search-ListingResponse200:
      description: Listing result
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/items-search-ListingResponse"
    items-search-ListingResponse200WithExplanation:
      description: Listing result
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/items-search-ListingResponseWithExplanation"
    items-search-QueryClassificationResponse200:
      description: Query classification result
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/items-search-QueryClassificationResponse"
    items-search-SearchableAttributesMatchResponse200:
      description: Searchable attributes match result
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/items-search-SearchableAttributesMatchResponse"
    morph-401:
      description: "Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc."
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/morph-HttpErrorDetails"
    morph-403:
      description: Forbidden; insufficient permissions
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/morph-HttpErrorDetails"
    morph-BadRequest:
      description: Invalid request
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/morph-HttpErrorDetails"
          example:
            error: Bad Request
            status: 400
            timestamp: 2021-01-04T16:15:51.703Z
            message: Message describing issue with provided request
    promotions-PromotionImportBatchPartialError:
      description: Some items failed validation
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/promotions-PromotionImportBatchPartialErrorResponse"
    promotions-PromotionCreated:
      description: Promotion created
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Status of the operation
    promotions-PromotionUpdated:
      description: Promotion updated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Status of the operation
    promotions-400:
      description: Request body invalid/malformed/missing elements
      content:
        application/json:
          schema:
            anyOf:
              - $ref: "#/components/schemas/promotions-ErrorObject"
              - type: object
                title: JSON structure issue
                properties:
                  message:
                    $ref: "#/components/schemas/promotions-ResponseError"
                  code:
                    type: string
                    description: String-type code of the error
    promotions-Promotion404:
      description: Profile, promotion, or related resource not found
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/promotions-ErrorObject"
    promotions-WaitingForProfileLockReleaseError:
      description: Waiting for profile lock release
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/promotions-ErrorObject"
    promotions-PromotionDeactivationForbiddenError:
      description: Promotion deactivation is forbidden due to promotion setup.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/promotions-ErrorObject"
    promotions-ProfilePromotionsBlockedError:
      description: Profile promotions blocked
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/promotions-ErrorObject"
    promotions-PromotionActivate412:
      description: Already activated/Already redeemed/Activation limit reached/Promotion not started/Promotion expired
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/promotions-ErrorObject"
    promotions-PromotionActivate422:
      description: Global Activation limit reached
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/promotions-ErrorObject"
    promotions-ProcessSale428:
      description: Property discountSourceType in sale settings is not defined
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/promotions-ErrorObject"
    promotions-500:
      description: General error
    promotions-401:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                $ref: "#/components/schemas/promotions-ErrorCode"
              error:
                $ref: "#/components/schemas/promotions-ResponseError"
              message:
                $ref: "#/components/schemas/promotions-ResponseErrorMessage"
              timestamp:
                $ref: "#/components/schemas/promotions-ErrorTimestamp"
    promotions-403:
      description: Forbidden
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                $ref: "#/components/schemas/promotions-ErrorCode"
              error:
                $ref: "#/components/schemas/promotions-ResponseError"
              message:
                $ref: "#/components/schemas/promotions-ResponseErrorMessage"
              timestamp:
                $ref: "#/components/schemas/promotions-ErrorTimestamp"
    promotions-ClientNotFoundError:
      description: Profile not found
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/promotions-PromotionResponseMessage"
          example:
            message: Profile not found
    promotions-ClientNotFoundErrorResponseV2:
      description: Profile not found
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/promotions-ClientNotFoundError"
    promotions-InvalidDataErrorResponseV2:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/promotions-InvalidDataErrorV2"
    promotions-ClientPointsLockErrorResponseV2:
      description: Profile points lock error
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/promotions-ClientPointsLockErrorV2"
    promotions-LockAlreadyExistsError:
      description: Lock already exists
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/promotions-PromotionResponseMessage"
          example:
            message: Lock already exits
    promotions-VouchersRedeemedResponse:
      description: Vouchers redeemed
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Status of the operation
              data:
                $ref: "#/components/schemas/promotions-VoucherList"
    promotions-VouchersRedeemedResponseWithErrors:
      description: Some vouchers couldn't be redeemed
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/promotions-VouchersListWithErrors"
    push-devices-service-4xx:
      description: See error message for details
      content:
        application/json:
          schema:
            type: object
            properties:
              httpStatus:
                type: integer
                description: HTTP status of the error
              errorCode:
                type: string
                description: Code of the error. See [https://developers.synerise.com/errors.html](https://developers.synerise.com/errors.html)
              timestamp:
                type: string
                format: date/time
                description: Time when the error occurred
              message:
                type: string
                description: Short summary of the error
              traceId:
                type: string
                description: Trace ID for debugging
    push-devices-service-401:
      description: "Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc."
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/push-devices-service-HTTP400"
          example:
            error: Bad Request
            status: 400
            timestamp: 2020-10-29T13:08:16.235Z
            path: /exampleEndpoint
            message: Some fields did not pass validation
            errors:
              - code: 120
                field: exampleField
                message: "120"
                rejectedValue: exampleValue
    push-devices-service-403:
      description: Forbidden; insufficient permissions
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/push-devices-service-HTTP400"
          example:
            timestamp: 2018-06-07T07:29:27.489+00:00
            status: 403
            error: Forbidden
            message: Forbidden
            path: /path_of_the_endpoint
    push-devices-service-415:
      description: Unsupported Media Type
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/push-devices-service-HTTP400"
          example:
            timestamp: 2018-06-07T07:27:23.136+00:00
            status: 415
            error: Unsupported Media Type
            message: Content type 'application/xml' not supported
            path: /path_of_the_endpoint
    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-api-materializer-500error:
      description: An error occurred
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/recommendations-api-materializer-Error"
    recommendations-config-400:
      description: "Bad request: input data missing or malformed"
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/recommendations-config-SyneriseError"
    recommendations-config-401:
      description: "Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc."
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/recommendations-config-Error"
    recommendations-config-403:
      description: Forbidden; insufficient permissions
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/recommendations-config-Error"
    recommendations-config-500:
      description: Service not available
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/recommendations-config-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"
    recommendations-rust-all-500-error-occurred:
      description: An error occurred
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/recommendations-rust-all-Error"
    sauth-403-login:
      description: Authentication failed, see error message for details
      content:
        application/json:
          schema:
            allOf:
              - $ref: "#/components/schemas/sauth-4xx-base"
              - type: object
                properties:
                  errorCode:
                    type: string
                    description: |
                      Error code, if applicable.
                        - `SAU-302`: Email confirmation by hash code (activation link) required
                        - `SAU-303`: Email confirmation by PIN code required
    sauth-400-malformed:
      description: Request body malformed/invalid
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/sauth-4xx-base"
    sauth-401-unauthorized:
      description: JWT missing, expired, or invalid
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/sauth-4xx-base"
    sauth-403-invalid-credentials-in-body:
      description: Invalid credentials in request body
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/sauth-4xx-base"
    sauth-403-forbidden:
      description: Insufficient permissions or wrong JWT scope (for example, profile token where a workspace token was required)
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/sauth-4xx-base"
    sauth-406-account-locked:
      description: Account is locked, password reset required
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/sauth-4xx-base"
          example:
            timestamp: 2021-09-15T10:01:16.203120Z
            status: 406
            error: Banned
            message: Log in has been blocked
            path: /v2/auth/login/client
            traceId: 61b4aa7c0cb1167a
    sauth-423-device-control-enabled:
      description: Device control is enabled, device must be authorized (link sent by email)
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/sauth-4xx-base"
          example:
            timestamp: 2021-09-15T10:01:16.203120Z
            status: 423
            error: Locked
            message: Device login blocked
            path: /v2/auth/login/client
            traceId: 61b4aa7c0cb1167a
    schema-service-genericError:
      description: See error message for details
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/schema-service-ErrorSchemaService"
    schema-service-processedDocumentJsonResponse:
      description: Processed document
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/schema-service-documentContentProcessed"
    schema-service-rawDocumentJsonResponse:
      description: Details of the document (content isn't processed)
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/schema-service-Document"
    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-403:
      description: Forbidden; insufficient permissions
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/schema-service-AuthError"
    schema-service-404:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/schema-service-ErrorSchemaService"
    uauth-423:
      description: Access denied by IP policy
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/uauth-Error"
  requestBodies:
    ai-stats-RecoStatsRequest:
      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
    api-service-CreateClient-apiv4:
      description: |
        
        In the request body, you must provide at least one of those identifiers: 
        - `email`  
          If [non-unique emails](https://hub.synerise.com/docs/settings/configuration/non-unique-emails/) are enabled, email is NOT an identifier.
        - `phone`  
          Phone is treated as an identifier only if no other identifier is provided. If this is the case and non-unique emails are disabled, an anonymous profile is created with a randomized email placeholder.
        - `customId`
        - `uuid`
      content:
        application/json:
          schema:
            type: object
            allOf:
              - $ref: "#/components/schemas/api-service-CreateClientRequestBody-apiv4"
    items-search-ListingJsonBody:
      description: Request for item listing
      required: true
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/items-search-ListingRequest"
    items-search-ExplainListingJsonBody:
      description: Request for item listing with explanation
      required: true
      content:
        application/json:
          schema:
            allOf:
              - $ref: "#/components/schemas/items-search-ListingRequest"
              - type: object
                properties:
                  crossWorkspaceMode:
                    $ref: "#/components/schemas/items-search-CrossWorkspaceMode"
    items-search-FullTextSearchJsonBody:
      description: Request for performing full-text search
      required: true
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/items-search-FullTextSearchRequest"
    items-search-ExplainFullTextSearchJsonBody:
      description: Request for performing full-text search with explanation
      required: true
      content:
        application/json:
          schema:
            allOf:
              - $ref: "#/components/schemas/items-search-FullTextSearchRequest"
              - type: object
                properties:
                  crossWorkspaceMode:
                    $ref: "#/components/schemas/items-search-CrossWorkspaceMode"
    items-search-AutocompleteJsonBody:
      description: Request for performing an autocomplete search
      required: true
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/items-search-AutocompleteRequest"
    items-search-ExplainAutocompleteJsonBody:
      description: Request for performing an autocomplete search with explanation
      required: true
      content:
        application/json:
          schema:
            allOf:
              - $ref: "#/components/schemas/items-search-AutocompleteRequest"
              - type: object
                properties:
                  crossWorkspaceMode:
                    $ref: "#/components/schemas/items-search-CrossWorkspaceMode"
    items-search-VisualSearchJsonBody:
      description: Request for performing visual search
      required: true
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/items-search-VisualSearchRequest"
        multipart/form-data:
          schema:
            type: object
            properties:
              image:
                type: string
                format: binary
                description: Uploaded image to be used in the visual search
              params:
                type: object
                description: Parameters of the search
                properties:
                  page:
                    $ref: "#/components/schemas/items-search-PaginationPage"
                  limit:
                    $ref: "#/components/schemas/items-search-PaginationLimit"
                  sortBy:
                    $ref: "#/components/schemas/items-search-PaginationSortBy"
                  ordering:
                    $ref: "#/components/schemas/items-search-PaginationOrdering"
                  includeMeta:
                    $ref: "#/components/schemas/items-search-PaginationIncludeMeta"
                  clientUUID:
                    $ref: "#/components/schemas/items-search-ClientUUID"
                  correlationId:
                    $ref: "#/components/schemas/items-search-CorrelationId"
                  searchId:
                    $ref: "#/components/schemas/items-search-SearchId"
                  sortByMetric:
                    $ref: "#/components/schemas/items-search-SortByMetric"
                  sortByGeoPoints:
                    $ref: "#/components/schemas/items-search-SortByGeoPoint"
                  filterGeoPoints:
                    $ref: "#/components/schemas/items-search-FilterGeoPoints"
                  filterAroundRadius:
                    $ref: "#/components/schemas/items-search-FilterAroundRadius"
                  filterAnchor:
                    $ref: "#/components/schemas/items-search-FilterAnchor"
                  filters:
                    $ref: "#/components/schemas/items-search-Filters"
                  facets:
                    $ref: "#/components/schemas/items-search-Facets"
                  facetsSize:
                    $ref: "#/components/schemas/items-search-FacetsSize"
                  maxValuesPerFacet:
                    $ref: "#/components/schemas/items-search-MaxValuesPerFacet"
                  caseSensitiveFacetValues:
                    $ref: "#/components/schemas/items-search-CaseSensitiveFacetValues"
                  includeFacets:
                    $ref: "#/components/schemas/items-search-IncludeFacets"
                  facetsOrderBy:
                    $ref: "#/components/schemas/items-search-FacetsOrdering"
                  context:
                    $ref: "#/components/schemas/items-search-Context"
                  displayAttributes:
                    $ref: "#/components/schemas/items-search-DisplayAttributes"
                  ignoreQueryRules:
                    $ref: "#/components/schemas/items-search-IgnoreQueryRules"
                  excludeQueryRules:
                    $ref: "#/components/schemas/items-search-ExcludeQueryRules"
                  params:
                    $ref: "#/components/schemas/items-search-Params"
    items-search-ExplainVisualSearchJsonBody:
      description: Request for performing visual search with explanation
      required: true
      content:
        application/json:
          schema:
            allOf:
              - $ref: "#/components/schemas/items-search-VisualSearchRequest"
              - type: object
                properties:
                  crossWorkspaceMode:
                    $ref: "#/components/schemas/items-search-CrossWorkspaceMode"
    items-search-QueryClassificationJsonBody:
      description: Request for query classification
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              query:
                $ref: "#/components/schemas/items-search-SearchQuery"
              clientUUID:
                $ref: "#/components/schemas/items-search-ClientUUID"
              config:
                $ref: "#/components/schemas/items-search-QueryClassificationConfig"
    items-search-config-PutSearchConfigJsonBody:
      description: Request for posting search configuration
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - indexName
              - itemsCatalogId
              - language
              - searchableAttributes
              - enabled
            properties:
              indexName:
                $ref: "#/components/schemas/items-search-config-IndexNameSchema"
              description:
                $ref: "#/components/schemas/items-search-config-IndexDescriptionSchema"
              itemsCatalogId:
                $ref: "#/components/schemas/items-search-config-ItemsCatalogIdSchema"
              language:
                $ref: "#/components/schemas/items-search-config-LanguageSchema"
              enabled:
                $ref: "#/components/schemas/items-search-config-EnabledSchema"
              ignoreUnavailableItems:
                $ref: "#/components/schemas/items-search-config-IgnoreUnavailableItemsSchema"
              scoring:
                $ref: "#/components/schemas/items-search-config-ScoringSchema"
              suggestions:
                $ref: "#/components/schemas/items-search-config-Suggestions"
              tokenizer:
                $ref: "#/components/schemas/items-search-config-Tokenizer"
              analyzers:
                $ref: "#/components/schemas/items-search-config-Analyzers"
              attributesWithoutPrefixSearch:
                $ref: "#/components/schemas/items-search-config-AttributesWithoutPrefixSearchSchema"
              attributesWithoutTypoTolerance:
                $ref: "#/components/schemas/items-search-config-AttributesWithoutTypoToleranceSchema"
              valuesWithoutTypoTolerance:
                $ref: "#/components/schemas/items-search-config-ValuesWithoutTypoToleranceSchema"
              typoToleranceOnNumericValues:
                $ref: "#/components/schemas/items-search-config-TypoToleranceOnNumericValuesSchema"
              searchableAttributes:
                $ref: "#/components/schemas/items-search-config-SearchableAttributesSchema"
              displayableAttributes:
                $ref: "#/components/schemas/items-search-config-DisplayableAttributesSchema"
              facetableAttributes:
                $ref: "#/components/schemas/items-search-config-FacetableAttributesSchema"
              filterableAttributes:
                $ref: "#/components/schemas/items-search-config-FilterableAttributesSchema"
              sortableAttributes:
                $ref: "#/components/schemas/items-search-config-SortableAttributesSchema"
              distinctFilterAttributes:
                $ref: "#/components/schemas/items-search-config-DistinctFilterAttributesSchema"
              recentSearches:
                $ref: "#/components/schemas/items-search-config-RecentSearchesConfig"
              reranking:
                $ref: "#/components/schemas/items-search-config-RerankingSchema"
              geoSearch:
                $ref: "#/components/schemas/items-search-config-GeoSearchSchema"
              queryRules:
                $ref: "#/components/schemas/items-search-config-QueryRulesSchema"
    items-search-config-SuggestionIndexConfigBody:
      content:
        application/json:
          schema:
            type: object
            properties:
              indexName:
                $ref: "#/components/schemas/items-search-config-SuggestionIndexNameSchema"
              description:
                $ref: "#/components/schemas/items-search-config-SuggestionIndexDescriptionSchema"
              author:
                $ref: "#/components/schemas/items-search-config-SuggestionIndexAuthorSchema"
              enabled:
                $ref: "#/components/schemas/items-search-config-SuggestionIndexEnabledSchema"
              sources:
                $ref: "#/components/schemas/items-search-config-SuggestionIndexSourcesSchema"
              denylist:
                $ref: "#/components/schemas/items-search-config-SuggestionIndexDenylistSchema"
            required:
              - indexName
              - enabled
              - sources
    items-search-recent-DeletedSearchBody:
      description: Request for deleting search query
      required: true
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/items-search-recent-DeletedSearch"
    query-rules-v2-postRuleBody:
      content:
        application/json:
          schema:
            type: object
            properties:
              name:
                $ref: "#/components/schemas/query-rules-v2-RuleName"
              author:
                $ref: "#/components/schemas/query-rules-v2-RuleAuthor"
              activeFrom:
                $ref: "#/components/schemas/query-rules-v2-RuleActiveFromDatetime"
              activeTo:
                $ref: "#/components/schemas/query-rules-v2-RuleActiveToDatetime"
              timezone:
                $ref: "#/components/schemas/query-rules-v2-RuleTimezoneSchema"
              data:
                $ref: "#/components/schemas/query-rules-v2-RuleDataSchema"
      description: Request for posting a new rule or updating an existing one
      required: true
    recommendations-config-PatchRecommendationConfigV3JsonBody:
      description: Request for updating AI Engine configuration
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              distinctAttributes:
                $ref: "#/components/schemas/recommendations-config-DistinctAttributesSchema"
              previewAttributes:
                $ref: "#/components/schemas/recommendations-config-PreviewAttributesSchema"
              displayedAttributes:
                $ref: "#/components/schemas/recommendations-config-DisplayedAttributesSchema"
              linkAttributes:
                $ref: "#/components/schemas/recommendations-config-LinkAttributesSchema"
              models:
                $ref: "#/components/schemas/recommendations-config-ModelsSchema"
              crossWorkspaceMode:
                $ref: "#/components/schemas/recommendations-config-CrossWorkspaceMode"
    schema-service-createDocumentReq:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/schema-service-createDocumentReq"
    schema-service-generateDocumentReq:
      content:
        application/json:
          schema:
            type: object
            example:
              customer.firstName: Joe
            additionalProperties:
              $ref: "#/components/schemas/schema-service-additionalPropertiesForGenerate"
    synonyms-crud-PostSynonymBody:
      content:
        application/json:
          schema:
            type: object
            properties:
              type:
                $ref: "#/components/schemas/synonyms-crud-Type"
              word:
                $ref: "#/components/schemas/synonyms-crud-Word"
              synonyms:
                $ref: "#/components/schemas/synonyms-crud-Synonyms"
              confidence:
                $ref: "#/components/schemas/synonyms-crud-Confidence"
              reason:
                $ref: "#/components/schemas/synonyms-crud-Reason"
              source:
                $ref: "#/components/schemas/synonyms-crud-SynonymSource"
              state:
                $ref: "#/components/schemas/synonyms-crud-SynonymState"
            required:
              - synonyms
      description: Request for creating new synonym
      required: true
    synonyms-crud-CsvBody:
      description: |
        
        The CSV has three columns: 
        - `word`: the phrase to replace with a synonym
        - `synonyms`: the synonyms of the word (if more than one, the list is comma-separated and enclosed with `""`)
        - `type`: the relation type:
          - `oneway`: when the word is searched, the results show the results as if the synonyms were searched. Searching for the synonyms does NOT return results for the word or the other synonyms.
          - `synonyms`: the `word` column is empty, all phrases in `synonym` return results for every other phrase in the list.
      required: true
      content:
        text/csv:
          schema:
            type: object
            properties:
              word:
                $ref: "#/components/schemas/synonyms-crud-Word"
              synonyms:
                $ref: "#/components/schemas/synonyms-crud-Synonyms"
              type:
                $ref: "#/components/schemas/synonyms-crud-Type"
          example: |
            word,synonyms,type
            dog,"doggy,puppy",oneway
            small horse,pony,oneway
            ,"cat,kitten,kitty,tabby cat",synonyms
        multipart/form-data:
          schema:
            type: object
            properties:
              synonyms:
                type: string
                format: binary
                description: Uploaded CSV file to be used in synonyms update
    tags-collector-HashArray-collector:
      content:
        application/json:
          schema:
            type: array
            items:
              type: string
              description: Hash ID of a tag
      required: true
  examples: null
x-tagGroups:
  - name: Authorization
    tags:
      - Authorization
      - Authorization (deprecated)
  - name: Data Management
    tags:
      - Events
      - AI Events
      - Activities
      - Catalogs
      - Asset tags
      - Tags
      - Profile management
      - "Analytics: Expressions"
      - "Analytics: Aggregates"
  - name: Profile Management
    tags:
      - Profile registration
      - Profile account management
      - Profile devices
  - name: Identity and Access Management
    tags:
      - Settings
      - Access control
      - User management
      - Access groups
      - User account management
      - Directory
  - name: AI Recommendations
    tags:
      - Recommendation campaigns
      - Recommendation statistics
      - Recommendations
  - name: AI Search
    tags:
      - Search
      - Visual Search
      - Listing
      - Synonyms
      - Search Configuration
      - Suggestions Configuration
      - Query Rules
      - Search Stats
  - name: Loyalty and Engagement
    tags:
      - Promotions
      - Vouchers
      - Handbills
      - Screen views
      - Promotions points
      - Promotion settings
      - Promotion locks
      - Screen views (legacy)
  - name: AI Suite
    tags:
      - Time Optimizer
      - Item filters
  - name: Asset Management
    tags:
      - Documents
      - Uploader
      - Documents (legacy)
  - name: Campaigns
    tags:
      - Templates
      - Template directories
  - name: Automation
    tags:
      - Workflows
      - Data Processing Job Logs
  - name: Organizations
    tags:
      - Consumption
      - Organization workspaces
  - name: Analytics Suite
    tags:
      - "Analytics: Funnels"
      - "Analytics: Histograms"
      - "Analytics: Metrics"
      - "AI: Metrics"
      - "Analytics: Reports"
      - "Analytics: Sankeys"
      - "Analytics: Segmentations"
      - "Analytics: Trends"
      - "Analytics: Management"
  - name: Brickworks
    tags:
      - "Brickworks: Schemas"
      - "Brickworks: Records"
      - "Brickworks: Content generation"
      - "Brickworks: External sources"
      - "Brickworks: Record versions"
