openapi: 3.0.0
info:
  title: Synerise Public API
  version: 1.9.0
servers:
  - url: https://api.synerise.com
    description: Microsoft Azure EU
  - url: https://api.azu.synerise.com
    description: Microsoft Azure USA
  - url: https://api.geb.synerise.com
    description: Google Cloud Platform
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: Wallet passes
  - name: Screen views
  - name: Promotions points
  - name: Promotion settings
  - name: Promotion locks
  - name: Screen views (legacy)
  - name: Time Optimizer
  - name: Experiments
  - name: Item filters
  - name: Documents
  - name: Uploader
  - name: Documents (legacy)
  - name: Templates
  - name: Template directories
  - name: Workflows
  - name: Workflow schedules
  - name: Control Center
  - 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-WrappedQueriesSummary"
        "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-WrappedQueriesTop"
        "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-WrappedFiltersSummary"
        "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-WrappedRulesSummary"
        "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-WrappedQueriesSummaryMultipleIndices"
        "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-WrappedRecoStatsByCampaign"
        "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-WrappedRecoStatsByDate"
        "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-WrappedRecoStatsByDate"
        "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-WrappedRecoTopProductsStats"
        "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"
        - $ref: "#/components/parameters/analytics-isHistogramMetric"
        - $ref: "#/components/parameters/analytics-isReportMetric"
      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"
                required:
                  - data
        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&isHistogramMetric=SOME_BOOLEAN_VALUE&isReportMetric=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/metrics?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&isHistogramMetric=SOME_BOOLEAN_VALUE&isReportMetric=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/metrics?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&isHistogramMetric=SOME_BOOLEAN_VALUE&isReportMetric=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/metrics?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&isHistogramMetric=SOME_BOOLEAN_VALUE&isReportMetric=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/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',
              'isHistogramMetric' => 'SOME_BOOLEAN_VALUE',
              'isReportMetric' => '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/metrics?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&isHistogramMetric=SOME_BOOLEAN_VALUE&isReportMetric=SOME_BOOLEAN_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":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","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":"NUMBER","value":100}},"isVisibleForClientProfile":true,"allowNull":true,"grouping":[{"type":"TOP","top":0}]},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"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\":\"NUMBER\",\"value\":100}},\"isVisibleForClientProfile\":true,\"allowNull\":true,\"grouping\":[{\"type\":\"TOP\",\"top\":0}]},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}"

            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": {
                "id": "5370bf3c-2dfa-4e89-98ff-07100cffee6c",
                "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": "NUMBER",
                    "value": 100
                  }
                },
                "isVisibleForClientProfile": true,
                "allowNull": true,
                "grouping": [
                  {
                    "type": "TOP",
                    "top": 0
                  }
                ]
              },
              "inlineAnalytics": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "analyticType": "EXPRESSION",
                  "analysis": {
                    "type": "EVENT",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "name": "string",
                    "description": "string",
                    "expression": {
                      "type": "VALUE",
                      "title": "title",
                      "value": {
                        "type": "CONSTANT",
                        "constant": 10
                      }
                    }
                  }
                }
              ]
            });

            const xhr = new 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: {
                id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',
                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: 'NUMBER', value: 100}},
                isVisibleForClientProfile: true,
                allowNull: true,
                grouping: [{type: 'TOP', top: 0}]
              },
              inlineAnalytics: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  analyticType: 'EXPRESSION',
                  analysis: {
                    type: 'EVENT',
                    action: {id: 0, name: 'page.visit'},
                    name: 'string',
                    description: 'string',
                    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
                  }
                }
              ]
            }));
            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":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","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":"NUMBER","value":100}},"isVisibleForClientProfile":true,"allowNull":true,"grouping":[{"type":"TOP","top":0}]},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}');

            try {
              $response = $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\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"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\":\"NUMBER\",\"value\":100}},\"isVisibleForClientProfile\":true,\"allowNull\":true,\"grouping\":[{\"type\":\"TOP\",\"top\":0}]},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}")
              .asString();
  /analytics/{Namespace}/metrics/{AnalysisId}:
    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-AnalyticIdPathParam"
        - $ref: "#/components/parameters/analytics-pathNamespace"
      responses:
        "200":
          description: Metric details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-MetricView"
        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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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-AnalyticIdPathParam"
        - $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-MetricView"
        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/%7BAnalysisId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","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":"NUMBER","value":100}},"isVisibleForClientProfile":true,"allowNull":true,"grouping":[{"type":"TOP","top":0}]},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"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\":\"NUMBER\",\"value\":100}},\"isVisibleForClientProfile\":true,\"allowNull\":true,\"grouping\":[{\"type\":\"TOP\",\"top\":0}]},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}"

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

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

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "id": "5370bf3c-2dfa-4e89-98ff-07100cffee6c",
                "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": "NUMBER",
                    "value": 100
                  }
                },
                "isVisibleForClientProfile": true,
                "allowNull": true,
                "grouping": [
                  {
                    "type": "TOP",
                    "top": 0
                  }
                ]
              },
              "inlineAnalytics": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "analyticType": "EXPRESSION",
                  "analysis": {
                    "type": "EVENT",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "name": "string",
                    "description": "string",
                    "expression": {
                      "type": "VALUE",
                      "title": "title",
                      "value": {
                        "type": "CONSTANT",
                        "constant": 10
                      }
                    }
                  }
                }
              ]
            });

            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/%7BAnalysisId%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/%7BAnalysisId%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: {
                id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',
                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: 'NUMBER', value: 100}},
                isVisibleForClientProfile: true,
                allowNull: true,
                grouping: [{type: 'TOP', top: 0}]
              },
              inlineAnalytics: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  analyticType: 'EXPRESSION',
                  analysis: {
                    type: 'EVENT',
                    action: {id: 0, name: 'page.visit'},
                    name: 'string',
                    description: 'string',
                    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
                  }
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"analysis":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","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":"NUMBER","value":100}},"isVisibleForClientProfile":true,"allowNull":true,"grouping":[{"type":"TOP","top":0}]},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}');

            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/%7BAnalysisId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"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\":\"NUMBER\",\"value\":100}},\"isVisibleForClientProfile\":true,\"allowNull\":true,\"grouping\":[{\"type\":\"TOP\",\"top\":0}]},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}")
              .asString();
    delete:
      tags:
        - "Analytics: Metrics"
      summary: Delete metric analysis
      operationId: analytics2-metrics-delete
      parameters:
        - $ref: "#/components/parameters/analytics-AnalyticIdPathParam"
        - $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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /analytics/analytics/v4/reports/{AnalysisId}/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-AnalyticIdPathParam"
      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/%7BAnalysisId%7D/recalculate/override \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"title":"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},"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]},"variables":[{"name":"string","value":"example-string-value"}],"overrideNested":false}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"title\":\"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},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}],\"overrideNested\":false}"

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

            conn.request("POST", "/analytics/analytics/v4/reports/%7BAnalysisId%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({
              "title": "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
              },
              "filter": {
                "matching": true,
                "expressions": [
                  {
                    "type": "ATTRIBUTE",
                    "name": "string",
                    "matching": true,
                    "attribute": {
                      "expressions": [
                        {
                          "constraint": {
                            "type": "BOOL",
                            "logic": "IS_TRUE"
                          },
                          "attribute": {
                            "type": "PARAM",
                            "param": "string"
                          }
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "type": "EMPTY"
                },
                "groupBy": [
                  {
                    "type": "CONSTANT",
                    "constant": "string"
                  }
                ]
              },
              "variables": [
                {
                  "name": "string",
                  "value": "example-string-value"
                }
              ],
              "overrideNested": 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/analytics/analytics/v4/reports/%7BAnalysisId%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/%7BAnalysisId%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({
              title: '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},
              filter: {
                matching: true,
                expressions: [
                  {
                    type: 'ATTRIBUTE',
                    name: 'string',
                    matching: true,
                    attribute: {
                      expressions: [
                        {
                          constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                          attribute: {type: 'PARAM', param: 'string'}
                        }
                      ]
                    }
                  }
                ],
                expression: {type: 'EMPTY'},
                groupBy: [{type: 'CONSTANT', constant: 'string'}]
              },
              variables: [{name: 'string', value: 'example-string-value'}],
              overrideNested: false
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"title":"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},"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]},"variables":[{"name":"string","value":"example-string-value"}],"overrideNested":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/analytics/analytics/v4/reports/%7BAnalysisId%7D/recalculate/override")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"title\":\"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},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}],\"overrideNested\":false}")
              .asString();
  /analytics/analytics/v4/reports/{AnalysisId}/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-AnalyticIdPathParam"
      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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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-ReportPreviewRequest"
      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 '{"allowNull":true,"analysis":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","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"},"actions":[{"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":"PARAM","param":"string"}}]}],"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]}},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"allowNull\":true,\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"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\"},\"actions\":[{\"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\":\"PARAM\",\"param\":\"string\"}}]}],\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}"

            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({
              "allowNull": true,
              "analysis": {
                "id": "5370bf3c-2dfa-4e89-98ff-07100cffee6c",
                "title": "string",
                "description": "string",
                "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"
                    },
                    "actions": [
                      {
                        "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": "PARAM",
                          "param": "string"
                        }
                      }
                    ]
                  }
                ],
                "filter": {
                  "matching": true,
                  "expressions": [
                    {
                      "type": "ATTRIBUTE",
                      "name": "string",
                      "matching": true,
                      "attribute": {
                        "expressions": [
                          {
                            "constraint": {
                              "type": "BOOL",
                              "logic": "IS_TRUE"
                            },
                            "attribute": {
                              "type": "PARAM",
                              "param": "string"
                            }
                          }
                        ]
                      }
                    }
                  ],
                  "expression": {
                    "type": "EMPTY"
                  },
                  "groupBy": [
                    {
                      "type": "CONSTANT",
                      "constant": "string"
                    }
                  ]
                }
              },
              "inlineAnalytics": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "analyticType": "EXPRESSION",
                  "analysis": {
                    "type": "EVENT",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "name": "string",
                    "description": "string",
                    "expression": {
                      "type": "VALUE",
                      "title": "title",
                      "value": {
                        "type": "CONSTANT",
                        "constant": 10
                      }
                    }
                  }
                }
              ]
            });

            const xhr = new 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({
              allowNull: true,
              analysis: {
                id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',
                title: 'string',
                description: 'string',
                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'},
                    actions: [{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: 'PARAM', param: 'string'}
                      }
                    ]
                  }
                ],
                filter: {
                  matching: true,
                  expressions: [
                    {
                      type: 'ATTRIBUTE',
                      name: 'string',
                      matching: true,
                      attribute: {
                        expressions: [
                          {
                            constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                            attribute: {type: 'PARAM', param: 'string'}
                          }
                        ]
                      }
                    }
                  ],
                  expression: {type: 'EMPTY'},
                  groupBy: [{type: 'CONSTANT', constant: 'string'}]
                }
              },
              inlineAnalytics: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  analyticType: 'EXPRESSION',
                  analysis: {
                    type: 'EVENT',
                    action: {id: 0, name: 'page.visit'},
                    name: 'string',
                    description: 'string',
                    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
                  }
                }
              ]
            }));
            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('{"allowNull":true,"analysis":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","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"},"actions":[{"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":"PARAM","param":"string"}}]}],"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]}},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}');

            try {
              $response = $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("{\"allowNull\":true,\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"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\"},\"actions\":[{\"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\":\"PARAM\",\"param\":\"string\"}}]}],\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}")
              .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-ReportPreviewRequest"
      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 '{"allowNull":true,"analysis":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","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"},"actions":[{"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":"PARAM","param":"string"}}]}],"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]}},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"allowNull\":true,\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"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\"},\"actions\":[{\"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\":\"PARAM\",\"param\":\"string\"}}]}],\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}"

            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({
              "allowNull": true,
              "analysis": {
                "id": "5370bf3c-2dfa-4e89-98ff-07100cffee6c",
                "title": "string",
                "description": "string",
                "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"
                    },
                    "actions": [
                      {
                        "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": "PARAM",
                          "param": "string"
                        }
                      }
                    ]
                  }
                ],
                "filter": {
                  "matching": true,
                  "expressions": [
                    {
                      "type": "ATTRIBUTE",
                      "name": "string",
                      "matching": true,
                      "attribute": {
                        "expressions": [
                          {
                            "constraint": {
                              "type": "BOOL",
                              "logic": "IS_TRUE"
                            },
                            "attribute": {
                              "type": "PARAM",
                              "param": "string"
                            }
                          }
                        ]
                      }
                    }
                  ],
                  "expression": {
                    "type": "EMPTY"
                  },
                  "groupBy": [
                    {
                      "type": "CONSTANT",
                      "constant": "string"
                    }
                  ]
                }
              },
              "inlineAnalytics": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "analyticType": "EXPRESSION",
                  "analysis": {
                    "type": "EVENT",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "name": "string",
                    "description": "string",
                    "expression": {
                      "type": "VALUE",
                      "title": "title",
                      "value": {
                        "type": "CONSTANT",
                        "constant": 10
                      }
                    }
                  }
                }
              ]
            });

            const xhr = new 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({
              allowNull: true,
              analysis: {
                id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',
                title: 'string',
                description: 'string',
                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'},
                    actions: [{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: 'PARAM', param: 'string'}
                      }
                    ]
                  }
                ],
                filter: {
                  matching: true,
                  expressions: [
                    {
                      type: 'ATTRIBUTE',
                      name: 'string',
                      matching: true,
                      attribute: {
                        expressions: [
                          {
                            constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                            attribute: {type: 'PARAM', param: 'string'}
                          }
                        ]
                      }
                    }
                  ],
                  expression: {type: 'EMPTY'},
                  groupBy: [{type: 'CONSTANT', constant: 'string'}]
                }
              },
              inlineAnalytics: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  analyticType: 'EXPRESSION',
                  analysis: {
                    type: 'EVENT',
                    action: {id: 0, name: 'page.visit'},
                    name: 'string',
                    description: 'string',
                    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
                  }
                }
              ]
            }));
            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('{"allowNull":true,"analysis":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","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"},"actions":[{"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":"PARAM","param":"string"}}]}],"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]}},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}');

            try {
              $response = $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("{\"allowNull\":true,\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"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\"},\"actions\":[{\"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\":\"PARAM\",\"param\":\"string\"}}]}],\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}")
              .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:
        - $ref: "#/components/parameters/analytics-DirectoryIdPathParam"
      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:
        - $ref: "#/components/parameters/analytics-DirectoryIdPathParam"
      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/{AnalysisId}:
    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:
        - $ref: "#/components/parameters/analytics-AnalyticIdPathParam"
      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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","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":"NUMBER","value":100}},"isVisibleForClientProfile":true,"allowNull":true,"grouping":[{"type":"TOP","top":0}]},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"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\":\"NUMBER\",\"value\":100}},\"isVisibleForClientProfile\":true,\"allowNull\":true,\"grouping\":[{\"type\":\"TOP\",\"top\":0}]},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}"

            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": {
                "id": "5370bf3c-2dfa-4e89-98ff-07100cffee6c",
                "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": "NUMBER",
                    "value": 100
                  }
                },
                "isVisibleForClientProfile": true,
                "allowNull": true,
                "grouping": [
                  {
                    "type": "TOP",
                    "top": 0
                  }
                ]
              },
              "inlineAnalytics": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "analyticType": "EXPRESSION",
                  "analysis": {
                    "type": "EVENT",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "name": "string",
                    "description": "string",
                    "expression": {
                      "type": "VALUE",
                      "title": "title",
                      "value": {
                        "type": "CONSTANT",
                        "constant": 10
                      }
                    }
                  }
                }
              ]
            });

            const xhr = new 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: {
                id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',
                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: 'NUMBER', value: 100}},
                isVisibleForClientProfile: true,
                allowNull: true,
                grouping: [{type: 'TOP', top: 0}]
              },
              inlineAnalytics: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  analyticType: 'EXPRESSION',
                  analysis: {
                    type: 'EVENT',
                    action: {id: 0, name: 'page.visit'},
                    name: 'string',
                    description: 'string',
                    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
                  }
                }
              ]
            }));
            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":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","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":"NUMBER","value":100}},"isVisibleForClientProfile":true,"allowNull":true,"grouping":[{"type":"TOP","top":0}]},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}');

            try {
              $response = $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\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"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\":\"NUMBER\",\"value\":100}},\"isVisibleForClientProfile\":true,\"allowNull\":true,\"grouping\":[{\"type\":\"TOP\",\"top\":0}]},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}")
              .asString();
  /analytics/analytics/v3/metrics/{AnalysisId}/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-AnalyticIdPathParam"
      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/%7BAnalysisId%7D/recalculate/override \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"title":"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},"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]},"variables":[{"name":"string","value":"example-string-value"}],"overrideNested":false}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"title\":\"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},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}],\"overrideNested\":false}"

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

            conn.request("POST", "/analytics/analytics/v3/metrics/%7BAnalysisId%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({
              "title": "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
              },
              "filter": {
                "matching": true,
                "expressions": [
                  {
                    "type": "ATTRIBUTE",
                    "name": "string",
                    "matching": true,
                    "attribute": {
                      "expressions": [
                        {
                          "constraint": {
                            "type": "BOOL",
                            "logic": "IS_TRUE"
                          },
                          "attribute": {
                            "type": "PARAM",
                            "param": "string"
                          }
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "type": "EMPTY"
                },
                "groupBy": [
                  {
                    "type": "CONSTANT",
                    "constant": "string"
                  }
                ]
              },
              "variables": [
                {
                  "name": "string",
                  "value": "example-string-value"
                }
              ],
              "overrideNested": 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/analytics/analytics/v3/metrics/%7BAnalysisId%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/%7BAnalysisId%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({
              title: '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},
              filter: {
                matching: true,
                expressions: [
                  {
                    type: 'ATTRIBUTE',
                    name: 'string',
                    matching: true,
                    attribute: {
                      expressions: [
                        {
                          constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                          attribute: {type: 'PARAM', param: 'string'}
                        }
                      ]
                    }
                  }
                ],
                expression: {type: 'EMPTY'},
                groupBy: [{type: 'CONSTANT', constant: 'string'}]
              },
              variables: [{name: 'string', value: 'example-string-value'}],
              overrideNested: false
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"title":"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},"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]},"variables":[{"name":"string","value":"example-string-value"}],"overrideNested":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/analytics/analytics/v3/metrics/%7BAnalysisId%7D/recalculate/override")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"title\":\"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},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}],\"overrideNested\":false}")
              .asString();
  /analytics/analytics/v3/metrics/{AnalysisId}/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-AnalyticIdPathParam"
      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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%7D/recalculate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /analytics/analytics/v3/metrics/{AnalysisId}/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-AnalyticIdPathParam"
      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/%7BAnalysisId%7D/dynamic/value \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"variables":[{"name":"string","value":"example-string-value"}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}]}"

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

            conn.request("POST", "/analytics/analytics/v3/metrics/%7BAnalysisId%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": "string",
                  "value": "example-string-value"
                }
              ]
            });

            const xhr = new 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/%7BAnalysisId%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/%7BAnalysisId%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: 'string', value: 'example-string-value'}]}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"variables":[{"name":"string","value":"example-string-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/analytics/analytics/v3/metrics/%7BAnalysisId%7D/dynamic/value")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}]}")
              .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-BatchCalculationResult"
        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/{AnalysisId}/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-AnalyticIdPathParam"
        - $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:
                $ref: "#/components/schemas/analytics-ExpressionResult"
        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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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"
        - $ref: "#/components/parameters/analytics-expressionType"
        - $ref: "#/components/parameters/analytics-actionName"
      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"
                required:
                  - data
        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&type=SOME_STRING_VALUE&actionName=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&type=SOME_STRING_VALUE&actionName=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&type=SOME_STRING_VALUE&actionName=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&type=SOME_STRING_VALUE&actionName=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',
              'type' => 'SOME_STRING_VALUE',
              'actionName' => '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&type=SOME_STRING_VALUE&actionName=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":"title","value":{"type":"CONSTANT","constant":10}}},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}'
        - 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\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}"

            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": "title",
                  "value": {
                    "type": "CONSTANT",
                    "constant": 10
                  }
                }
              },
              "inlineAnalytics": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "analyticType": "EXPRESSION",
                  "analysis": {
                    "type": "EVENT",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "name": "string",
                    "description": "string",
                    "expression": {
                      "type": "VALUE",
                      "title": "title",
                      "value": {
                        "type": "CONSTANT",
                        "constant": 10
                      }
                    }
                  }
                }
              ]
            });

            const xhr = new 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: 'title', value: {type: 'CONSTANT', constant: 10}}
              },
              inlineAnalytics: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  analyticType: 'EXPRESSION',
                  analysis: {
                    type: 'EVENT',
                    action: {id: 0, name: 'page.visit'},
                    name: 'string',
                    description: 'string',
                    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
                  }
                }
              ]
            }));
            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":"title","value":{"type":"CONSTANT","constant":10}}},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}');

            try {
              $response = $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\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}")
              .asString();
  /analytics/{Namespace}/expressions/{AnalysisId}:
    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-AnalyticIdPathParam"
      responses:
        "200":
          description: Get expression details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-ExpressionView"
        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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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-AnalyticIdPathParam"
      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/%7BAnalysisId%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":"title","value":{"type":"CONSTANT","constant":10}}},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}'
        - 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\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}"

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

            conn.request("PUT", "/analytics/%7BNamespace%7D/expressions/%7BAnalysisId%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": "title",
                  "value": {
                    "type": "CONSTANT",
                    "constant": 10
                  }
                }
              },
              "inlineAnalytics": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "analyticType": "EXPRESSION",
                  "analysis": {
                    "type": "EVENT",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "name": "string",
                    "description": "string",
                    "expression": {
                      "type": "VALUE",
                      "title": "title",
                      "value": {
                        "type": "CONSTANT",
                        "constant": 10
                      }
                    }
                  }
                }
              ]
            });

            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/%7BAnalysisId%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/%7BAnalysisId%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: 'title', value: {type: 'CONSTANT', constant: 10}}
              },
              inlineAnalytics: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  analyticType: 'EXPRESSION',
                  analysis: {
                    type: 'EVENT',
                    action: {id: 0, name: 'page.visit'},
                    name: 'string',
                    description: 'string',
                    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
                  }
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/expressions/%7BAnalysisId%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":"title","value":{"type":"CONSTANT","constant":10}}},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}');

            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/%7BAnalysisId%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\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}")
              .asString();
    delete:
      tags:
        - "Analytics: Expressions"
      summary: Delete expression
      operationId: analytics2-expressions-delete
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-AnalyticIdPathParam"
      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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","type":"CLIENT","name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"identifierValue\":\"string\",\"expression\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"type\":\"CLIENT\",\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}"

            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": {
                "id": "5370bf3c-2dfa-4e89-98ff-07100cffee6c",
                "type": "CLIENT",
                "name": "string",
                "description": "string",
                "expression": {
                  "type": "VALUE",
                  "title": "title",
                  "value": {
                    "type": "CONSTANT",
                    "constant": 10
                  }
                }
              },
              "inlineAnalytics": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "analyticType": "EXPRESSION",
                  "analysis": {
                    "type": "EVENT",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "name": "string",
                    "description": "string",
                    "expression": {
                      "type": "VALUE",
                      "title": "title",
                      "value": {
                        "type": "CONSTANT",
                        "constant": 10
                      }
                    }
                  }
                }
              ]
            });

            const xhr = new 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: {
                id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',
                type: 'CLIENT',
                name: 'string',
                description: 'string',
                expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
              },
              inlineAnalytics: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  analyticType: 'EXPRESSION',
                  analysis: {
                    type: 'EVENT',
                    action: {id: 0, name: 'page.visit'},
                    name: 'string',
                    description: 'string',
                    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
                  }
                }
              ]
            }));
            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":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","type":"CLIENT","name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}');

            try {
              $response = $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\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"type\":\"CLIENT\",\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}")
              .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"
                required:
                  - data
        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":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","chartType":"COLUMN","title":"string"}]}},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}'
        - 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\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"chartType\":\"COLUMN\",\"title\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}"

            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": "5370bf3c-2dfa-4e89-98ff-07100cffee6c",
                      "chartType": "COLUMN",
                      "title": "string"
                    }
                  ]
                }
              },
              "inlineAnalytics": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "analyticType": "EXPRESSION",
                  "analysis": {
                    "type": "EVENT",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "name": "string",
                    "description": "string",
                    "expression": {
                      "type": "VALUE",
                      "title": "title",
                      "value": {
                        "type": "CONSTANT",
                        "constant": 10
                      }
                    }
                  }
                }
              ]
            });

            const xhr = new 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: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',
                      chartType: 'COLUMN',
                      title: 'string'
                    }
                  ]
                }
              },
              inlineAnalytics: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  analyticType: 'EXPRESSION',
                  analysis: {
                    type: 'EVENT',
                    action: {id: 0, name: 'page.visit'},
                    name: 'string',
                    description: 'string',
                    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
                  }
                }
              ]
            }));
            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":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","chartType":"COLUMN","title":"string"}]}},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}');

            try {
              $response = $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\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"chartType\":\"COLUMN\",\"title\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}")
              .asString();
  /analytics/{Namespace}/histograms/{AnalysisId}:
    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-AnalyticIdPathParam"
      responses:
        "200":
          description: Histogram analysis details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-HistogramView"
        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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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-AnalyticIdPathParam"
      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/%7BAnalysisId%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":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","chartType":"COLUMN","title":"string"}]}},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}'
        - 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\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"chartType\":\"COLUMN\",\"title\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}"

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

            conn.request("PUT", "/analytics/%7BNamespace%7D/histograms/%7BAnalysisId%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": "5370bf3c-2dfa-4e89-98ff-07100cffee6c",
                      "chartType": "COLUMN",
                      "title": "string"
                    }
                  ]
                }
              },
              "inlineAnalytics": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "analyticType": "EXPRESSION",
                  "analysis": {
                    "type": "EVENT",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "name": "string",
                    "description": "string",
                    "expression": {
                      "type": "VALUE",
                      "title": "title",
                      "value": {
                        "type": "CONSTANT",
                        "constant": 10
                      }
                    }
                  }
                }
              ]
            });

            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/%7BAnalysisId%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/%7BAnalysisId%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: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',
                      chartType: 'COLUMN',
                      title: 'string'
                    }
                  ]
                }
              },
              inlineAnalytics: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  analyticType: 'EXPRESSION',
                  analysis: {
                    type: 'EVENT',
                    action: {id: 0, name: 'page.visit'},
                    name: 'string',
                    description: 'string',
                    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
                  }
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/histograms/%7BAnalysisId%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":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","chartType":"COLUMN","title":"string"}]}},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}');

            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/%7BAnalysisId%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\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"chartType\":\"COLUMN\",\"title\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}")
              .asString();
    delete:
      tags:
        - "Analytics: Histograms"
      summary: Delete histogram
      operationId: analytics2-histograms-delete
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-AnalyticIdPathParam"
      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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/{AnalysisId}/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-AnalyticIdPathParam"
      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/%7BAnalysisId%7D/dynamic/value \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"variables":[{"name":"string","value":"example-string-value"}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}]}"

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

            conn.request("POST", "/analytics/analytics/v2/segmentations/%7BAnalysisId%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": "string",
                  "value": "example-string-value"
                }
              ]
            });

            const xhr = new 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/%7BAnalysisId%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/%7BAnalysisId%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: 'string', value: 'example-string-value'}]}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"variables":[{"name":"string","value":"example-string-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/analytics/analytics/v2/segmentations/%7BAnalysisId%7D/dynamic/value")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}]}")
              .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":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","segments":[{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]}}],"unique":true},"allowNull":true,"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}}],\"unique\":true},\"allowNull\":true,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}"

            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": {
                "id": "5370bf3c-2dfa-4e89-98ff-07100cffee6c",
                "title": "string",
                "description": "string",
                "segments": [
                  {
                    "title": "string",
                    "description": "string",
                    "filter": {
                      "matching": true,
                      "expressions": [
                        {
                          "type": "ATTRIBUTE",
                          "name": "string",
                          "matching": true,
                          "attribute": {
                            "expressions": [
                              {
                                "constraint": {
                                  "type": "BOOL",
                                  "logic": "IS_TRUE"
                                },
                                "attribute": {
                                  "type": "PARAM",
                                  "param": "string"
                                }
                              }
                            ]
                          }
                        }
                      ],
                      "expression": {
                        "type": "EMPTY"
                      },
                      "groupBy": [
                        {
                          "type": "CONSTANT",
                          "constant": "string"
                        }
                      ]
                    }
                  }
                ],
                "unique": true
              },
              "allowNull": true,
              "inlineAnalytics": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "analyticType": "EXPRESSION",
                  "analysis": {
                    "type": "EVENT",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "name": "string",
                    "description": "string",
                    "expression": {
                      "type": "VALUE",
                      "title": "title",
                      "value": {
                        "type": "CONSTANT",
                        "constant": 10
                      }
                    }
                  }
                }
              ]
            });

            const xhr = new 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: {
                id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',
                title: 'string',
                description: 'string',
                segments: [
                  {
                    title: 'string',
                    description: 'string',
                    filter: {
                      matching: true,
                      expressions: [
                        {
                          type: 'ATTRIBUTE',
                          name: 'string',
                          matching: true,
                          attribute: {
                            expressions: [
                              {
                                constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                                attribute: {type: 'PARAM', param: 'string'}
                              }
                            ]
                          }
                        }
                      ],
                      expression: {type: 'EMPTY'},
                      groupBy: [{type: 'CONSTANT', constant: 'string'}]
                    }
                  }
                ],
                unique: true
              },
              allowNull: true,
              inlineAnalytics: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  analyticType: 'EXPRESSION',
                  analysis: {
                    type: 'EVENT',
                    action: {id: 0, name: 'page.visit'},
                    name: 'string',
                    description: 'string',
                    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
                  }
                }
              ]
            }));
            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":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","segments":[{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]}}],"unique":true},"allowNull":true,"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}');

            try {
              $response = $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\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}}],\"unique\":true},\"allowNull\":true,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}")
              .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":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","segments":[{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]}}],"unique":true},"allowNull":true,"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}}],\"unique\":true},\"allowNull\":true,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}"

            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": {
                "id": "5370bf3c-2dfa-4e89-98ff-07100cffee6c",
                "title": "string",
                "description": "string",
                "segments": [
                  {
                    "title": "string",
                    "description": "string",
                    "filter": {
                      "matching": true,
                      "expressions": [
                        {
                          "type": "ATTRIBUTE",
                          "name": "string",
                          "matching": true,
                          "attribute": {
                            "expressions": [
                              {
                                "constraint": {
                                  "type": "BOOL",
                                  "logic": "IS_TRUE"
                                },
                                "attribute": {
                                  "type": "PARAM",
                                  "param": "string"
                                }
                              }
                            ]
                          }
                        }
                      ],
                      "expression": {
                        "type": "EMPTY"
                      },
                      "groupBy": [
                        {
                          "type": "CONSTANT",
                          "constant": "string"
                        }
                      ]
                    }
                  }
                ],
                "unique": true
              },
              "allowNull": true,
              "inlineAnalytics": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "analyticType": "EXPRESSION",
                  "analysis": {
                    "type": "EVENT",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "name": "string",
                    "description": "string",
                    "expression": {
                      "type": "VALUE",
                      "title": "title",
                      "value": {
                        "type": "CONSTANT",
                        "constant": 10
                      }
                    }
                  }
                }
              ]
            });

            const xhr = new 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: {
                id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',
                title: 'string',
                description: 'string',
                segments: [
                  {
                    title: 'string',
                    description: 'string',
                    filter: {
                      matching: true,
                      expressions: [
                        {
                          type: 'ATTRIBUTE',
                          name: 'string',
                          matching: true,
                          attribute: {
                            expressions: [
                              {
                                constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                                attribute: {type: 'PARAM', param: 'string'}
                              }
                            ]
                          }
                        }
                      ],
                      expression: {type: 'EMPTY'},
                      groupBy: [{type: 'CONSTANT', constant: 'string'}]
                    }
                  }
                ],
                unique: true
              },
              allowNull: true,
              inlineAnalytics: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  analyticType: 'EXPRESSION',
                  analysis: {
                    type: 'EVENT',
                    action: {id: 0, name: 'page.visit'},
                    name: 'string',
                    description: 'string',
                    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
                  }
                }
              ]
            }));
            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":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","segments":[{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]}}],"unique":true},"allowNull":true,"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}');

            try {
              $response = $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\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}}],\"unique\":true},\"allowNull\":true,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}")
              .asString();
  /analytics/analytics/v2/metrics/histograms/{AnalysisId}/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-AnalyticIdPathParam"
      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/%7BAnalysisId%7D/recalculate/override \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"title":"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},"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]},"variables":[{"name":"string","value":"example-string-value"}],"overrideNested":false}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"title\":\"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},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}],\"overrideNested\":false}"

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

            conn.request("POST", "/analytics/analytics/v2/metrics/histograms/%7BAnalysisId%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({
              "title": "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
              },
              "filter": {
                "matching": true,
                "expressions": [
                  {
                    "type": "ATTRIBUTE",
                    "name": "string",
                    "matching": true,
                    "attribute": {
                      "expressions": [
                        {
                          "constraint": {
                            "type": "BOOL",
                            "logic": "IS_TRUE"
                          },
                          "attribute": {
                            "type": "PARAM",
                            "param": "string"
                          }
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "type": "EMPTY"
                },
                "groupBy": [
                  {
                    "type": "CONSTANT",
                    "constant": "string"
                  }
                ]
              },
              "variables": [
                {
                  "name": "string",
                  "value": "example-string-value"
                }
              ],
              "overrideNested": 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/analytics/analytics/v2/metrics/histograms/%7BAnalysisId%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/%7BAnalysisId%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({
              title: '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},
              filter: {
                matching: true,
                expressions: [
                  {
                    type: 'ATTRIBUTE',
                    name: 'string',
                    matching: true,
                    attribute: {
                      expressions: [
                        {
                          constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                          attribute: {type: 'PARAM', param: 'string'}
                        }
                      ]
                    }
                  }
                ],
                expression: {type: 'EMPTY'},
                groupBy: [{type: 'CONSTANT', constant: 'string'}]
              },
              variables: [{name: 'string', value: 'example-string-value'}],
              overrideNested: false
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"title":"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},"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]},"variables":[{"name":"string","value":"example-string-value"}],"overrideNested":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/analytics/analytics/v2/metrics/histograms/%7BAnalysisId%7D/recalculate/override")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"title\":\"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},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}],\"overrideNested\":false}")
              .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":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","chartType":"COLUMN","title":"string"}]}},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}'
        - 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\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"chartType\":\"COLUMN\",\"title\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}"

            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": "5370bf3c-2dfa-4e89-98ff-07100cffee6c",
                      "chartType": "COLUMN",
                      "title": "string"
                    }
                  ]
                }
              },
              "inlineAnalytics": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "analyticType": "EXPRESSION",
                  "analysis": {
                    "type": "EVENT",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "name": "string",
                    "description": "string",
                    "expression": {
                      "type": "VALUE",
                      "title": "title",
                      "value": {
                        "type": "CONSTANT",
                        "constant": 10
                      }
                    }
                  }
                }
              ]
            });

            const xhr = new 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: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',
                      chartType: 'COLUMN',
                      title: 'string'
                    }
                  ]
                }
              },
              inlineAnalytics: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  analyticType: 'EXPRESSION',
                  analysis: {
                    type: 'EVENT',
                    action: {id: 0, name: 'page.visit'},
                    name: 'string',
                    description: 'string',
                    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
                  }
                }
              ]
            }));
            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":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","chartType":"COLUMN","title":"string"}]}},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}');

            try {
              $response = $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\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"chartType\":\"COLUMN\",\"title\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}")
              .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":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","segments":[{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]}}],"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\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}}],\"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": {
                      "id": "5370bf3c-2dfa-4e89-98ff-07100cffee6c",
                      "title": "string",
                      "description": "string",
                      "segments": [
                        {
                          "title": "string",
                          "description": "string",
                          "filter": {
                            "matching": true,
                            "expressions": [
                              {
                                "type": "ATTRIBUTE",
                                "name": "string",
                                "matching": true,
                                "attribute": {
                                  "expressions": [
                                    {
                                      "constraint": {
                                        "type": "BOOL",
                                        "logic": "IS_TRUE"
                                      },
                                      "attribute": {
                                        "type": "PARAM",
                                        "param": "string"
                                      }
                                    }
                                  ]
                                }
                              }
                            ],
                            "expression": {
                              "type": "EMPTY"
                            },
                            "groupBy": [
                              {
                                "type": "CONSTANT",
                                "constant": "string"
                              }
                            ]
                          }
                        }
                      ],
                      "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: {
                      id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',
                      title: 'string',
                      description: 'string',
                      segments: [
                        {
                          title: 'string',
                          description: 'string',
                          filter: {
                            matching: true,
                            expressions: [
                              {
                                type: 'ATTRIBUTE',
                                name: 'string',
                                matching: true,
                                attribute: {
                                  expressions: [
                                    {
                                      constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                                      attribute: {type: 'PARAM', param: 'string'}
                                    }
                                  ]
                                }
                              }
                            ],
                            expression: {type: 'EMPTY'},
                            groupBy: [{type: 'CONSTANT', constant: 'string'}]
                          }
                        }
                      ],
                      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":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","segments":[{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]}}],"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\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}}],\"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-SegmentationBasic"
                  meta:
                    $ref: "#/components/schemas/analytics-Meta"
                required:
                  - data
        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-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:-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":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","segments":[{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]}}],"unique":true},"isVisibleForClientProfile":true,"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}}],\"unique\":true},\"isVisibleForClientProfile\":true,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}"

            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": {
                "id": "5370bf3c-2dfa-4e89-98ff-07100cffee6c",
                "title": "string",
                "description": "string",
                "segments": [
                  {
                    "title": "string",
                    "description": "string",
                    "filter": {
                      "matching": true,
                      "expressions": [
                        {
                          "type": "ATTRIBUTE",
                          "name": "string",
                          "matching": true,
                          "attribute": {
                            "expressions": [
                              {
                                "constraint": {
                                  "type": "BOOL",
                                  "logic": "IS_TRUE"
                                },
                                "attribute": {
                                  "type": "PARAM",
                                  "param": "string"
                                }
                              }
                            ]
                          }
                        }
                      ],
                      "expression": {
                        "type": "EMPTY"
                      },
                      "groupBy": [
                        {
                          "type": "CONSTANT",
                          "constant": "string"
                        }
                      ]
                    }
                  }
                ],
                "unique": true
              },
              "isVisibleForClientProfile": true,
              "inlineAnalytics": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "analyticType": "EXPRESSION",
                  "analysis": {
                    "type": "EVENT",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "name": "string",
                    "description": "string",
                    "expression": {
                      "type": "VALUE",
                      "title": "title",
                      "value": {
                        "type": "CONSTANT",
                        "constant": 10
                      }
                    }
                  }
                }
              ]
            });

            const xhr = new 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: {
                id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',
                title: 'string',
                description: 'string',
                segments: [
                  {
                    title: 'string',
                    description: 'string',
                    filter: {
                      matching: true,
                      expressions: [
                        {
                          type: 'ATTRIBUTE',
                          name: 'string',
                          matching: true,
                          attribute: {
                            expressions: [
                              {
                                constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                                attribute: {type: 'PARAM', param: 'string'}
                              }
                            ]
                          }
                        }
                      ],
                      expression: {type: 'EMPTY'},
                      groupBy: [{type: 'CONSTANT', constant: 'string'}]
                    }
                  }
                ],
                unique: true
              },
              isVisibleForClientProfile: true,
              inlineAnalytics: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  analyticType: 'EXPRESSION',
                  analysis: {
                    type: 'EVENT',
                    action: {id: 0, name: 'page.visit'},
                    name: 'string',
                    description: 'string',
                    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
                  }
                }
              ]
            }));
            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":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","segments":[{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]}}],"unique":true},"isVisibleForClientProfile":true,"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}');

            try {
              $response = $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\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}}],\"unique\":true},\"isVisibleForClientProfile\":true,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}")
              .asString();
  /analytics/{Namespace}/segmentations/{AnalysisId}:
    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-AnalyticIdPathParam"
        - $ref: "#/components/parameters/analytics-pathNamespace"
      responses:
        "200":
          description: Segmentation details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-SegmentationView"
        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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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-AnalyticIdPathParam"
        - $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/%7BAnalysisId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","segments":[{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]}}],"unique":true},"isVisibleForClientProfile":true,"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}}],\"unique\":true},\"isVisibleForClientProfile\":true,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}"

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

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

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "id": "5370bf3c-2dfa-4e89-98ff-07100cffee6c",
                "title": "string",
                "description": "string",
                "segments": [
                  {
                    "title": "string",
                    "description": "string",
                    "filter": {
                      "matching": true,
                      "expressions": [
                        {
                          "type": "ATTRIBUTE",
                          "name": "string",
                          "matching": true,
                          "attribute": {
                            "expressions": [
                              {
                                "constraint": {
                                  "type": "BOOL",
                                  "logic": "IS_TRUE"
                                },
                                "attribute": {
                                  "type": "PARAM",
                                  "param": "string"
                                }
                              }
                            ]
                          }
                        }
                      ],
                      "expression": {
                        "type": "EMPTY"
                      },
                      "groupBy": [
                        {
                          "type": "CONSTANT",
                          "constant": "string"
                        }
                      ]
                    }
                  }
                ],
                "unique": true
              },
              "isVisibleForClientProfile": true,
              "inlineAnalytics": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "analyticType": "EXPRESSION",
                  "analysis": {
                    "type": "EVENT",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "name": "string",
                    "description": "string",
                    "expression": {
                      "type": "VALUE",
                      "title": "title",
                      "value": {
                        "type": "CONSTANT",
                        "constant": 10
                      }
                    }
                  }
                }
              ]
            });

            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/%7BAnalysisId%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/%7BAnalysisId%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: {
                id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',
                title: 'string',
                description: 'string',
                segments: [
                  {
                    title: 'string',
                    description: 'string',
                    filter: {
                      matching: true,
                      expressions: [
                        {
                          type: 'ATTRIBUTE',
                          name: 'string',
                          matching: true,
                          attribute: {
                            expressions: [
                              {
                                constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                                attribute: {type: 'PARAM', param: 'string'}
                              }
                            ]
                          }
                        }
                      ],
                      expression: {type: 'EMPTY'},
                      groupBy: [{type: 'CONSTANT', constant: 'string'}]
                    }
                  }
                ],
                unique: true
              },
              isVisibleForClientProfile: true,
              inlineAnalytics: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  analyticType: 'EXPRESSION',
                  analysis: {
                    type: 'EVENT',
                    action: {id: 0, name: 'page.visit'},
                    name: 'string',
                    description: 'string',
                    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
                  }
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"analysis":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","segments":[{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]}}],"unique":true},"isVisibleForClientProfile":true,"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}');

            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/%7BAnalysisId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}}],\"unique\":true},\"isVisibleForClientProfile\":true,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}")
              .asString();
    delete:
      tags:
        - "Analytics: Segmentations"
      summary: Delete segmentation
      operationId: analytics2-segmentation-delete
      parameters:
        - $ref: "#/components/parameters/analytics-AnalyticIdPathParam"
        - $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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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-pathNamespace"
        - $ref: "#/components/parameters/analytics-pathIdentifierType"
      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/{AggregateIdentifier}/client/{ProfileId}/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-aggregateIdentifierAsPathParam"
        - $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/%7BAggregateIdentifier%7D/client/%7BProfileId%7D/calculate/histogram \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"variables":[{"name":"string","value":"example-string-value"}],"dateFilter":{"type":"ABSOLUTE","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\":\"example-string-value\"}],\"dateFilter\":{\"type\":\"ABSOLUTE\",\"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/%7BAggregateIdentifier%7D/client/%7BProfileId%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": "example-string-value"
                }
              ],
              "dateFilter": {
                "type": "ABSOLUTE",
                "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/%7BAggregateIdentifier%7D/client/%7BProfileId%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/%7BAggregateIdentifier%7D/client/%7BProfileId%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: 'example-string-value'}],
              dateFilter: {
                type: 'ABSOLUTE',
                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/%7BAggregateIdentifier%7D/client/%7BProfileId%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":"example-string-value"}],"dateFilter":{"type":"ABSOLUTE","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/%7BAggregateIdentifier%7D/client/%7BProfileId%7D/calculate/histogram")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}],\"dateFilter\":{\"type\":\"ABSOLUTE\",\"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-AggregatePreviewRequest"
      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 '{"identifierValue":"string","aggregate":{"aggregateType":"AGGREGATE","id":0,"name":"string","description":"string","uuid":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","type":"AVG","level":0.1,"size":0,"unique":true,"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}],"attribute":{"type":"PARAM","param":"string"},"action":{"id":0,"name":"page.visit"}},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"identifierValue\":\"string\",\"aggregate\":{\"aggregateType\":\"AGGREGATE\",\"id\":0,\"name\":\"string\",\"description\":\"string\",\"uuid\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"type\":\"AVG\",\"level\":0.1,\"size\":0,\"unique\":true,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"},\"action\":{\"id\":0,\"name\":\"page.visit\"}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}"

            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({
              "identifierValue": "string",
              "aggregate": {
                "aggregateType": "AGGREGATE",
                "id": 0,
                "name": "string",
                "description": "string",
                "uuid": "5370bf3c-2dfa-4e89-98ff-07100cffee6c",
                "type": "AVG",
                "level": 0.1,
                "size": 0,
                "unique": true,
                "dateFilter": {
                  "type": "ABSOLUTE",
                  "from": "2019-08-24T14:15:22Z",
                  "to": "2019-08-24T14:15:22Z",
                  "filter": {
                    "type": "DAILY",
                    "nestingType": "IN_PLACE",
                    "from": "string",
                    "to": "string",
                    "inverted": false
                  }
                },
                "expressions": [
                  {
                    "constraint": {
                      "type": "BOOL",
                      "logic": "IS_TRUE"
                    },
                    "attribute": {
                      "type": "PARAM",
                      "param": "string"
                    }
                  }
                ],
                "attribute": {
                  "type": "PARAM",
                  "param": "string"
                },
                "action": {
                  "id": 0,
                  "name": "page.visit"
                }
              },
              "inlineAnalytics": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "analyticType": "EXPRESSION",
                  "analysis": {
                    "type": "EVENT",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "name": "string",
                    "description": "string",
                    "expression": {
                      "type": "VALUE",
                      "title": "title",
                      "value": {
                        "type": "CONSTANT",
                        "constant": 10
                      }
                    }
                  }
                }
              ]
            });

            const xhr = new 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({
              identifierValue: 'string',
              aggregate: {
                aggregateType: 'AGGREGATE',
                id: 0,
                name: 'string',
                description: 'string',
                uuid: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',
                type: 'AVG',
                level: 0.1,
                size: 0,
                unique: true,
                dateFilter: {
                  type: 'ABSOLUTE',
                  from: '2019-08-24T14:15:22Z',
                  to: '2019-08-24T14:15:22Z',
                  filter: {
                    type: 'DAILY',
                    nestingType: 'IN_PLACE',
                    from: 'string',
                    to: 'string',
                    inverted: false
                  }
                },
                expressions: [
                  {
                    constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                    attribute: {type: 'PARAM', param: 'string'}
                  }
                ],
                attribute: {type: 'PARAM', param: 'string'},
                action: {id: 0, name: 'page.visit'}
              },
              inlineAnalytics: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  analyticType: 'EXPRESSION',
                  analysis: {
                    type: 'EVENT',
                    action: {id: 0, name: 'page.visit'},
                    name: 'string',
                    description: 'string',
                    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
                  }
                }
              ]
            }));
            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('{"identifierValue":"string","aggregate":{"aggregateType":"AGGREGATE","id":0,"name":"string","description":"string","uuid":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","type":"AVG","level":0.1,"size":0,"unique":true,"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}],"attribute":{"type":"PARAM","param":"string"},"action":{"id":0,"name":"page.visit"}},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}');

            try {
              $response = $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("{\"identifierValue\":\"string\",\"aggregate\":{\"aggregateType\":\"AGGREGATE\",\"id\":0,\"name\":\"string\",\"description\":\"string\",\"uuid\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"type\":\"AVG\",\"level\":0.1,\"size\":0,\"unique\":true,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"},\"action\":{\"id\":0,\"name\":\"page.visit\"}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}")
              .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/{AggregateIdentifier}/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-aggregateIdentifierAsPathParam"
        - $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/%7BAggregateIdentifier%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/%7BAggregateIdentifier%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/%7BAggregateIdentifier%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/%7BAggregateIdentifier%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/%7BAggregateIdentifier%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/%7BAggregateIdentifier%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-AggregatePaginationContainer"
        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":"AGGREGATE","id":0,"name":"string","description":"string","uuid":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","type":"AVG","level":0.1,"size":0,"unique":true,"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}],"attribute":{"type":"PARAM","param":"string"},"action":{"id":0,"name":"page.visit"}},"isVisibleForClientProfile":true,"aggregateType":"AGGREGATE","previewDefaultObjectId":0,"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"aggregateType\":\"AGGREGATE\",\"id\":0,\"name\":\"string\",\"description\":\"string\",\"uuid\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"type\":\"AVG\",\"level\":0.1,\"size\":0,\"unique\":true,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"},\"action\":{\"id\":0,\"name\":\"page.visit\"}},\"isVisibleForClientProfile\":true,\"aggregateType\":\"AGGREGATE\",\"previewDefaultObjectId\":0,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}"

            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": "AGGREGATE",
                "id": 0,
                "name": "string",
                "description": "string",
                "uuid": "5370bf3c-2dfa-4e89-98ff-07100cffee6c",
                "type": "AVG",
                "level": 0.1,
                "size": 0,
                "unique": true,
                "dateFilter": {
                  "type": "ABSOLUTE",
                  "from": "2019-08-24T14:15:22Z",
                  "to": "2019-08-24T14:15:22Z",
                  "filter": {
                    "type": "DAILY",
                    "nestingType": "IN_PLACE",
                    "from": "string",
                    "to": "string",
                    "inverted": false
                  }
                },
                "expressions": [
                  {
                    "constraint": {
                      "type": "BOOL",
                      "logic": "IS_TRUE"
                    },
                    "attribute": {
                      "type": "PARAM",
                      "param": "string"
                    }
                  }
                ],
                "attribute": {
                  "type": "PARAM",
                  "param": "string"
                },
                "action": {
                  "id": 0,
                  "name": "page.visit"
                }
              },
              "isVisibleForClientProfile": true,
              "aggregateType": "AGGREGATE",
              "previewDefaultObjectId": 0,
              "inlineAnalytics": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "analyticType": "EXPRESSION",
                  "analysis": {
                    "type": "EVENT",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "name": "string",
                    "description": "string",
                    "expression": {
                      "type": "VALUE",
                      "title": "title",
                      "value": {
                        "type": "CONSTANT",
                        "constant": 10
                      }
                    }
                  }
                }
              ]
            });

            const xhr = new 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: 'AGGREGATE',
                id: 0,
                name: 'string',
                description: 'string',
                uuid: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',
                type: 'AVG',
                level: 0.1,
                size: 0,
                unique: true,
                dateFilter: {
                  type: 'ABSOLUTE',
                  from: '2019-08-24T14:15:22Z',
                  to: '2019-08-24T14:15:22Z',
                  filter: {
                    type: 'DAILY',
                    nestingType: 'IN_PLACE',
                    from: 'string',
                    to: 'string',
                    inverted: false
                  }
                },
                expressions: [
                  {
                    constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                    attribute: {type: 'PARAM', param: 'string'}
                  }
                ],
                attribute: {type: 'PARAM', param: 'string'},
                action: {id: 0, name: 'page.visit'}
              },
              isVisibleForClientProfile: true,
              aggregateType: 'AGGREGATE',
              previewDefaultObjectId: 0,
              inlineAnalytics: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  analyticType: 'EXPRESSION',
                  analysis: {
                    type: 'EVENT',
                    action: {id: 0, name: 'page.visit'},
                    name: 'string',
                    description: 'string',
                    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
                  }
                }
              ]
            }));
            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":"AGGREGATE","id":0,"name":"string","description":"string","uuid":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","type":"AVG","level":0.1,"size":0,"unique":true,"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}],"attribute":{"type":"PARAM","param":"string"},"action":{"id":0,"name":"page.visit"}},"isVisibleForClientProfile":true,"aggregateType":"AGGREGATE","previewDefaultObjectId":0,"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}');

            try {
              $response = $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\":\"AGGREGATE\",\"id\":0,\"name\":\"string\",\"description\":\"string\",\"uuid\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"type\":\"AVG\",\"level\":0.1,\"size\":0,\"unique\":true,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"},\"action\":{\"id\":0,\"name\":\"page.visit\"}},\"isVisibleForClientProfile\":true,\"aggregateType\":\"AGGREGATE\",\"previewDefaultObjectId\":0,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}")
              .asString();
  /analytics/{Namespace}/aggregates/{AggregateIdentifier}:
    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-aggregateIdentifierAsPathParam"
      responses:
        "200":
          description: Details of the aggregate
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-AggregateView"
        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/%7BAggregateIdentifier%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/%7BAggregateIdentifier%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/%7BAggregateIdentifier%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/%7BAggregateIdentifier%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/%7BAggregateIdentifier%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/%7BAggregateIdentifier%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-aggregateIdentifierAsPathParam"
      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/%7BAggregateIdentifier%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"aggregateType":"AGGREGATE","id":0,"name":"string","description":"string","uuid":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","type":"AVG","level":0.1,"size":0,"unique":true,"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}],"attribute":{"type":"PARAM","param":"string"},"action":{"id":0,"name":"page.visit"}},"isVisibleForClientProfile":true,"aggregateType":"AGGREGATE","previewDefaultObjectId":0,"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"aggregateType\":\"AGGREGATE\",\"id\":0,\"name\":\"string\",\"description\":\"string\",\"uuid\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"type\":\"AVG\",\"level\":0.1,\"size\":0,\"unique\":true,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"},\"action\":{\"id\":0,\"name\":\"page.visit\"}},\"isVisibleForClientProfile\":true,\"aggregateType\":\"AGGREGATE\",\"previewDefaultObjectId\":0,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}"

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

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

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "aggregateType": "AGGREGATE",
                "id": 0,
                "name": "string",
                "description": "string",
                "uuid": "5370bf3c-2dfa-4e89-98ff-07100cffee6c",
                "type": "AVG",
                "level": 0.1,
                "size": 0,
                "unique": true,
                "dateFilter": {
                  "type": "ABSOLUTE",
                  "from": "2019-08-24T14:15:22Z",
                  "to": "2019-08-24T14:15:22Z",
                  "filter": {
                    "type": "DAILY",
                    "nestingType": "IN_PLACE",
                    "from": "string",
                    "to": "string",
                    "inverted": false
                  }
                },
                "expressions": [
                  {
                    "constraint": {
                      "type": "BOOL",
                      "logic": "IS_TRUE"
                    },
                    "attribute": {
                      "type": "PARAM",
                      "param": "string"
                    }
                  }
                ],
                "attribute": {
                  "type": "PARAM",
                  "param": "string"
                },
                "action": {
                  "id": 0,
                  "name": "page.visit"
                }
              },
              "isVisibleForClientProfile": true,
              "aggregateType": "AGGREGATE",
              "previewDefaultObjectId": 0,
              "inlineAnalytics": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "analyticType": "EXPRESSION",
                  "analysis": {
                    "type": "EVENT",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "name": "string",
                    "description": "string",
                    "expression": {
                      "type": "VALUE",
                      "title": "title",
                      "value": {
                        "type": "CONSTANT",
                        "constant": 10
                      }
                    }
                  }
                }
              ]
            });

            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/%7BAggregateIdentifier%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/%7BAggregateIdentifier%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: {
                aggregateType: 'AGGREGATE',
                id: 0,
                name: 'string',
                description: 'string',
                uuid: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',
                type: 'AVG',
                level: 0.1,
                size: 0,
                unique: true,
                dateFilter: {
                  type: 'ABSOLUTE',
                  from: '2019-08-24T14:15:22Z',
                  to: '2019-08-24T14:15:22Z',
                  filter: {
                    type: 'DAILY',
                    nestingType: 'IN_PLACE',
                    from: 'string',
                    to: 'string',
                    inverted: false
                  }
                },
                expressions: [
                  {
                    constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                    attribute: {type: 'PARAM', param: 'string'}
                  }
                ],
                attribute: {type: 'PARAM', param: 'string'},
                action: {id: 0, name: 'page.visit'}
              },
              isVisibleForClientProfile: true,
              aggregateType: 'AGGREGATE',
              previewDefaultObjectId: 0,
              inlineAnalytics: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  analyticType: 'EXPRESSION',
                  analysis: {
                    type: 'EVENT',
                    action: {id: 0, name: 'page.visit'},
                    name: 'string',
                    description: 'string',
                    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
                  }
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"analysis":{"aggregateType":"AGGREGATE","id":0,"name":"string","description":"string","uuid":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","type":"AVG","level":0.1,"size":0,"unique":true,"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}],"attribute":{"type":"PARAM","param":"string"},"action":{"id":0,"name":"page.visit"}},"isVisibleForClientProfile":true,"aggregateType":"AGGREGATE","previewDefaultObjectId":0,"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}');

            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/%7BAggregateIdentifier%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"aggregateType\":\"AGGREGATE\",\"id\":0,\"name\":\"string\",\"description\":\"string\",\"uuid\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"type\":\"AVG\",\"level\":0.1,\"size\":0,\"unique\":true,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"},\"action\":{\"id\":0,\"name\":\"page.visit\"}},\"isVisibleForClientProfile\":true,\"aggregateType\":\"AGGREGATE\",\"previewDefaultObjectId\":0,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}")
              .asString();
    delete:
      tags:
        - "Analytics: Aggregates"
      summary: Delete aggregate
      operationId: analytics2-aggregate-delete
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-aggregateIdentifierAsPathParam"
      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/%7BAggregateIdentifier%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/%7BAggregateIdentifier%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/%7BAggregateIdentifier%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/%7BAggregateIdentifier%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/%7BAggregateIdentifier%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/%7BAggregateIdentifier%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":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","sourceEvent":{"action":{"id":0,"name":"page.visit"},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]},"reverseOrder":true,"numberOfSteps":0,"numberOfPaths":0,"drillDown":[{"layer":0,"action":{"id":0,"name":"page.visit"},"attribute":{"type":"PARAM","param":"string"}}],"drillDownCount":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}},"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]},"eventFilters":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}],"excludeEvents":true,"firstOccurrenceOnly":true},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"sourceEvent\":{\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]},\"reverseOrder\":true,\"numberOfSteps\":0,\"numberOfPaths\":0,\"drillDown\":[{\"layer\":0,\"action\":{\"id\":0,\"name\":\"page.visit\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"drillDownCount\":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}},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"eventFilters\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"excludeEvents\":true,\"firstOccurrenceOnly\":true},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}"

            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": {
                "id": "5370bf3c-2dfa-4e89-98ff-07100cffee6c",
                "title": "string",
                "description": "string",
                "sourceEvent": {
                  "action": {
                    "id": 0,
                    "name": "page.visit"
                  },
                  "expressions": [
                    {
                      "constraint": {
                        "type": "BOOL",
                        "logic": "IS_TRUE"
                      },
                      "attribute": {
                        "type": "PARAM",
                        "param": "string"
                      }
                    }
                  ]
                },
                "reverseOrder": true,
                "numberOfSteps": 0,
                "numberOfPaths": 0,
                "drillDown": [
                  {
                    "layer": 0,
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "attribute": {
                      "type": "PARAM",
                      "param": "string"
                    }
                  }
                ],
                "drillDownCount": 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
                  }
                },
                "filter": {
                  "matching": true,
                  "expressions": [
                    {
                      "type": "ATTRIBUTE",
                      "name": "string",
                      "matching": true,
                      "attribute": {
                        "expressions": [
                          {
                            "constraint": {
                              "type": "BOOL",
                              "logic": "IS_TRUE"
                            },
                            "attribute": {
                              "type": "PARAM",
                              "param": "string"
                            }
                          }
                        ]
                      }
                    }
                  ],
                  "expression": {
                    "type": "EMPTY"
                  },
                  "groupBy": [
                    {
                      "type": "CONSTANT",
                      "constant": "string"
                    }
                  ]
                },
                "eventFilters": [
                  {
                    "title": "string",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "expressions": [
                      {
                        "constraint": {
                          "type": "BOOL",
                          "logic": "IS_TRUE"
                        },
                        "attribute": {
                          "type": "PARAM",
                          "param": "string"
                        }
                      }
                    ]
                  }
                ],
                "excludeEvents": true,
                "firstOccurrenceOnly": true
              },
              "inlineAnalytics": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "analyticType": "EXPRESSION",
                  "analysis": {
                    "type": "EVENT",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "name": "string",
                    "description": "string",
                    "expression": {
                      "type": "VALUE",
                      "title": "title",
                      "value": {
                        "type": "CONSTANT",
                        "constant": 10
                      }
                    }
                  }
                }
              ]
            });

            const xhr = new 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: {
                id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',
                title: 'string',
                description: 'string',
                sourceEvent: {
                  action: {id: 0, name: 'page.visit'},
                  expressions: [
                    {
                      constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                      attribute: {type: 'PARAM', param: 'string'}
                    }
                  ]
                },
                reverseOrder: true,
                numberOfSteps: 0,
                numberOfPaths: 0,
                drillDown: [
                  {
                    layer: 0,
                    action: {id: 0, name: 'page.visit'},
                    attribute: {type: 'PARAM', param: 'string'}
                  }
                ],
                drillDownCount: 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
                  }
                },
                filter: {
                  matching: true,
                  expressions: [
                    {
                      type: 'ATTRIBUTE',
                      name: 'string',
                      matching: true,
                      attribute: {
                        expressions: [
                          {
                            constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                            attribute: {type: 'PARAM', param: 'string'}
                          }
                        ]
                      }
                    }
                  ],
                  expression: {type: 'EMPTY'},
                  groupBy: [{type: 'CONSTANT', constant: 'string'}]
                },
                eventFilters: [
                  {
                    title: 'string',
                    action: {id: 0, name: 'page.visit'},
                    expressions: [
                      {
                        constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                        attribute: {type: 'PARAM', param: 'string'}
                      }
                    ]
                  }
                ],
                excludeEvents: true,
                firstOccurrenceOnly: true
              },
              inlineAnalytics: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  analyticType: 'EXPRESSION',
                  analysis: {
                    type: 'EVENT',
                    action: {id: 0, name: 'page.visit'},
                    name: 'string',
                    description: 'string',
                    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
                  }
                }
              ]
            }));
            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":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","sourceEvent":{"action":{"id":0,"name":"page.visit"},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]},"reverseOrder":true,"numberOfSteps":0,"numberOfPaths":0,"drillDown":[{"layer":0,"action":{"id":0,"name":"page.visit"},"attribute":{"type":"PARAM","param":"string"}}],"drillDownCount":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}},"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]},"eventFilters":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}],"excludeEvents":true,"firstOccurrenceOnly":true},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}');

            try {
              $response = $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\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"sourceEvent\":{\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]},\"reverseOrder\":true,\"numberOfSteps\":0,\"numberOfPaths\":0,\"drillDown\":[{\"layer\":0,\"action\":{\"id\":0,\"name\":\"page.visit\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"drillDownCount\":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}},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"eventFilters\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"excludeEvents\":true,\"firstOccurrenceOnly\":true},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}")
              .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":{"title":"string","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}},"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}],"exact":false},"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]}},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"funnel\":{\"title\":\"string\",\"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}},\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"exact\":false},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}"

            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": {
                  "title": "string",
                  "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
                    }
                  },
                  "steps": [
                    {
                      "title": "string",
                      "action": {
                        "id": 0,
                        "name": "page.visit"
                      },
                      "expressions": [
                        {
                          "constraint": {
                            "type": "BOOL",
                            "logic": "IS_TRUE"
                          },
                          "attribute": {
                            "type": "PARAM",
                            "param": "string"
                          }
                        }
                      ]
                    }
                  ],
                  "exact": false
                },
                "filter": {
                  "matching": true,
                  "expressions": [
                    {
                      "type": "ATTRIBUTE",
                      "name": "string",
                      "matching": true,
                      "attribute": {
                        "expressions": [
                          {
                            "constraint": {
                              "type": "BOOL",
                              "logic": "IS_TRUE"
                            },
                            "attribute": {
                              "type": "PARAM",
                              "param": "string"
                            }
                          }
                        ]
                      }
                    }
                  ],
                  "expression": {
                    "type": "EMPTY"
                  },
                  "groupBy": [
                    {
                      "type": "CONSTANT",
                      "constant": "string"
                    }
                  ]
                }
              },
              "inlineAnalytics": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "analyticType": "EXPRESSION",
                  "analysis": {
                    "type": "EVENT",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "name": "string",
                    "description": "string",
                    "expression": {
                      "type": "VALUE",
                      "title": "title",
                      "value": {
                        "type": "CONSTANT",
                        "constant": 10
                      }
                    }
                  }
                }
              ]
            });

            const xhr = new 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: {
                  title: 'string',
                  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
                    }
                  },
                  steps: [
                    {
                      title: 'string',
                      action: {id: 0, name: 'page.visit'},
                      expressions: [
                        {
                          constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                          attribute: {type: 'PARAM', param: 'string'}
                        }
                      ]
                    }
                  ],
                  exact: false
                },
                filter: {
                  matching: true,
                  expressions: [
                    {
                      type: 'ATTRIBUTE',
                      name: 'string',
                      matching: true,
                      attribute: {
                        expressions: [
                          {
                            constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                            attribute: {type: 'PARAM', param: 'string'}
                          }
                        ]
                      }
                    }
                  ],
                  expression: {type: 'EMPTY'},
                  groupBy: [{type: 'CONSTANT', constant: 'string'}]
                }
              },
              inlineAnalytics: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  analyticType: 'EXPRESSION',
                  analysis: {
                    type: 'EVENT',
                    action: {id: 0, name: 'page.visit'},
                    name: 'string',
                    description: 'string',
                    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
                  }
                }
              ]
            }));
            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":{"title":"string","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}},"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}],"exact":false},"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]}},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}');

            try {
              $response = $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\":{\"title\":\"string\",\"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}},\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"exact\":false},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}")
              .asString();
  /analytics/analytics/v2/funnels/{AnalysisId}/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-AnalyticIdPathParam"
      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/%7BAnalysisId%7D/recalculate/override \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"title":"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},"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]},"variables":[{"name":"string","value":"example-string-value"}],"overrideNested":false}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"title\":\"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},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}],\"overrideNested\":false}"

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

            conn.request("POST", "/analytics/analytics/v2/funnels/%7BAnalysisId%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({
              "title": "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
              },
              "filter": {
                "matching": true,
                "expressions": [
                  {
                    "type": "ATTRIBUTE",
                    "name": "string",
                    "matching": true,
                    "attribute": {
                      "expressions": [
                        {
                          "constraint": {
                            "type": "BOOL",
                            "logic": "IS_TRUE"
                          },
                          "attribute": {
                            "type": "PARAM",
                            "param": "string"
                          }
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "type": "EMPTY"
                },
                "groupBy": [
                  {
                    "type": "CONSTANT",
                    "constant": "string"
                  }
                ]
              },
              "variables": [
                {
                  "name": "string",
                  "value": "example-string-value"
                }
              ],
              "overrideNested": 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/analytics/analytics/v2/funnels/%7BAnalysisId%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/%7BAnalysisId%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({
              title: '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},
              filter: {
                matching: true,
                expressions: [
                  {
                    type: 'ATTRIBUTE',
                    name: 'string',
                    matching: true,
                    attribute: {
                      expressions: [
                        {
                          constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                          attribute: {type: 'PARAM', param: 'string'}
                        }
                      ]
                    }
                  }
                ],
                expression: {type: 'EMPTY'},
                groupBy: [{type: 'CONSTANT', constant: 'string'}]
              },
              variables: [{name: 'string', value: 'example-string-value'}],
              overrideNested: false
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"title":"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},"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]},"variables":[{"name":"string","value":"example-string-value"}],"overrideNested":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/analytics/analytics/v2/funnels/%7BAnalysisId%7D/recalculate/override")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"title\":\"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},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}],\"overrideNested\":false}")
              .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"
                required:
                  - data
        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-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:-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":{"title":"string","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}},"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}],"exact":false},"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]}},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"funnel\":{\"title\":\"string\",\"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}},\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"exact\":false},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}"

            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": {
                  "title": "string",
                  "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
                    }
                  },
                  "steps": [
                    {
                      "title": "string",
                      "action": {
                        "id": 0,
                        "name": "page.visit"
                      },
                      "expressions": [
                        {
                          "constraint": {
                            "type": "BOOL",
                            "logic": "IS_TRUE"
                          },
                          "attribute": {
                            "type": "PARAM",
                            "param": "string"
                          }
                        }
                      ]
                    }
                  ],
                  "exact": false
                },
                "filter": {
                  "matching": true,
                  "expressions": [
                    {
                      "type": "ATTRIBUTE",
                      "name": "string",
                      "matching": true,
                      "attribute": {
                        "expressions": [
                          {
                            "constraint": {
                              "type": "BOOL",
                              "logic": "IS_TRUE"
                            },
                            "attribute": {
                              "type": "PARAM",
                              "param": "string"
                            }
                          }
                        ]
                      }
                    }
                  ],
                  "expression": {
                    "type": "EMPTY"
                  },
                  "groupBy": [
                    {
                      "type": "CONSTANT",
                      "constant": "string"
                    }
                  ]
                }
              },
              "inlineAnalytics": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "analyticType": "EXPRESSION",
                  "analysis": {
                    "type": "EVENT",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "name": "string",
                    "description": "string",
                    "expression": {
                      "type": "VALUE",
                      "title": "title",
                      "value": {
                        "type": "CONSTANT",
                        "constant": 10
                      }
                    }
                  }
                }
              ]
            });

            const xhr = new 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: {
                  title: 'string',
                  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
                    }
                  },
                  steps: [
                    {
                      title: 'string',
                      action: {id: 0, name: 'page.visit'},
                      expressions: [
                        {
                          constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                          attribute: {type: 'PARAM', param: 'string'}
                        }
                      ]
                    }
                  ],
                  exact: false
                },
                filter: {
                  matching: true,
                  expressions: [
                    {
                      type: 'ATTRIBUTE',
                      name: 'string',
                      matching: true,
                      attribute: {
                        expressions: [
                          {
                            constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                            attribute: {type: 'PARAM', param: 'string'}
                          }
                        ]
                      }
                    }
                  ],
                  expression: {type: 'EMPTY'},
                  groupBy: [{type: 'CONSTANT', constant: 'string'}]
                }
              },
              inlineAnalytics: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  analyticType: 'EXPRESSION',
                  analysis: {
                    type: 'EVENT',
                    action: {id: 0, name: 'page.visit'},
                    name: 'string',
                    description: 'string',
                    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
                  }
                }
              ]
            }));
            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":{"title":"string","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}},"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}],"exact":false},"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]}},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}');

            try {
              $response = $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\":{\"title\":\"string\",\"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}},\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"exact\":false},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}")
              .asString();
  /analytics/{Namespace}/funnels/{AnalysisId}:
    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-AnalyticIdPathParam"
      responses:
        "200":
          description: Details of the funnel
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-FunnelView"
        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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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-AnalyticIdPathParam"
      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/%7BAnalysisId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"title":"string","description":"string","funnel":{"title":"string","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}},"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}],"exact":false},"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]}},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"funnel\":{\"title\":\"string\",\"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}},\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"exact\":false},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}"

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

            conn.request("PUT", "/analytics/%7BNamespace%7D/funnels/%7BAnalysisId%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": {
                  "title": "string",
                  "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
                    }
                  },
                  "steps": [
                    {
                      "title": "string",
                      "action": {
                        "id": 0,
                        "name": "page.visit"
                      },
                      "expressions": [
                        {
                          "constraint": {
                            "type": "BOOL",
                            "logic": "IS_TRUE"
                          },
                          "attribute": {
                            "type": "PARAM",
                            "param": "string"
                          }
                        }
                      ]
                    }
                  ],
                  "exact": false
                },
                "filter": {
                  "matching": true,
                  "expressions": [
                    {
                      "type": "ATTRIBUTE",
                      "name": "string",
                      "matching": true,
                      "attribute": {
                        "expressions": [
                          {
                            "constraint": {
                              "type": "BOOL",
                              "logic": "IS_TRUE"
                            },
                            "attribute": {
                              "type": "PARAM",
                              "param": "string"
                            }
                          }
                        ]
                      }
                    }
                  ],
                  "expression": {
                    "type": "EMPTY"
                  },
                  "groupBy": [
                    {
                      "type": "CONSTANT",
                      "constant": "string"
                    }
                  ]
                }
              },
              "inlineAnalytics": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "analyticType": "EXPRESSION",
                  "analysis": {
                    "type": "EVENT",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "name": "string",
                    "description": "string",
                    "expression": {
                      "type": "VALUE",
                      "title": "title",
                      "value": {
                        "type": "CONSTANT",
                        "constant": 10
                      }
                    }
                  }
                }
              ]
            });

            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/%7BAnalysisId%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/%7BAnalysisId%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: {
                  title: 'string',
                  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
                    }
                  },
                  steps: [
                    {
                      title: 'string',
                      action: {id: 0, name: 'page.visit'},
                      expressions: [
                        {
                          constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                          attribute: {type: 'PARAM', param: 'string'}
                        }
                      ]
                    }
                  ],
                  exact: false
                },
                filter: {
                  matching: true,
                  expressions: [
                    {
                      type: 'ATTRIBUTE',
                      name: 'string',
                      matching: true,
                      attribute: {
                        expressions: [
                          {
                            constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                            attribute: {type: 'PARAM', param: 'string'}
                          }
                        ]
                      }
                    }
                  ],
                  expression: {type: 'EMPTY'},
                  groupBy: [{type: 'CONSTANT', constant: 'string'}]
                }
              },
              inlineAnalytics: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  analyticType: 'EXPRESSION',
                  analysis: {
                    type: 'EVENT',
                    action: {id: 0, name: 'page.visit'},
                    name: 'string',
                    description: 'string',
                    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
                  }
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/funnels/%7BAnalysisId%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":{"title":"string","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}},"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}],"exact":false},"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]}},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}');

            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/%7BAnalysisId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"funnel\":{\"title\":\"string\",\"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}},\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"exact\":false},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}")
              .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-AnalyticIdPathParam"
      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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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"
                required:
                  - data
        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-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:-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":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","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"},"actions":[{"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":"PARAM","param":"string"}}]}],"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]}},"allowNull":true,"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"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\"},\"actions\":[{\"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\":\"PARAM\",\"param\":\"string\"}}]}],\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}},\"allowNull\":true,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}"

            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": {
                "id": "5370bf3c-2dfa-4e89-98ff-07100cffee6c",
                "title": "string",
                "description": "string",
                "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"
                    },
                    "actions": [
                      {
                        "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": "PARAM",
                          "param": "string"
                        }
                      }
                    ]
                  }
                ],
                "filter": {
                  "matching": true,
                  "expressions": [
                    {
                      "type": "ATTRIBUTE",
                      "name": "string",
                      "matching": true,
                      "attribute": {
                        "expressions": [
                          {
                            "constraint": {
                              "type": "BOOL",
                              "logic": "IS_TRUE"
                            },
                            "attribute": {
                              "type": "PARAM",
                              "param": "string"
                            }
                          }
                        ]
                      }
                    }
                  ],
                  "expression": {
                    "type": "EMPTY"
                  },
                  "groupBy": [
                    {
                      "type": "CONSTANT",
                      "constant": "string"
                    }
                  ]
                }
              },
              "allowNull": true,
              "inlineAnalytics": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "analyticType": "EXPRESSION",
                  "analysis": {
                    "type": "EVENT",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "name": "string",
                    "description": "string",
                    "expression": {
                      "type": "VALUE",
                      "title": "title",
                      "value": {
                        "type": "CONSTANT",
                        "constant": 10
                      }
                    }
                  }
                }
              ]
            });

            const xhr = new 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: {
                id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',
                title: 'string',
                description: 'string',
                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'},
                    actions: [{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: 'PARAM', param: 'string'}
                      }
                    ]
                  }
                ],
                filter: {
                  matching: true,
                  expressions: [
                    {
                      type: 'ATTRIBUTE',
                      name: 'string',
                      matching: true,
                      attribute: {
                        expressions: [
                          {
                            constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                            attribute: {type: 'PARAM', param: 'string'}
                          }
                        ]
                      }
                    }
                  ],
                  expression: {type: 'EMPTY'},
                  groupBy: [{type: 'CONSTANT', constant: 'string'}]
                }
              },
              allowNull: true,
              inlineAnalytics: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  analyticType: 'EXPRESSION',
                  analysis: {
                    type: 'EVENT',
                    action: {id: 0, name: 'page.visit'},
                    name: 'string',
                    description: 'string',
                    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
                  }
                }
              ]
            }));
            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":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","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"},"actions":[{"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":"PARAM","param":"string"}}]}],"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]}},"allowNull":true,"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}');

            try {
              $response = $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\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"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\"},\"actions\":[{\"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\":\"PARAM\",\"param\":\"string\"}}]}],\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}},\"allowNull\":true,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}")
              .asString();
  /analytics/{Namespace}/reports/{AnalysisId}:
    get:
      tags:
        - "Analytics: Reports"
      summary: Get report analysis details
      operationId: analytics2-reports-get
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-AnalyticIdPathParam"
      responses:
        "200":
          description: Get report analysis details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-ReportView"
        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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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-AnalyticIdPathParam"
        - $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/%7BAnalysisId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","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"},"actions":[{"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":"PARAM","param":"string"}}]}],"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]}},"allowNull":true,"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"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\"},\"actions\":[{\"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\":\"PARAM\",\"param\":\"string\"}}]}],\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}},\"allowNull\":true,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}"

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

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

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "id": "5370bf3c-2dfa-4e89-98ff-07100cffee6c",
                "title": "string",
                "description": "string",
                "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"
                    },
                    "actions": [
                      {
                        "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": "PARAM",
                          "param": "string"
                        }
                      }
                    ]
                  }
                ],
                "filter": {
                  "matching": true,
                  "expressions": [
                    {
                      "type": "ATTRIBUTE",
                      "name": "string",
                      "matching": true,
                      "attribute": {
                        "expressions": [
                          {
                            "constraint": {
                              "type": "BOOL",
                              "logic": "IS_TRUE"
                            },
                            "attribute": {
                              "type": "PARAM",
                              "param": "string"
                            }
                          }
                        ]
                      }
                    }
                  ],
                  "expression": {
                    "type": "EMPTY"
                  },
                  "groupBy": [
                    {
                      "type": "CONSTANT",
                      "constant": "string"
                    }
                  ]
                }
              },
              "allowNull": true,
              "inlineAnalytics": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "analyticType": "EXPRESSION",
                  "analysis": {
                    "type": "EVENT",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "name": "string",
                    "description": "string",
                    "expression": {
                      "type": "VALUE",
                      "title": "title",
                      "value": {
                        "type": "CONSTANT",
                        "constant": 10
                      }
                    }
                  }
                }
              ]
            });

            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/%7BAnalysisId%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/%7BAnalysisId%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: {
                id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',
                title: 'string',
                description: 'string',
                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'},
                    actions: [{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: 'PARAM', param: 'string'}
                      }
                    ]
                  }
                ],
                filter: {
                  matching: true,
                  expressions: [
                    {
                      type: 'ATTRIBUTE',
                      name: 'string',
                      matching: true,
                      attribute: {
                        expressions: [
                          {
                            constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                            attribute: {type: 'PARAM', param: 'string'}
                          }
                        ]
                      }
                    }
                  ],
                  expression: {type: 'EMPTY'},
                  groupBy: [{type: 'CONSTANT', constant: 'string'}]
                }
              },
              allowNull: true,
              inlineAnalytics: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  analyticType: 'EXPRESSION',
                  analysis: {
                    type: 'EVENT',
                    action: {id: 0, name: 'page.visit'},
                    name: 'string',
                    description: 'string',
                    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
                  }
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"analysis":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","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"},"actions":[{"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":"PARAM","param":"string"}}]}],"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]}},"allowNull":true,"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}');

            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/%7BAnalysisId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"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\"},\"actions\":[{\"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\":\"PARAM\",\"param\":\"string\"}}]}],\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}},\"allowNull\":true,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}")
              .asString();
    delete:
      tags:
        - "Analytics: Reports"
      summary: Delete report analysis
      operationId: analytics2-reports-delete
      parameters:
        - $ref: "#/components/parameters/analytics-AnalyticIdPathParam"
        - $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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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-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:-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":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]},"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":[{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}],"tabIndex":0,"aggregationType":"EVENT","chartType":"COLUMN"}]}},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"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\":[{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"tabIndex\":0,\"aggregationType\":\"EVENT\",\"chartType\":\"COLUMN\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}"

            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": {
                "id": "5370bf3c-2dfa-4e89-98ff-07100cffee6c",
                "title": "string",
                "description": "string",
                "filter": {
                  "matching": true,
                  "expressions": [
                    {
                      "type": "ATTRIBUTE",
                      "name": "string",
                      "matching": true,
                      "attribute": {
                        "expressions": [
                          {
                            "constraint": {
                              "type": "BOOL",
                              "logic": "IS_TRUE"
                            },
                            "attribute": {
                              "type": "PARAM",
                              "param": "string"
                            }
                          }
                        ]
                      }
                    }
                  ],
                  "expression": {
                    "type": "EMPTY"
                  },
                  "groupBy": [
                    {
                      "type": "CONSTANT",
                      "constant": "string"
                    }
                  ]
                },
                "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": [
                    {
                      "id": "5370bf3c-2dfa-4e89-98ff-07100cffee6c",
                      "title": "string",
                      "description": "string",
                      "action": {
                        "id": 0,
                        "name": "page.visit"
                      },
                      "expressions": [
                        {
                          "constraint": {
                            "type": "BOOL",
                            "logic": "IS_TRUE"
                          },
                          "attribute": {
                            "type": "PARAM",
                            "param": "string"
                          }
                        }
                      ],
                      "tabIndex": 0,
                      "aggregationType": "EVENT",
                      "chartType": "COLUMN"
                    }
                  ]
                }
              },
              "inlineAnalytics": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "analyticType": "EXPRESSION",
                  "analysis": {
                    "type": "EVENT",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "name": "string",
                    "description": "string",
                    "expression": {
                      "type": "VALUE",
                      "title": "title",
                      "value": {
                        "type": "CONSTANT",
                        "constant": 10
                      }
                    }
                  }
                }
              ]
            });

            const xhr = new 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: {
                id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',
                title: 'string',
                description: 'string',
                filter: {
                  matching: true,
                  expressions: [
                    {
                      type: 'ATTRIBUTE',
                      name: 'string',
                      matching: true,
                      attribute: {
                        expressions: [
                          {
                            constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                            attribute: {type: 'PARAM', param: 'string'}
                          }
                        ]
                      }
                    }
                  ],
                  expression: {type: 'EMPTY'},
                  groupBy: [{type: 'CONSTANT', constant: 'string'}]
                },
                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: [
                    {
                      id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',
                      title: 'string',
                      description: 'string',
                      action: {id: 0, name: 'page.visit'},
                      expressions: [
                        {
                          constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                          attribute: {type: 'PARAM', param: 'string'}
                        }
                      ],
                      tabIndex: 0,
                      aggregationType: 'EVENT',
                      chartType: 'COLUMN'
                    }
                  ]
                }
              },
              inlineAnalytics: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  analyticType: 'EXPRESSION',
                  analysis: {
                    type: 'EVENT',
                    action: {id: 0, name: 'page.visit'},
                    name: 'string',
                    description: 'string',
                    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
                  }
                }
              ]
            }));
            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":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]},"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":[{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}],"tabIndex":0,"aggregationType":"EVENT","chartType":"COLUMN"}]}},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}');

            try {
              $response = $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\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"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\":[{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"tabIndex\":0,\"aggregationType\":\"EVENT\",\"chartType\":\"COLUMN\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}")
              .asString();
  /analytics/{Namespace}/trends/{AnalysisId}:
    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-AnalyticIdPathParam"
      responses:
        "200":
          description: Details of a trend
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-TrendView"
        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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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-AnalyticIdPathParam"
      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/%7BAnalysisId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]},"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":[{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}],"tabIndex":0,"aggregationType":"EVENT","chartType":"COLUMN"}]}},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"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\":[{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"tabIndex\":0,\"aggregationType\":\"EVENT\",\"chartType\":\"COLUMN\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}"

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

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

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "id": "5370bf3c-2dfa-4e89-98ff-07100cffee6c",
                "title": "string",
                "description": "string",
                "filter": {
                  "matching": true,
                  "expressions": [
                    {
                      "type": "ATTRIBUTE",
                      "name": "string",
                      "matching": true,
                      "attribute": {
                        "expressions": [
                          {
                            "constraint": {
                              "type": "BOOL",
                              "logic": "IS_TRUE"
                            },
                            "attribute": {
                              "type": "PARAM",
                              "param": "string"
                            }
                          }
                        ]
                      }
                    }
                  ],
                  "expression": {
                    "type": "EMPTY"
                  },
                  "groupBy": [
                    {
                      "type": "CONSTANT",
                      "constant": "string"
                    }
                  ]
                },
                "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": [
                    {
                      "id": "5370bf3c-2dfa-4e89-98ff-07100cffee6c",
                      "title": "string",
                      "description": "string",
                      "action": {
                        "id": 0,
                        "name": "page.visit"
                      },
                      "expressions": [
                        {
                          "constraint": {
                            "type": "BOOL",
                            "logic": "IS_TRUE"
                          },
                          "attribute": {
                            "type": "PARAM",
                            "param": "string"
                          }
                        }
                      ],
                      "tabIndex": 0,
                      "aggregationType": "EVENT",
                      "chartType": "COLUMN"
                    }
                  ]
                }
              },
              "inlineAnalytics": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "analyticType": "EXPRESSION",
                  "analysis": {
                    "type": "EVENT",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "name": "string",
                    "description": "string",
                    "expression": {
                      "type": "VALUE",
                      "title": "title",
                      "value": {
                        "type": "CONSTANT",
                        "constant": 10
                      }
                    }
                  }
                }
              ]
            });

            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/%7BAnalysisId%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/%7BAnalysisId%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: {
                id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',
                title: 'string',
                description: 'string',
                filter: {
                  matching: true,
                  expressions: [
                    {
                      type: 'ATTRIBUTE',
                      name: 'string',
                      matching: true,
                      attribute: {
                        expressions: [
                          {
                            constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                            attribute: {type: 'PARAM', param: 'string'}
                          }
                        ]
                      }
                    }
                  ],
                  expression: {type: 'EMPTY'},
                  groupBy: [{type: 'CONSTANT', constant: 'string'}]
                },
                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: [
                    {
                      id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',
                      title: 'string',
                      description: 'string',
                      action: {id: 0, name: 'page.visit'},
                      expressions: [
                        {
                          constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                          attribute: {type: 'PARAM', param: 'string'}
                        }
                      ],
                      tabIndex: 0,
                      aggregationType: 'EVENT',
                      chartType: 'COLUMN'
                    }
                  ]
                }
              },
              inlineAnalytics: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  analyticType: 'EXPRESSION',
                  analysis: {
                    type: 'EVENT',
                    action: {id: 0, name: 'page.visit'},
                    name: 'string',
                    description: 'string',
                    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
                  }
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"analysis":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]},"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":[{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}],"tabIndex":0,"aggregationType":"EVENT","chartType":"COLUMN"}]}},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}');

            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/%7BAnalysisId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"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\":[{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"tabIndex\":0,\"aggregationType\":\"EVENT\",\"chartType\":\"COLUMN\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}")
              .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-AnalyticIdPathParam"
      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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /analytics/analytics/v2/trends/{AnalysisId}/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-AnalyticIdPathParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-OverrideQueryRequest"
      responses:
        "200":
          description: Trend calculation result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-TrendSignedCalculationResponse"
        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/%7BAnalysisId%7D/recalculate/override \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"title":"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},"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]},"variables":[{"name":"string","value":"example-string-value"}],"overrideNested":false}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"title\":\"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},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}],\"overrideNested\":false}"

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

            conn.request("POST", "/analytics/analytics/v2/trends/%7BAnalysisId%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({
              "title": "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
              },
              "filter": {
                "matching": true,
                "expressions": [
                  {
                    "type": "ATTRIBUTE",
                    "name": "string",
                    "matching": true,
                    "attribute": {
                      "expressions": [
                        {
                          "constraint": {
                            "type": "BOOL",
                            "logic": "IS_TRUE"
                          },
                          "attribute": {
                            "type": "PARAM",
                            "param": "string"
                          }
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "type": "EMPTY"
                },
                "groupBy": [
                  {
                    "type": "CONSTANT",
                    "constant": "string"
                  }
                ]
              },
              "variables": [
                {
                  "name": "string",
                  "value": "example-string-value"
                }
              ],
              "overrideNested": 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/analytics/analytics/v2/trends/%7BAnalysisId%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/%7BAnalysisId%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({
              title: '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},
              filter: {
                matching: true,
                expressions: [
                  {
                    type: 'ATTRIBUTE',
                    name: 'string',
                    matching: true,
                    attribute: {
                      expressions: [
                        {
                          constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                          attribute: {type: 'PARAM', param: 'string'}
                        }
                      ]
                    }
                  }
                ],
                expression: {type: 'EMPTY'},
                groupBy: [{type: 'CONSTANT', constant: 'string'}]
              },
              variables: [{name: 'string', value: 'example-string-value'}],
              overrideNested: false
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"title":"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},"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]},"variables":[{"name":"string","value":"example-string-value"}],"overrideNested":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/analytics/analytics/v2/trends/%7BAnalysisId%7D/recalculate/override")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"title\":\"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},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}],\"overrideNested\":false}")
              .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-TrendAnalysisRequest"
                inlineAnalytics:
                  $ref: "#/components/schemas/analytics-InlineAnalytics"
              required:
                - analysis
      responses:
        "200":
          description: Calculation result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-TrendSignedCalculationResponse"
        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":{"analysis":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]},"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":[{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}],"tabIndex":0,"aggregationType":"EVENT","chartType":"COLUMN"}]}},"tags":["string"]},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"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\":[{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"tabIndex\":0,\"aggregationType\":\"EVENT\",\"chartType\":\"COLUMN\"}]}},\"tags\":[\"string\"]},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}"

            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": {
                "analysis": {
                  "id": "5370bf3c-2dfa-4e89-98ff-07100cffee6c",
                  "title": "string",
                  "description": "string",
                  "filter": {
                    "matching": true,
                    "expressions": [
                      {
                        "type": "ATTRIBUTE",
                        "name": "string",
                        "matching": true,
                        "attribute": {
                          "expressions": [
                            {
                              "constraint": {
                                "type": "BOOL",
                                "logic": "IS_TRUE"
                              },
                              "attribute": {
                                "type": "PARAM",
                                "param": "string"
                              }
                            }
                          ]
                        }
                      }
                    ],
                    "expression": {
                      "type": "EMPTY"
                    },
                    "groupBy": [
                      {
                        "type": "CONSTANT",
                        "constant": "string"
                      }
                    ]
                  },
                  "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": [
                      {
                        "id": "5370bf3c-2dfa-4e89-98ff-07100cffee6c",
                        "title": "string",
                        "description": "string",
                        "action": {
                          "id": 0,
                          "name": "page.visit"
                        },
                        "expressions": [
                          {
                            "constraint": {
                              "type": "BOOL",
                              "logic": "IS_TRUE"
                            },
                            "attribute": {
                              "type": "PARAM",
                              "param": "string"
                            }
                          }
                        ],
                        "tabIndex": 0,
                        "aggregationType": "EVENT",
                        "chartType": "COLUMN"
                      }
                    ]
                  }
                },
                "tags": [
                  "string"
                ]
              },
              "inlineAnalytics": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "analyticType": "EXPRESSION",
                  "analysis": {
                    "type": "EVENT",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "name": "string",
                    "description": "string",
                    "expression": {
                      "type": "VALUE",
                      "title": "title",
                      "value": {
                        "type": "CONSTANT",
                        "constant": 10
                      }
                    }
                  }
                }
              ]
            });

            const xhr = new 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: {
                analysis: {
                  id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',
                  title: 'string',
                  description: 'string',
                  filter: {
                    matching: true,
                    expressions: [
                      {
                        type: 'ATTRIBUTE',
                        name: 'string',
                        matching: true,
                        attribute: {
                          expressions: [
                            {
                              constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                              attribute: {type: 'PARAM', param: 'string'}
                            }
                          ]
                        }
                      }
                    ],
                    expression: {type: 'EMPTY'},
                    groupBy: [{type: 'CONSTANT', constant: 'string'}]
                  },
                  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: [
                      {
                        id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',
                        title: 'string',
                        description: 'string',
                        action: {id: 0, name: 'page.visit'},
                        expressions: [
                          {
                            constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                            attribute: {type: 'PARAM', param: 'string'}
                          }
                        ],
                        tabIndex: 0,
                        aggregationType: 'EVENT',
                        chartType: 'COLUMN'
                      }
                    ]
                  }
                },
                tags: ['string']
              },
              inlineAnalytics: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  analyticType: 'EXPRESSION',
                  analysis: {
                    type: 'EVENT',
                    action: {id: 0, name: 'page.visit'},
                    name: 'string',
                    description: 'string',
                    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
                  }
                }
              ]
            }));
            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":{"analysis":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]},"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":[{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}],"tabIndex":0,"aggregationType":"EVENT","chartType":"COLUMN"}]}},"tags":["string"]},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}');

            try {
              $response = $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\":{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"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\":[{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"tabIndex\":0,\"aggregationType\":\"EVENT\",\"chartType\":\"COLUMN\"}]}},\"tags\":[\"string\"]},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}")
              .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"
                required:
                  - data
        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-CreateRequestSankeyAnalysis"
      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:-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":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","sourceEvent":{"action":{"id":0,"name":"page.visit"},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]},"reverseOrder":true,"numberOfSteps":0,"numberOfPaths":0,"drillDown":[{"layer":0,"action":{"id":0,"name":"page.visit"},"attribute":{"type":"PARAM","param":"string"}}],"drillDownCount":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}},"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]},"eventFilters":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}],"excludeEvents":true,"firstOccurrenceOnly":true},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"sourceEvent\":{\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]},\"reverseOrder\":true,\"numberOfSteps\":0,\"numberOfPaths\":0,\"drillDown\":[{\"layer\":0,\"action\":{\"id\":0,\"name\":\"page.visit\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"drillDownCount\":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}},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"eventFilters\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"excludeEvents\":true,\"firstOccurrenceOnly\":true},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}"

            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": {
                "id": "5370bf3c-2dfa-4e89-98ff-07100cffee6c",
                "title": "string",
                "description": "string",
                "sourceEvent": {
                  "action": {
                    "id": 0,
                    "name": "page.visit"
                  },
                  "expressions": [
                    {
                      "constraint": {
                        "type": "BOOL",
                        "logic": "IS_TRUE"
                      },
                      "attribute": {
                        "type": "PARAM",
                        "param": "string"
                      }
                    }
                  ]
                },
                "reverseOrder": true,
                "numberOfSteps": 0,
                "numberOfPaths": 0,
                "drillDown": [
                  {
                    "layer": 0,
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "attribute": {
                      "type": "PARAM",
                      "param": "string"
                    }
                  }
                ],
                "drillDownCount": 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
                  }
                },
                "filter": {
                  "matching": true,
                  "expressions": [
                    {
                      "type": "ATTRIBUTE",
                      "name": "string",
                      "matching": true,
                      "attribute": {
                        "expressions": [
                          {
                            "constraint": {
                              "type": "BOOL",
                              "logic": "IS_TRUE"
                            },
                            "attribute": {
                              "type": "PARAM",
                              "param": "string"
                            }
                          }
                        ]
                      }
                    }
                  ],
                  "expression": {
                    "type": "EMPTY"
                  },
                  "groupBy": [
                    {
                      "type": "CONSTANT",
                      "constant": "string"
                    }
                  ]
                },
                "eventFilters": [
                  {
                    "title": "string",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "expressions": [
                      {
                        "constraint": {
                          "type": "BOOL",
                          "logic": "IS_TRUE"
                        },
                        "attribute": {
                          "type": "PARAM",
                          "param": "string"
                        }
                      }
                    ]
                  }
                ],
                "excludeEvents": true,
                "firstOccurrenceOnly": true
              },
              "inlineAnalytics": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "analyticType": "EXPRESSION",
                  "analysis": {
                    "type": "EVENT",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "name": "string",
                    "description": "string",
                    "expression": {
                      "type": "VALUE",
                      "title": "title",
                      "value": {
                        "type": "CONSTANT",
                        "constant": 10
                      }
                    }
                  }
                }
              ]
            });

            const xhr = new 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: {
                id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',
                title: 'string',
                description: 'string',
                sourceEvent: {
                  action: {id: 0, name: 'page.visit'},
                  expressions: [
                    {
                      constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                      attribute: {type: 'PARAM', param: 'string'}
                    }
                  ]
                },
                reverseOrder: true,
                numberOfSteps: 0,
                numberOfPaths: 0,
                drillDown: [
                  {
                    layer: 0,
                    action: {id: 0, name: 'page.visit'},
                    attribute: {type: 'PARAM', param: 'string'}
                  }
                ],
                drillDownCount: 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
                  }
                },
                filter: {
                  matching: true,
                  expressions: [
                    {
                      type: 'ATTRIBUTE',
                      name: 'string',
                      matching: true,
                      attribute: {
                        expressions: [
                          {
                            constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                            attribute: {type: 'PARAM', param: 'string'}
                          }
                        ]
                      }
                    }
                  ],
                  expression: {type: 'EMPTY'},
                  groupBy: [{type: 'CONSTANT', constant: 'string'}]
                },
                eventFilters: [
                  {
                    title: 'string',
                    action: {id: 0, name: 'page.visit'},
                    expressions: [
                      {
                        constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                        attribute: {type: 'PARAM', param: 'string'}
                      }
                    ]
                  }
                ],
                excludeEvents: true,
                firstOccurrenceOnly: true
              },
              inlineAnalytics: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  analyticType: 'EXPRESSION',
                  analysis: {
                    type: 'EVENT',
                    action: {id: 0, name: 'page.visit'},
                    name: 'string',
                    description: 'string',
                    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
                  }
                }
              ]
            }));
            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":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","sourceEvent":{"action":{"id":0,"name":"page.visit"},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]},"reverseOrder":true,"numberOfSteps":0,"numberOfPaths":0,"drillDown":[{"layer":0,"action":{"id":0,"name":"page.visit"},"attribute":{"type":"PARAM","param":"string"}}],"drillDownCount":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}},"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]},"eventFilters":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}],"excludeEvents":true,"firstOccurrenceOnly":true},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}');

            try {
              $response = $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\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"sourceEvent\":{\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]},\"reverseOrder\":true,\"numberOfSteps\":0,\"numberOfPaths\":0,\"drillDown\":[{\"layer\":0,\"action\":{\"id\":0,\"name\":\"page.visit\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"drillDownCount\":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}},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"eventFilters\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"excludeEvents\":true,\"firstOccurrenceOnly\":true},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}")
              .asString();
  /analytics/{Namespace}/sankeys/{AnalysisId}:
    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-AnalyticIdPathParam"
      responses:
        "200":
          description: Sankey analysis details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-SankeyView"
        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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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-AnalyticIdPathParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/analytics-CreateRequestSankeyAnalysis"
      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/%7BAnalysisId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"analysis":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","sourceEvent":{"action":{"id":0,"name":"page.visit"},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]},"reverseOrder":true,"numberOfSteps":0,"numberOfPaths":0,"drillDown":[{"layer":0,"action":{"id":0,"name":"page.visit"},"attribute":{"type":"PARAM","param":"string"}}],"drillDownCount":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}},"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]},"eventFilters":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}],"excludeEvents":true,"firstOccurrenceOnly":true},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"sourceEvent\":{\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]},\"reverseOrder\":true,\"numberOfSteps\":0,\"numberOfPaths\":0,\"drillDown\":[{\"layer\":0,\"action\":{\"id\":0,\"name\":\"page.visit\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"drillDownCount\":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}},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"eventFilters\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"excludeEvents\":true,\"firstOccurrenceOnly\":true},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}"

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

            conn.request("PUT", "/analytics/%7BNamespace%7D/sankeys/%7BAnalysisId%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "id": "5370bf3c-2dfa-4e89-98ff-07100cffee6c",
                "title": "string",
                "description": "string",
                "sourceEvent": {
                  "action": {
                    "id": 0,
                    "name": "page.visit"
                  },
                  "expressions": [
                    {
                      "constraint": {
                        "type": "BOOL",
                        "logic": "IS_TRUE"
                      },
                      "attribute": {
                        "type": "PARAM",
                        "param": "string"
                      }
                    }
                  ]
                },
                "reverseOrder": true,
                "numberOfSteps": 0,
                "numberOfPaths": 0,
                "drillDown": [
                  {
                    "layer": 0,
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "attribute": {
                      "type": "PARAM",
                      "param": "string"
                    }
                  }
                ],
                "drillDownCount": 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
                  }
                },
                "filter": {
                  "matching": true,
                  "expressions": [
                    {
                      "type": "ATTRIBUTE",
                      "name": "string",
                      "matching": true,
                      "attribute": {
                        "expressions": [
                          {
                            "constraint": {
                              "type": "BOOL",
                              "logic": "IS_TRUE"
                            },
                            "attribute": {
                              "type": "PARAM",
                              "param": "string"
                            }
                          }
                        ]
                      }
                    }
                  ],
                  "expression": {
                    "type": "EMPTY"
                  },
                  "groupBy": [
                    {
                      "type": "CONSTANT",
                      "constant": "string"
                    }
                  ]
                },
                "eventFilters": [
                  {
                    "title": "string",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "expressions": [
                      {
                        "constraint": {
                          "type": "BOOL",
                          "logic": "IS_TRUE"
                        },
                        "attribute": {
                          "type": "PARAM",
                          "param": "string"
                        }
                      }
                    ]
                  }
                ],
                "excludeEvents": true,
                "firstOccurrenceOnly": true
              },
              "inlineAnalytics": [
                {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "analyticType": "EXPRESSION",
                  "analysis": {
                    "type": "EVENT",
                    "action": {
                      "id": 0,
                      "name": "page.visit"
                    },
                    "name": "string",
                    "description": "string",
                    "expression": {
                      "type": "VALUE",
                      "title": "title",
                      "value": {
                        "type": "CONSTANT",
                        "constant": 10
                      }
                    }
                  }
                }
              ]
            });

            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/%7BAnalysisId%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/%7BAnalysisId%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: {
                id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',
                title: 'string',
                description: 'string',
                sourceEvent: {
                  action: {id: 0, name: 'page.visit'},
                  expressions: [
                    {
                      constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                      attribute: {type: 'PARAM', param: 'string'}
                    }
                  ]
                },
                reverseOrder: true,
                numberOfSteps: 0,
                numberOfPaths: 0,
                drillDown: [
                  {
                    layer: 0,
                    action: {id: 0, name: 'page.visit'},
                    attribute: {type: 'PARAM', param: 'string'}
                  }
                ],
                drillDownCount: 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
                  }
                },
                filter: {
                  matching: true,
                  expressions: [
                    {
                      type: 'ATTRIBUTE',
                      name: 'string',
                      matching: true,
                      attribute: {
                        expressions: [
                          {
                            constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                            attribute: {type: 'PARAM', param: 'string'}
                          }
                        ]
                      }
                    }
                  ],
                  expression: {type: 'EMPTY'},
                  groupBy: [{type: 'CONSTANT', constant: 'string'}]
                },
                eventFilters: [
                  {
                    title: 'string',
                    action: {id: 0, name: 'page.visit'},
                    expressions: [
                      {
                        constraint: {type: 'BOOL', logic: 'IS_TRUE'},
                        attribute: {type: 'PARAM', param: 'string'}
                      }
                    ]
                  }
                ],
                excludeEvents: true,
                firstOccurrenceOnly: true
              },
              inlineAnalytics: [
                {
                  id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
                  analyticType: 'EXPRESSION',
                  analysis: {
                    type: 'EVENT',
                    action: {id: 0, name: 'page.visit'},
                    name: 'string',
                    description: 'string',
                    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}
                  }
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"analysis":{"id":"5370bf3c-2dfa-4e89-98ff-07100cffee6c","title":"string","description":"string","sourceEvent":{"action":{"id":0,"name":"page.visit"},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]},"reverseOrder":true,"numberOfSteps":0,"numberOfPaths":0,"drillDown":[{"layer":0,"action":{"id":0,"name":"page.visit"},"attribute":{"type":"PARAM","param":"string"}}],"drillDownCount":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}},"filter":{"matching":true,"expressions":[{"type":"ATTRIBUTE","name":"string","matching":true,"attribute":{"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}}],"expression":{"type":"EMPTY"},"groupBy":[{"type":"CONSTANT","constant":"string"}]},"eventFilters":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"constraint":{"type":"BOOL","logic":"IS_TRUE"},"attribute":{"type":"PARAM","param":"string"}}]}],"excludeEvents":true,"firstOccurrenceOnly":true},"inlineAnalytics":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","analyticType":"EXPRESSION","analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}}}]}');

            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/%7BAnalysisId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"sourceEvent\":{\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]},\"reverseOrder\":true,\"numberOfSteps\":0,\"numberOfPaths\":0,\"drillDown\":[{\"layer\":0,\"action\":{\"id\":0,\"name\":\"page.visit\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"drillDownCount\":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}},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"eventFilters\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"excludeEvents\":true,\"firstOccurrenceOnly\":true},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}")
              .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-AnalyticIdPathParam"
      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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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/%7BAnalysisId%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","whatsAppId":"TestWhatsappId","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"whatsApp":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\",\"whatsAppId\":\"TestWhatsappId\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"whatsApp\":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",
              "whatsAppId": "TestWhatsappId",
              "agreements": {
                "email": false,
                "sms": false,
                "push": false,
                "webPush": false,
                "whatsApp": 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',
              whatsAppId: 'TestWhatsappId',
              agreements: {
                email: false,
                sms: false,
                push: false,
                webPush: false,
                whatsApp: 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","whatsAppId":"TestWhatsappId","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"whatsApp":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\",\"whatsAppId\":\"TestWhatsappId\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"whatsApp\":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","whatsAppId":"TestWhatsappId","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"whatsApp":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\",\"whatsAppId\":\"TestWhatsappId\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"whatsApp\":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",
                "whatsAppId": "TestWhatsappId",
                "agreements": {
                  "email": false,
                  "sms": false,
                  "push": false,
                  "webPush": false,
                  "whatsApp": 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',
                whatsAppId: 'TestWhatsappId',
                agreements: {
                  email: false,
                  sms: false,
                  push: false,
                  webPush: false,
                  whatsApp: 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","whatsAppId":"TestWhatsappId","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"whatsApp":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\",\"whatsAppId\":\"TestWhatsappId\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"whatsApp\":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","whatsAppId":"TestWhatsappId","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"whatsApp":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\",\"whatsAppId\":\"TestWhatsappId\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"whatsApp\":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",
              "whatsAppId": "TestWhatsappId",
              "agreements": {
                "email": false,
                "sms": false,
                "push": false,
                "webPush": false,
                "whatsApp": 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',
              whatsAppId: 'TestWhatsappId',
              agreements: {
                email: false,
                sms: false,
                push: false,
                webPush: false,
                whatsApp: 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","whatsAppId":"TestWhatsappId","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"whatsApp":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\",\"whatsAppId\":\"TestWhatsappId\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"whatsApp\":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","whatsAppId":"TestWhatsappId","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"whatsApp":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\",\"whatsAppId\":\"TestWhatsappId\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"whatsApp\":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",
              "whatsAppId": "TestWhatsappId",
              "agreements": {
                "email": false,
                "sms": false,
                "push": false,
                "webPush": false,
                "whatsApp": 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',
              whatsAppId: 'TestWhatsappId',
              agreements: {
                email: false,
                sms: false,
                push: false,
                webPush: false,
                whatsApp: 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","whatsAppId":"TestWhatsappId","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"whatsApp":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\",\"whatsAppId\":\"TestWhatsappId\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"whatsApp\":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","whatsAppId":"TestWhatsappId","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"whatsApp":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\",\"whatsAppId\":\"TestWhatsappId\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"whatsApp\":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",
              "whatsAppId": "TestWhatsappId",
              "agreements": {
                "email": false,
                "sms": false,
                "push": false,
                "webPush": false,
                "whatsApp": 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',
              whatsAppId: 'TestWhatsappId',
              agreements: {
                email: false,
                sms: false,
                push: false,
                webPush: false,
                whatsApp: 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","whatsAppId":"TestWhatsappId","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"whatsApp":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\",\"whatsAppId\":\"TestWhatsappId\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"whatsApp\":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.

            **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
          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,"whatsApp":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","whatsAppId":"TestWhatsappId","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,\"whatsApp\":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\",\"whatsAppId\":\"TestWhatsappId\",\"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,
                "whatsApp": 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",
              "whatsAppId": "TestWhatsappId",
              "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,
                whatsApp: 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',
              whatsAppId: 'TestWhatsappId',
              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,"whatsApp":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","whatsAppId":"TestWhatsappId","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,\"whatsApp\":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\",\"whatsAppId\":\"TestWhatsappId\",\"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}$)/`

                    **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
                  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/dashboard/diagrams/count-by-trigger-type:
    get:
      security:
        - JWT: []
      tags:
        - Control Center
      summary: Count workflows by trigger type
      operationId: countDiagramsByTriggerType
      description: |
        Returns the count of active workflows grouped by trigger node type for the current 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:** `AUTOMATON_BRAIN_DIAGRAM_LIST_READ`

        **User role permission required:** `automation_2_journeys: read`
      responses:
        "200":
          description: Workflow counts by trigger type
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-DiagramCountByTriggerTypeResponse"
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Control-Center/operation/countDiagramsByTriggerType
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/automation-brain/dashboard/diagrams/count-by-trigger-type \
              --header 'Authorization: Bearer REPLACE_BEARER_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/dashboard/diagrams/count-by-trigger-type", headers=headers)

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

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

            const xhr = new 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/dashboard/diagrams/count-by-trigger-type");
            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/dashboard/diagrams/count-by-trigger-type",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

              res.on("end", function () {
                const body = 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/dashboard/diagrams/count-by-trigger-type');
            $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/automation-brain/dashboard/diagrams/count-by-trigger-type")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/dashboard/diagrams/count-by-status:
    get:
      security:
        - JWT: []
      tags:
        - Control Center
      summary: Count workflows by status
      operationId: countDiagramsByStatus
      description: |
        Returns the count of workflows grouped by status for the current 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:** `AUTOMATON_BRAIN_DIAGRAM_LIST_READ`

        **User role permission required:** `automation_2_journeys: read`
      responses:
        "200":
          description: Workflow counts by status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-DiagramCountByStatusResponse"
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Control-Center/operation/countDiagramsByStatus
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/automation-brain/dashboard/diagrams/count-by-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", "/automation-brain/dashboard/diagrams/count-by-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/automation-brain/dashboard/diagrams/count-by-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": "/automation-brain/dashboard/diagrams/count-by-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/automation-brain/dashboard/diagrams/count-by-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/automation-brain/dashboard/diagrams/count-by-status")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/dashboard/diagrams/most-used:
    get:
      security:
        - JWT: []
      tags:
        - Control Center
      summary: Get most used workflows
      operationId: getMostUsedDiagrams
      description: |
        Returns a paginated list of workflows ordered by the number of data points (events) generated by those 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"
      responses:
        "200":
          description: A page of most used workflows
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-PaginatedDashboardDiagramsMostUsed"
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Control-Center/operation/getMostUsedDiagrams
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/automation-brain/dashboard/diagrams/most-used?page=SOME_NUMBER_VALUE&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", "/automation-brain/dashboard/diagrams/most-used?page=SOME_NUMBER_VALUE&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/automation-brain/dashboard/diagrams/most-used?page=SOME_NUMBER_VALUE&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": "/automation-brain/dashboard/diagrams/most-used?page=SOME_NUMBER_VALUE&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/automation-brain/dashboard/diagrams/most-used');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_NUMBER_VALUE',
              '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/automation-brain/dashboard/diagrams/most-used?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/dashboard/diagrams/most-triggered:
    get:
      security:
        - JWT: []
      tags:
        - Control Center
      summary: Get most triggered workflows
      operationId: getMostTriggeredDiagrams
      description: |
        Returns a paginated list of workflows ordered by the number of triggered paths.

        ---

        **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"
      responses:
        "200":
          description: A page of most triggered workflows
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-PaginatedDashboardDiagramsMostTriggered"
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Control-Center/operation/getMostTriggeredDiagrams
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/automation-brain/dashboard/diagrams/most-triggered?page=SOME_NUMBER_VALUE&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", "/automation-brain/dashboard/diagrams/most-triggered?page=SOME_NUMBER_VALUE&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/automation-brain/dashboard/diagrams/most-triggered?page=SOME_NUMBER_VALUE&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": "/automation-brain/dashboard/diagrams/most-triggered?page=SOME_NUMBER_VALUE&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/automation-brain/dashboard/diagrams/most-triggered');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_NUMBER_VALUE',
              '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/automation-brain/dashboard/diagrams/most-triggered?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/dashboard/diagrams/in-progress:
    get:
      security:
        - JWT: []
      tags:
        - Control Center
      summary: Get workflows with paths in progress
      operationId: getInProgressDiagrams
      description: |
        Returns a paginated list of workflows ordered by the number of paths currently in progress.

        ---

        **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"
      responses:
        "200":
          description: A page of workflows with paths in progress
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-PaginatedDashboardDiagramsInProgress"
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Control-Center/operation/getInProgressDiagrams
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/automation-brain/dashboard/diagrams/in-progress?page=SOME_NUMBER_VALUE&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", "/automation-brain/dashboard/diagrams/in-progress?page=SOME_NUMBER_VALUE&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/automation-brain/dashboard/diagrams/in-progress?page=SOME_NUMBER_VALUE&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": "/automation-brain/dashboard/diagrams/in-progress?page=SOME_NUMBER_VALUE&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/automation-brain/dashboard/diagrams/in-progress');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_NUMBER_VALUE',
              '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/automation-brain/dashboard/diagrams/in-progress?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/dashboard/upcoming-status-changes:
    get:
      security:
        - JWT: []
      tags:
        - Control Center
      summary: Get upcoming status changes
      operationId: getUpcomingStatusChanges
      description: |
        Returns a paginated list of upcoming workflow status changes (resumes, pauses, and stops).

        ---

        **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"
      responses:
        "200":
          description: A page of upcoming status changes
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-PaginatedDashboardUpcomingStatusChanges"
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Control-Center/operation/getUpcomingStatusChanges
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/automation-brain/dashboard/upcoming-status-changes?page=SOME_NUMBER_VALUE&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", "/automation-brain/dashboard/upcoming-status-changes?page=SOME_NUMBER_VALUE&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/automation-brain/dashboard/upcoming-status-changes?page=SOME_NUMBER_VALUE&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": "/automation-brain/dashboard/upcoming-status-changes?page=SOME_NUMBER_VALUE&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/automation-brain/dashboard/upcoming-status-changes');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_NUMBER_VALUE',
              '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/automation-brain/dashboard/upcoming-status-changes?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/dashboard/upcoming-triggers:
    get:
      security:
        - JWT: []
      tags:
        - Control Center
      summary: Get upcoming trigger events
      operationId: getUpcomingTriggers
      description: |
        Returns a paginated list of upcoming trigger events for workflows with active scheduled triggers.

        ---

        **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"
      responses:
        "200":
          description: A page of upcoming trigger events
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-PaginatedDashboardUpcomingTriggers"
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Control-Center/operation/getUpcomingTriggers
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/automation-brain/dashboard/upcoming-triggers?page=SOME_NUMBER_VALUE&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", "/automation-brain/dashboard/upcoming-triggers?page=SOME_NUMBER_VALUE&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/automation-brain/dashboard/upcoming-triggers?page=SOME_NUMBER_VALUE&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": "/automation-brain/dashboard/upcoming-triggers?page=SOME_NUMBER_VALUE&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/automation-brain/dashboard/upcoming-triggers');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_NUMBER_VALUE',
              '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/automation-brain/dashboard/upcoming-triggers?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/dashboard/diagrams/with-issues:
    get:
      security:
        - JWT: []
      tags:
        - Control Center
      summary: Get workflows with issues
      operationId: getDiagramsWithIssues
      description: |
        Returns a paginated list of workflows that have encountered failures, ordered by failure count.

        ---

        **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-timePeriod"
        - name: context
          description: AutomationContext for which workflows should be returned
          in: query
          required: false
          schema:
            type: string
            enum:
              - Client
              - Business
              - Undefined
        - $ref: "#/components/parameters/automation-brain-page"
        - $ref: "#/components/parameters/automation-brain-limit"
      responses:
        "200":
          description: A page of workflows with issues
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-PaginatedDashboardDiagramsWithIssues"
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Control-Center/operation/getDiagramsWithIssues
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/automation-brain/dashboard/diagrams/with-issues?timePeriod=SOME_STRING_VALUE&context=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&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", "/automation-brain/dashboard/diagrams/with-issues?timePeriod=SOME_STRING_VALUE&context=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&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/automation-brain/dashboard/diagrams/with-issues?timePeriod=SOME_STRING_VALUE&context=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&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": "/automation-brain/dashboard/diagrams/with-issues?timePeriod=SOME_STRING_VALUE&context=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&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/automation-brain/dashboard/diagrams/with-issues');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'timePeriod' => 'SOME_STRING_VALUE',
              'context' => 'SOME_STRING_VALUE',
              'page' => 'SOME_NUMBER_VALUE',
              '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/automation-brain/dashboard/diagrams/with-issues?timePeriod=SOME_STRING_VALUE&context=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/dashboard/diagrams/failing-jobs:
    get:
      security:
        - JWT: []
      tags:
        - Control Center
      summary: Get workflows with failing jobs
      operationId: getFailingJobsDiagrams
      description: |
        Returns a paginated list of workflows that had failing jobs in the given time period. Counts are per job, so a journey with several failed blocks counts each of them. Results are ordered worst-first (failedCount descending, then warningCount descending).


        ---

        **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-timePeriod"
        - $ref: "#/components/parameters/automation-brain-page"
        - $ref: "#/components/parameters/automation-brain-limit"
      responses:
        "200":
          description: A page of workflows with failing jobs
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-PaginatedDashboardDiagramsFailingJobs"
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Control-Center/operation/getFailingJobsDiagrams
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/automation-brain/dashboard/diagrams/failing-jobs?timePeriod=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&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", "/automation-brain/dashboard/diagrams/failing-jobs?timePeriod=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&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/automation-brain/dashboard/diagrams/failing-jobs?timePeriod=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&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": "/automation-brain/dashboard/diagrams/failing-jobs?timePeriod=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&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/automation-brain/dashboard/diagrams/failing-jobs');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'timePeriod' => 'SOME_STRING_VALUE',
              'page' => 'SOME_NUMBER_VALUE',
              '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/automation-brain/dashboard/diagrams/failing-jobs?timePeriod=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/diagrams:
    get:
      security:
        - JWT: []
      tags:
        - Workflows
      summary: Get list of workflows/diagrams
      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"
        - $ref: "#/components/parameters/automation-brain-blockTypes"
        - $ref: "#/components/parameters/automation-brain-triggersOnEvent"
        - $ref: "#/components/parameters/automation-brain-generatesEvent"
      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&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=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&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=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&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=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&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=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',
              'blockTypes' => 'SOME_STRING_VALUE',
              'triggersOnEvent' => 'SOME_STRING_VALUE',
              'generatesEvent' => '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&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=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"
        - $ref: "#/components/parameters/automation-brain-blockTypes"
        - $ref: "#/components/parameters/automation-brain-triggersOnEvent"
        - $ref: "#/components/parameters/automation-brain-generatesEvent"
      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&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=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&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=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&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=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&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=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',
              'blockTypes' => 'SOME_STRING_VALUE',
              'triggersOnEvent' => 'SOME_STRING_VALUE',
              'generatesEvent' => '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&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=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:
    post:
      security:
        - JWT: []
      tags:
        - Workflow schedules
      summary: Set schedule rules for workflow
      description: |
        Set schedule rules for a workflow. This lets you activate, pause, or stop a workflow according to a plan. 

        After the schedule is set, it must be activated to take effect (see the `POST /automation-brain/diagrams/{diagramId}/schedule-on` method).  

        **The backend doesn't validate the logic of the schedule**. You must ensure it's well-built (rules make logical sense) and complies with the structure of the workflow (such as trigger node time rules). See ["Workflow Scheduler > Important" in the Synerise Hub](https://hub.synerise.com/docs/automation/workflow-scheduler#important).

        The contents of this request overwrite an existing schedule.


        ---

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

        **User role permission required:** `automation_2_journeys: update`
      operationId: setDiagramSchedule
      parameters:
        - $ref: "#/components/parameters/automation-brain-diagramId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/automation-brain-DiagramScheduleRequest"
        required: true
      responses:
        "200":
          description: Schedule saved
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-DiagramSchedule"
        "400":
          $ref: "#/components/responses/automation-brain-SimpleError"
        "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/Workflow-schedules/operation/setDiagramSchedule
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"timezone":"Europe/Paris","rules":[{"ruleId":"70af3071-65d9-4ec3-b3cb-5283e8d55dac","actionType":"Resume","repeatModel":{"repeatType":"Interval","body":{"start":"2020-01-01T01:00:00.000","intervalSeconds":6000}}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"timezone\":\"Europe/Paris\",\"rules\":[{\"ruleId\":\"70af3071-65d9-4ec3-b3cb-5283e8d55dac\",\"actionType\":\"Resume\",\"repeatModel\":{\"repeatType\":\"Interval\",\"body\":{\"start\":\"2020-01-01T01:00:00.000\",\"intervalSeconds\":6000}}}]}"

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

            conn.request("POST", "/automation-brain/diagrams/%7BdiagramId%7D/schedule", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "timezone": "Europe/Paris",
              "rules": [
                {
                  "ruleId": "70af3071-65d9-4ec3-b3cb-5283e8d55dac",
                  "actionType": "Resume",
                  "repeatModel": {
                    "repeatType": "Interval",
                    "body": {
                      "start": "2020-01-01T01:00:00.000",
                      "intervalSeconds": 6000
                    }
                  }
                }
              ]
            });

            const xhr = new 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");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.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",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({
              timezone: 'Europe/Paris',
              rules: [
                {
                  ruleId: '70af3071-65d9-4ec3-b3cb-5283e8d55dac',
                  actionType: 'Resume',
                  repeatModel: {
                    repeatType: 'Interval',
                    body: {start: '2020-01-01T01:00:00.000', intervalSeconds: 6000}
                  }
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"timezone":"Europe/Paris","rules":[{"ruleId":"70af3071-65d9-4ec3-b3cb-5283e8d55dac","actionType":"Resume","repeatModel":{"repeatType":"Interval","body":{"start":"2020-01-01T01:00:00.000","intervalSeconds":6000}}}]}');

            try {
              $response = $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")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"timezone\":\"Europe/Paris\",\"rules\":[{\"ruleId\":\"70af3071-65d9-4ec3-b3cb-5283e8d55dac\",\"actionType\":\"Resume\",\"repeatModel\":{\"repeatType\":\"Interval\",\"body\":{\"start\":\"2020-01-01T01:00:00.000\",\"intervalSeconds\":6000}}}]}")
              .asString();
    get:
      security:
        - JWT: []
      tags:
        - Workflow schedules
      summary: Get workflow schedule
      operationId: getDiagramSchedule
      description: |
        Get all schedule rules of 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_SCHEDULE_READ`

        **User role permission required:** `automation_2_journeys: read`
      parameters:
        - $ref: "#/components/parameters/automation-brain-diagramId"
      responses:
        "200":
          description: Schedule rules
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-DiagramSchedule"
        "400":
          $ref: "#/components/responses/automation-brain-SimpleError"
        "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/Workflow-schedules/operation/getDiagramSchedule
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule \
              --header 'Authorization: Bearer REPLACE_BEARER_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/schedule", headers=headers)

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

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

            const xhr = new 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/schedule");
            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/schedule",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

              res.on("end", function () {
                const body = 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');
            $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/automation-brain/diagrams/%7BdiagramId%7D/schedule")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/diagrams/{diagramId}/schedule-on:
    post:
      security:
        - JWT: []
      tags:
        - Workflow schedules
      summary: Enable schedule for workflow
      operationId: scheduleOnAutomationDiagram
      description: |
        Enable schedule for a workflow. The schedule must first be set with `POST /automation-brain/diagrams/{diagramId}/schedule`

        ---

        **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/Workflow-schedules/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:
        - Workflow schedules
      summary: Disable schedule for workflow
      operationId: scheduleOffAutomationDiagram
      description: |
        Disable schedule for 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"
      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/Workflow-schedules/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}/schedule-executed-events:
    get:
      security:
        - JWT: []
      tags:
        - Workflow schedules
      summary: Get schedule execution events
      operationId: getDiagramScheduleExecutedEvents
      description: |
        Get events (rule executions) that were already processed for the workflow. You can limit the list to a time range defined by `start` and `end`.


        ---

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

        **User role permission required:** `automation_2_journeys: read`
      parameters:
        - $ref: "#/components/parameters/automation-brain-diagramId"
        - name: start
          in: query
          required: true
          description: Start date
          schema:
            type: string
            format: date-time
        - $ref: "#/components/parameters/automation-brain-ScheduleEventFilterEnd"
      responses:
        "200":
          description: Executed schedule events
          content:
            application/json:
              schema:
                type: object
                properties:
                  hasMore:
                    $ref: "#/components/schemas/automation-brain-HasMore"
                  events:
                    type: array
                    description: Executed schedule rules
                    items:
                      $ref: "#/components/schemas/automation-brain-ExecutedDiagramScheduleEvent"
                required:
                  - hasMore
                  - events
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "403":
          $ref: "#/components/responses/automation-brain-403"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Workflow-schedules/operation/getDiagramScheduleExecutedEvents
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-executed-events?start=SOME_STRING_VALUE&end=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/schedule-executed-events?start=SOME_STRING_VALUE&end=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/schedule-executed-events?start=SOME_STRING_VALUE&end=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/schedule-executed-events?start=SOME_STRING_VALUE&end=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/schedule-executed-events');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'start' => 'SOME_STRING_VALUE',
              'end' => '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/schedule-executed-events?start=SOME_STRING_VALUE&end=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/diagrams/{diagramId}/schedule-upcoming-events:
    get:
      security:
        - JWT: []
      tags:
        - Workflow schedules
      summary: Get upcoming schedule events
      operationId: getDiagramSchedulePendingEvents
      description: |
        Get a list of upcoming events (rule executions) caused by a schedule. You can limit the list to a time range defined by `start` and `end`.


        ---

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

        **User role permission required:** `automation_2_journeys: read`
      parameters:
        - $ref: "#/components/parameters/automation-brain-diagramId"
        - $ref: "#/components/parameters/automation-brain-ScheduleEventFilterStart"
        - $ref: "#/components/parameters/automation-brain-ScheduleEventFilterEnd"
      responses:
        "200":
          description: Upcoming schedule events
          content:
            application/json:
              schema:
                type: object
                properties:
                  hasMore:
                    $ref: "#/components/schemas/automation-brain-HasMore"
                  events:
                    type: array
                    description: Upcoming schedule rule executions
                    items:
                      $ref: "#/components/schemas/automation-brain-UpcomingDiagramScheduleEvent"
                required:
                  - hasMore
                  - events
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "403":
          $ref: "#/components/responses/automation-brain-403"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Workflow-schedules/operation/getDiagramSchedulePendingEvents
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-upcoming-events?start=SOME_STRING_VALUE&end=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/schedule-upcoming-events?start=SOME_STRING_VALUE&end=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/schedule-upcoming-events?start=SOME_STRING_VALUE&end=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/schedule-upcoming-events?start=SOME_STRING_VALUE&end=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/schedule-upcoming-events');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'start' => 'SOME_STRING_VALUE',
              'end' => '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/schedule-upcoming-events?start=SOME_STRING_VALUE&end=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/diagrams/{diagramId}/upcoming-status-changes:
    get:
      security:
        - JWT: []
      tags:
        - Workflow schedules
      summary: Get upcoming workflow status changes
      operationId: getDiagramUpcomingStatusChanges
      description: |
        Get upcoming status changes for a workflow. You can limit the list to a time range defined by `start` and `end`.


        ---

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

        **User role permission required:** `automation_2_journeys: read`
      parameters:
        - $ref: "#/components/parameters/automation-brain-diagramId"
        - name: initialStatus
          in: query
          description: "Initial status used if diagramId is not present (default: Pending)"
          schema:
            type: string
        - $ref: "#/components/parameters/automation-brain-ScheduleEventFilterStart"
        - $ref: "#/components/parameters/automation-brain-ScheduleEventFilterEnd"
      responses:
        "200":
          description: Upcoming status changes
          content:
            application/json:
              schema:
                type: object
                properties:
                  hasMore:
                    $ref: "#/components/schemas/automation-brain-HasMore"
                  events:
                    type: array
                    description: Upcoming status changes of the workflow
                    items:
                      $ref: "#/components/schemas/automation-brain-UpcomingDiagramStatusChange"
                required:
                  - hasMore
                  - events
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "403":
          $ref: "#/components/responses/automation-brain-403"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Workflow-schedules/operation/getDiagramUpcomingStatusChanges
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/upcoming-status-changes?initialStatus=SOME_STRING_VALUE&start=SOME_STRING_VALUE&end=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/upcoming-status-changes?initialStatus=SOME_STRING_VALUE&start=SOME_STRING_VALUE&end=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/upcoming-status-changes?initialStatus=SOME_STRING_VALUE&start=SOME_STRING_VALUE&end=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/upcoming-status-changes?initialStatus=SOME_STRING_VALUE&start=SOME_STRING_VALUE&end=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/upcoming-status-changes');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'initialStatus' => 'SOME_STRING_VALUE',
              'start' => 'SOME_STRING_VALUE',
              'end' => '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/upcoming-status-changes?initialStatus=SOME_STRING_VALUE&start=SOME_STRING_VALUE&end=SOME_STRING_VALUE")
              .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":
          $ref: "#/components/responses/automation-brain-403"
        "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":
          $ref: "#/components/responses/automation-brain-403"
        "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","lambdaId":"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d"}'
        - 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\",\"lambdaId\":\"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d\"}"

            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",
              "lambdaId": "19f4e1cf-838e-4f7d-9400-1ddf9fb6829d"
            });

            const xhr = new 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',
              lambdaId: '19f4e1cf-838e-4f7d-9400-1ddf9fb6829d'
            }));
            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","lambdaId":"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d"}');

            try {
              $response = $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\",\"lambdaId\":\"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d\"}")
              .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","lambdaId":"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08"}}'
        - 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\",\"lambdaId\":\"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d\",\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"}}"

            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",
                "lambdaId": "19f4e1cf-838e-4f7d-9400-1ddf9fb6829d",
                "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/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',
                lambdaId: '19f4e1cf-838e-4f7d-9400-1ddf9fb6829d',
                id: '497f6eca-6276-4993-bfeb-53cbbbba6f08'
              }
            }));
            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","lambdaId":"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d","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/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\",\"lambdaId\":\"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d\",\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"}}")
              .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","lambdaId":"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08"},"lambdaId":"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d"}'
        - 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\",\"lambdaId\":\"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d\",\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"},\"lambdaId\":\"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d\"}"

            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",
                "lambdaId": "19f4e1cf-838e-4f7d-9400-1ddf9fb6829d",
                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
              },
              "lambdaId": "19f4e1cf-838e-4f7d-9400-1ddf9fb6829d"
            });

            const xhr = new 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',
                lambdaId: '19f4e1cf-838e-4f7d-9400-1ddf9fb6829d',
                id: '497f6eca-6276-4993-bfeb-53cbbbba6f08'
              },
              lambdaId: '19f4e1cf-838e-4f7d-9400-1ddf9fb6829d'
            }));
            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","lambdaId":"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08"},"lambdaId":"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d"}');

            try {
              $response = $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\",\"lambdaId\":\"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d\",\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"},\"lambdaId\":\"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d\"}")
              .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();
  /device-hub/wallets/issue:
    get:
      tags:
        - Wallet passes
      summary: Issue wallet pass
      operationId: issueWalletPassUsingGET
      description: |
        **IMPORTANT**: This feature is in private preview mode and accessible only on selected workspaces. To get access, contact your account manager or Synerise Support.

        ---

        Handle issuing a wallet pass.
        - If the platform (IOS, ANDROID) is not specified, the endpoint returns a landing page where the user can choose their OS.
        - If the platform is specified, the endpoint issues a wallet card.

        To obtain the parameters required by this endpoint, generate a link with the `/wallets/issue/link` endpoint. You can also generate the link with Jinjava inserts in communication, for example in push messages or when rendering content from Brickworks.


        ---

        **Authentication:** Not required
      parameters:
        - name: clientUuid
          in: query
          required: false
          schema:
            type: string
            format: uuid
          description: When present, also goes into the HMAC payload depending on the wallet pass record configuration. If an UUID was used to generate the link, make sure to use the same UUID when issuing the wallet pass.
        - name: issueId
          in: query
          required: true
          schema:
            type: string
            format: uuid
          description: Primary key for the IssueLinkEntity lookup. Returned as part of the link by `/wallets/issue/link` or a Jinjava insert.
        - name: hmac
          in: query
          required: true
          schema:
            type: string
          description: Base64url-no-padding HMAC-SHA256 returned as part of the link by `/wallets/issue/link` or a Jinjava insert.
        - name: platform
          in: query
          required: false
          schema:
            type: string
            enum:
              - IOS
              - ANDROID
            description: Mobile phone operating system
          description: |
            When absent, the server renders the HTML landing page. When platform is specified, then wallet pass issuance is performed for selected platform.
      responses:
        "200":
          description: "OK: Apple .pkpass file or landing page with platform selection"
          content:
            text/html:
              schema:
                type: string
                description: Returns the rendered landing page where the user can select their platform. Selecting the button makes a new request to this endpoint, with the `platform` parameter.
            application/vnd.apple.pkpass:
              schema:
                type: string
                description: .pkpass file
                format: binary
        "302":
          description: |
            Found - Issued wallet pass for Android. The Location header points at `https://pay.google.com/gp/v/save/<jwt>`. Empty body.
          headers:
            Location:
              description: The Google Wallet save-jwt URL the browser should follow.
              schema:
                type: string
                format: uri
                example: https://pay.google.com/gp/v/save/eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
        "400":
          description: |
            Bad Request - Missing/malformed required query parameter, malformed platform enum value, or HMAC verification failed (rendered as the link-error view for the HMAC case).
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/device-hub-ErrorResponse"
        "404":
          description: |
            Not Found - issueId not found in issue_links (including soft-deleted entries), or the wallet pass record's googleCredentialId does not resolve to a credential for this tenant.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/device-hub-ErrorResponse"
        "410":
          description: Gone - The issue link has expired.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/device-hub-ErrorResponse"
        "500":
          description: |
            Internal Server Error.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/device-hub-ErrorResponse"
        "502":
          description: |
            Bad Gateway - another service or Google Wallet returned an error or is unreachable.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/device-hub-ErrorResponse"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Wallet-passes/operation/issueWalletPassUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/device-hub/wallets/issue?clientUuid=SOME_STRING_VALUE&issueId=SOME_STRING_VALUE&hmac=SOME_STRING_VALUE&platform=SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            conn.request("GET", "/device-hub/wallets/issue?clientUuid=SOME_STRING_VALUE&issueId=SOME_STRING_VALUE&hmac=SOME_STRING_VALUE&platform=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/device-hub/wallets/issue?clientUuid=SOME_STRING_VALUE&issueId=SOME_STRING_VALUE&hmac=SOME_STRING_VALUE&platform=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": "/device-hub/wallets/issue?clientUuid=SOME_STRING_VALUE&issueId=SOME_STRING_VALUE&hmac=SOME_STRING_VALUE&platform=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/device-hub/wallets/issue');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'clientUuid' => 'SOME_STRING_VALUE',
              'issueId' => 'SOME_STRING_VALUE',
              'hmac' => 'SOME_STRING_VALUE',
              'platform' => '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/device-hub/wallets/issue?clientUuid=SOME_STRING_VALUE&issueId=SOME_STRING_VALUE&hmac=SOME_STRING_VALUE&platform=SOME_STRING_VALUE")
              .asString();
  /device-hub/wallets/issue/link:
    post:
      tags:
        - Wallet passes
      summary: Create wallet pass issue link
      operationId: createIssueLinkUsingPOST
      description: |
        **IMPORTANT**: This feature is in private preview mode and accessible only on selected workspaces. To get access, contact your account manager or Synerise Support.

        ---

        Create (or reuse) a wallet issue link for the authenticated workspace.
        The link's origin is fetched from the given record under the
        wallet pass template. Calls with the same `recordId` and `expirationTime`
        return the same `issueId` (and therefore the same HMAC when `clientUuid` is not
        included in the signature).

        After using this endpoint, use the link from the response as a the request to the `/wallets/issue` 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:** `WALLET_PASSES_UPDATE`

        **User role permission required:** `campaigns_wallets: update`
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/device-hub-IssueLinkCreateRequest"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/device-hub-IssueLinkResponse"
        "400":
          description: Bad Request - Validation failed (missing/invalid recordId, or malformed UUID/Instant)
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/device-hub-ErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/device-hub-GatewayError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/device-hub-GatewayError"
        "404":
          description: Not Found - no such wallet pass template/record for this tenant
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/device-hub-ErrorResponse"
        "500":
          description: Internal Server Error - unexpected error during request processing
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/device-hub-ErrorResponse"
        "502":
          description: Bad Gateway - external service returned 5xx or is unreachable
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/device-hub-ErrorResponse"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Wallet-passes/operation/createIssueLinkUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/device-hub/wallets/issue/link \
              --header 'content-type: application/json' \
              --data '{"clientUuid":"c6e70fa5-bbfd-4e2e-9660-1407608fb247","recordId":"0470cfd4-dcf3-4d8c-ac28-58c6deeff25f","expirationTime":"2019-08-24T14:15:22Z","eventParams":{"property1":"string","property2":"string"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"clientUuid\":\"c6e70fa5-bbfd-4e2e-9660-1407608fb247\",\"recordId\":\"0470cfd4-dcf3-4d8c-ac28-58c6deeff25f\",\"expirationTime\":\"2019-08-24T14:15:22Z\",\"eventParams\":{\"property1\":\"string\",\"property2\":\"string\"}}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/device-hub/wallets/issue/link", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "clientUuid": "c6e70fa5-bbfd-4e2e-9660-1407608fb247",
              "recordId": "0470cfd4-dcf3-4d8c-ac28-58c6deeff25f",
              "expirationTime": "2019-08-24T14:15:22Z",
              "eventParams": {
                "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/device-hub/wallets/issue/link");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/device-hub/wallets/issue/link",
              "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({
              clientUuid: 'c6e70fa5-bbfd-4e2e-9660-1407608fb247',
              recordId: '0470cfd4-dcf3-4d8c-ac28-58c6deeff25f',
              expirationTime: '2019-08-24T14:15:22Z',
              eventParams: {property1: 'string', property2: 'string'}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/device-hub/wallets/issue/link');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"clientUuid":"c6e70fa5-bbfd-4e2e-9660-1407608fb247","recordId":"0470cfd4-dcf3-4d8c-ac28-58c6deeff25f","expirationTime":"2019-08-24T14:15:22Z","eventParams":{"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/device-hub/wallets/issue/link")
              .header("content-type", "application/json")
              .body("{\"clientUuid\":\"c6e70fa5-bbfd-4e2e-9660-1407608fb247\",\"recordId\":\"0470cfd4-dcf3-4d8c-ac28-58c6deeff25f\",\"expirationTime\":\"2019-08-24T14:15:22Z\",\"eventParams\":{\"property1\":\"string\",\"property2\":\"string\"}}")
              .asString();
  /device-hub/wallets/update:
    post:
      tags:
        - Wallet passes
      summary: Update wallet pass
      operationId: updateWalletPassUsingPOST
      description: |
        **IMPORTANT**: This feature is in private preview mode and accessible only on selected workspaces. To get access, contact your account manager or Synerise Support.

        ---

        Queue a wallet pass update for asynchronous update. The request is
        validated and enqueued and the endpoint return the HTTP 202 status. You must provide one profile identifier (`clientId` or `clientUuid`, but not both).  
        The system locates the pass and makes an update request to the associated service: Apple sends an APN background push (the device re-fetches the pass from the web service), Google PATCHes the wallet object.

        Each card emits one terminal event per platform — `walletPass.updated` on success or `walletPass.updateFailed` on failure, both always carrying the card's specific parameters. Failures add `cause=noDevicesFound` for an iOS pass with no registered device left (removed or automatic updates off, which are indistinguishable) or `error=<message>` for any other Apple or Google failure, the sole exception being an iOS pass that was issued but never installed, which is skipped with no event at all.


        ---

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

        **User role permission required:** `campaigns_wallets: update`
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/device-hub-WalletsUpdateRequest"
        required: true
      responses:
        "202":
          description: Accepted - the update was enqueued and will be processed asynchronously
        "400":
          description: Bad Request - Validation failed (recordId missing, or not exactly one of clientId/clientUuid)
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/device-hub-ErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/device-hub-GatewayError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/device-hub-GatewayError"
        "502":
          description: Bad Gateway - failed to enqueue the command
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/device-hub-ErrorResponse"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Wallet-passes/operation/updateWalletPassUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/device-hub/wallets/update \
              --header 'content-type: application/json' \
              --data '{"clientId":0,"clientUuid":"c6e70fa5-bbfd-4e2e-9660-1407608fb247","recordId":"0470cfd4-dcf3-4d8c-ac28-58c6deeff25f","platform":"IOS"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"clientId\":0,\"clientUuid\":\"c6e70fa5-bbfd-4e2e-9660-1407608fb247\",\"recordId\":\"0470cfd4-dcf3-4d8c-ac28-58c6deeff25f\",\"platform\":\"IOS\"}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/device-hub/wallets/update", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "clientId": 0,
              "clientUuid": "c6e70fa5-bbfd-4e2e-9660-1407608fb247",
              "recordId": "0470cfd4-dcf3-4d8c-ac28-58c6deeff25f",
              "platform": "IOS"
            });

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

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

            xhr.open("POST", "https://api.synerise.com/device-hub/wallets/update");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/device-hub/wallets/update",
              "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({
              clientId: 0,
              clientUuid: 'c6e70fa5-bbfd-4e2e-9660-1407608fb247',
              recordId: '0470cfd4-dcf3-4d8c-ac28-58c6deeff25f',
              platform: 'IOS'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/device-hub/wallets/update');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"clientId":0,"clientUuid":"c6e70fa5-bbfd-4e2e-9660-1407608fb247","recordId":"0470cfd4-dcf3-4d8c-ac28-58c6deeff25f","platform":"IOS"}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/device-hub/wallets/update")
              .header("content-type", "application/json")
              .body("{\"clientId\":0,\"clientUuid\":\"c6e70fa5-bbfd-4e2e-9660-1407608fb247\",\"recordId\":\"0470cfd4-dcf3-4d8c-ac28-58c6deeff25f\",\"platform\":\"IOS\"}")
              .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"
                optimization:
                  $ref: "#/components/schemas/items-search-config-OptimizationSchema"
                geoSearch:
                  $ref: "#/components/schemas/items-search-config-GeoSearchSchema"
                queryRules:
                  $ref: "#/components/schemas/items-search-config-QueryRulesSchema"
                indexType:
                  $ref: "#/components/schemas/items-search-config-IndexTypeSchema"
                chunking:
                  $ref: "#/components/schemas/items-search-config-ChunkingConfigSchema"
                documentFields:
                  $ref: "#/components/schemas/items-search-config-DocumentFieldsConfigSchema"
      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"]}},"optimization":{"enabled":true,"target":"ctr","optimizedWeights":{"property1":{"baseWeights":{"personalized":5,"transactionsPopularity":5,"pageVisitsPopularity":5,"transactions7DaysPopularity":5,"pageVisits7DaysPopularity":5,"revenueBoost":5,"conversionRateBoost":5,"fullTextMultipliers":{"stronglyBoosted":100,"boosted":100,"normal":100}},"drrWeights":{"searchDRRWeight":5,"listingDRRWeight":5,"clickWeight":5,"buyWeight":5,"revenueWeight":5}},"property2":{"baseWeights":{"personalized":5,"transactionsPopularity":5,"pageVisitsPopularity":5,"transactions7DaysPopularity":5,"pageVisits7DaysPopularity":5,"revenueBoost":5,"conversionRateBoost":5,"fullTextMultipliers":{"stronglyBoosted":100,"boosted":100,"normal":100}},"drrWeights":{"searchDRRWeight":5,"listingDRRWeight":5,"clickWeight":5,"buyWeight":5,"revenueWeight":5}}}},"geoSearch":{"geoSearchableAttribute":"string"},"queryRules":{"consequencesJoinOperators":{"standardFilters":"AND","elasticFilters":"AND"}},"indexType":"Product","chunking":{"strategy":"recursive","tokenLimit":512,"overlapTokens":64,"minChunkTokens":16,"respectHeaders":true,"preserveCodeBlocks":true},"documentFields":{"contentField":"string","titleField":"string","contentFormat":"Plaintext","metadataFields":["string"]}}'
        - 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\"]}},\"optimization\":{\"enabled\":true,\"target\":\"ctr\",\"optimizedWeights\":{\"property1\":{\"baseWeights\":{\"personalized\":5,\"transactionsPopularity\":5,\"pageVisitsPopularity\":5,\"transactions7DaysPopularity\":5,\"pageVisits7DaysPopularity\":5,\"revenueBoost\":5,\"conversionRateBoost\":5,\"fullTextMultipliers\":{\"stronglyBoosted\":100,\"boosted\":100,\"normal\":100}},\"drrWeights\":{\"searchDRRWeight\":5,\"listingDRRWeight\":5,\"clickWeight\":5,\"buyWeight\":5,\"revenueWeight\":5}},\"property2\":{\"baseWeights\":{\"personalized\":5,\"transactionsPopularity\":5,\"pageVisitsPopularity\":5,\"transactions7DaysPopularity\":5,\"pageVisits7DaysPopularity\":5,\"revenueBoost\":5,\"conversionRateBoost\":5,\"fullTextMultipliers\":{\"stronglyBoosted\":100,\"boosted\":100,\"normal\":100}},\"drrWeights\":{\"searchDRRWeight\":5,\"listingDRRWeight\":5,\"clickWeight\":5,\"buyWeight\":5,\"revenueWeight\":5}}}},\"geoSearch\":{\"geoSearchableAttribute\":\"string\"},\"queryRules\":{\"consequencesJoinOperators\":{\"standardFilters\":\"AND\",\"elasticFilters\":\"AND\"}},\"indexType\":\"Product\",\"chunking\":{\"strategy\":\"recursive\",\"tokenLimit\":512,\"overlapTokens\":64,\"minChunkTokens\":16,\"respectHeaders\":true,\"preserveCodeBlocks\":true},\"documentFields\":{\"contentField\":\"string\",\"titleField\":\"string\",\"contentFormat\":\"Plaintext\",\"metadataFields\":[\"string\"]}}"

            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"
                  ]
                }
              },
              "optimization": {
                "enabled": true,
                "target": "ctr",
                "optimizedWeights": {
                  "property1": {
                    "baseWeights": {
                      "personalized": 5,
                      "transactionsPopularity": 5,
                      "pageVisitsPopularity": 5,
                      "transactions7DaysPopularity": 5,
                      "pageVisits7DaysPopularity": 5,
                      "revenueBoost": 5,
                      "conversionRateBoost": 5,
                      "fullTextMultipliers": {
                        "stronglyBoosted": 100,
                        "boosted": 100,
                        "normal": 100
                      }
                    },
                    "drrWeights": {
                      "searchDRRWeight": 5,
                      "listingDRRWeight": 5,
                      "clickWeight": 5,
                      "buyWeight": 5,
                      "revenueWeight": 5
                    }
                  },
                  "property2": {
                    "baseWeights": {
                      "personalized": 5,
                      "transactionsPopularity": 5,
                      "pageVisitsPopularity": 5,
                      "transactions7DaysPopularity": 5,
                      "pageVisits7DaysPopularity": 5,
                      "revenueBoost": 5,
                      "conversionRateBoost": 5,
                      "fullTextMultipliers": {
                        "stronglyBoosted": 100,
                        "boosted": 100,
                        "normal": 100
                      }
                    },
                    "drrWeights": {
                      "searchDRRWeight": 5,
                      "listingDRRWeight": 5,
                      "clickWeight": 5,
                      "buyWeight": 5,
                      "revenueWeight": 5
                    }
                  }
                }
              },
              "geoSearch": {
                "geoSearchableAttribute": "string"
              },
              "queryRules": {
                "consequencesJoinOperators": {
                  "standardFilters": "AND",
                  "elasticFilters": "AND"
                }
              },
              "indexType": "Product",
              "chunking": {
                "strategy": "recursive",
                "tokenLimit": 512,
                "overlapTokens": 64,
                "minChunkTokens": 16,
                "respectHeaders": true,
                "preserveCodeBlocks": true
              },
              "documentFields": {
                "contentField": "string",
                "titleField": "string",
                "contentFormat": "Plaintext",
                "metadataFields": [
                  "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/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']
                }
              },
              optimization: {
                enabled: true,
                target: 'ctr',
                optimizedWeights: {
                  property1: {
                    baseWeights: {
                      personalized: 5,
                      transactionsPopularity: 5,
                      pageVisitsPopularity: 5,
                      transactions7DaysPopularity: 5,
                      pageVisits7DaysPopularity: 5,
                      revenueBoost: 5,
                      conversionRateBoost: 5,
                      fullTextMultipliers: {stronglyBoosted: 100, boosted: 100, normal: 100}
                    },
                    drrWeights: {
                      searchDRRWeight: 5,
                      listingDRRWeight: 5,
                      clickWeight: 5,
                      buyWeight: 5,
                      revenueWeight: 5
                    }
                  },
                  property2: {
                    baseWeights: {
                      personalized: 5,
                      transactionsPopularity: 5,
                      pageVisitsPopularity: 5,
                      transactions7DaysPopularity: 5,
                      pageVisits7DaysPopularity: 5,
                      revenueBoost: 5,
                      conversionRateBoost: 5,
                      fullTextMultipliers: {stronglyBoosted: 100, boosted: 100, normal: 100}
                    },
                    drrWeights: {
                      searchDRRWeight: 5,
                      listingDRRWeight: 5,
                      clickWeight: 5,
                      buyWeight: 5,
                      revenueWeight: 5
                    }
                  }
                }
              },
              geoSearch: {geoSearchableAttribute: 'string'},
              queryRules: {consequencesJoinOperators: {standardFilters: 'AND', elasticFilters: 'AND'}},
              indexType: 'Product',
              chunking: {
                strategy: 'recursive',
                tokenLimit: 512,
                overlapTokens: 64,
                minChunkTokens: 16,
                respectHeaders: true,
                preserveCodeBlocks: true
              },
              documentFields: {
                contentField: 'string',
                titleField: 'string',
                contentFormat: 'Plaintext',
                metadataFields: ['string']
              }
            }));
            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"]}},"optimization":{"enabled":true,"target":"ctr","optimizedWeights":{"property1":{"baseWeights":{"personalized":5,"transactionsPopularity":5,"pageVisitsPopularity":5,"transactions7DaysPopularity":5,"pageVisits7DaysPopularity":5,"revenueBoost":5,"conversionRateBoost":5,"fullTextMultipliers":{"stronglyBoosted":100,"boosted":100,"normal":100}},"drrWeights":{"searchDRRWeight":5,"listingDRRWeight":5,"clickWeight":5,"buyWeight":5,"revenueWeight":5}},"property2":{"baseWeights":{"personalized":5,"transactionsPopularity":5,"pageVisitsPopularity":5,"transactions7DaysPopularity":5,"pageVisits7DaysPopularity":5,"revenueBoost":5,"conversionRateBoost":5,"fullTextMultipliers":{"stronglyBoosted":100,"boosted":100,"normal":100}},"drrWeights":{"searchDRRWeight":5,"listingDRRWeight":5,"clickWeight":5,"buyWeight":5,"revenueWeight":5}}}},"geoSearch":{"geoSearchableAttribute":"string"},"queryRules":{"consequencesJoinOperators":{"standardFilters":"AND","elasticFilters":"AND"}},"indexType":"Product","chunking":{"strategy":"recursive","tokenLimit":512,"overlapTokens":64,"minChunkTokens":16,"respectHeaders":true,"preserveCodeBlocks":true},"documentFields":{"contentField":"string","titleField":"string","contentFormat":"Plaintext","metadataFields":["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/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\"]}},\"optimization\":{\"enabled\":true,\"target\":\"ctr\",\"optimizedWeights\":{\"property1\":{\"baseWeights\":{\"personalized\":5,\"transactionsPopularity\":5,\"pageVisitsPopularity\":5,\"transactions7DaysPopularity\":5,\"pageVisits7DaysPopularity\":5,\"revenueBoost\":5,\"conversionRateBoost\":5,\"fullTextMultipliers\":{\"stronglyBoosted\":100,\"boosted\":100,\"normal\":100}},\"drrWeights\":{\"searchDRRWeight\":5,\"listingDRRWeight\":5,\"clickWeight\":5,\"buyWeight\":5,\"revenueWeight\":5}},\"property2\":{\"baseWeights\":{\"personalized\":5,\"transactionsPopularity\":5,\"pageVisitsPopularity\":5,\"transactions7DaysPopularity\":5,\"pageVisits7DaysPopularity\":5,\"revenueBoost\":5,\"conversionRateBoost\":5,\"fullTextMultipliers\":{\"stronglyBoosted\":100,\"boosted\":100,\"normal\":100}},\"drrWeights\":{\"searchDRRWeight\":5,\"listingDRRWeight\":5,\"clickWeight\":5,\"buyWeight\":5,\"revenueWeight\":5}}}},\"geoSearch\":{\"geoSearchableAttribute\":\"string\"},\"queryRules\":{\"consequencesJoinOperators\":{\"standardFilters\":\"AND\",\"elasticFilters\":\"AND\"}},\"indexType\":\"Product\",\"chunking\":{\"strategy\":\"recursive\",\"tokenLimit\":512,\"overlapTokens\":64,\"minChunkTokens\":16,\"respectHeaders\":true,\"preserveCodeBlocks\":true},\"documentFields\":{\"contentField\":\"string\",\"titleField\":\"string\",\"contentFormat\":\"Plaintext\",\"metadataFields\":[\"string\"]}}")
              .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"
                optimization:
                  $ref: "#/components/schemas/items-search-config-OptimizationSchema"
                geoSearch:
                  $ref: "#/components/schemas/items-search-config-GeoSearchSchema"
                queryRules:
                  $ref: "#/components/schemas/items-search-config-QueryRulesSchema"
                indexType:
                  $ref: "#/components/schemas/items-search-config-IndexTypeSchema"
                chunking:
                  $ref: "#/components/schemas/items-search-config-ChunkingConfigSchema"
                documentFields:
                  $ref: "#/components/schemas/items-search-config-DocumentFieldsConfigSchema"
      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"]}},"optimization":{"enabled":true,"target":"ctr","optimizedWeights":{"property1":{"baseWeights":{"personalized":5,"transactionsPopularity":5,"pageVisitsPopularity":5,"transactions7DaysPopularity":5,"pageVisits7DaysPopularity":5,"revenueBoost":5,"conversionRateBoost":5,"fullTextMultipliers":{"stronglyBoosted":100,"boosted":100,"normal":100}},"drrWeights":{"searchDRRWeight":5,"listingDRRWeight":5,"clickWeight":5,"buyWeight":5,"revenueWeight":5}},"property2":{"baseWeights":{"personalized":5,"transactionsPopularity":5,"pageVisitsPopularity":5,"transactions7DaysPopularity":5,"pageVisits7DaysPopularity":5,"revenueBoost":5,"conversionRateBoost":5,"fullTextMultipliers":{"stronglyBoosted":100,"boosted":100,"normal":100}},"drrWeights":{"searchDRRWeight":5,"listingDRRWeight":5,"clickWeight":5,"buyWeight":5,"revenueWeight":5}}}},"geoSearch":{"geoSearchableAttribute":"string"},"queryRules":{"consequencesJoinOperators":{"standardFilters":"AND","elasticFilters":"AND"}},"indexType":"Product","chunking":{"strategy":"recursive","tokenLimit":512,"overlapTokens":64,"minChunkTokens":16,"respectHeaders":true,"preserveCodeBlocks":true},"documentFields":{"contentField":"string","titleField":"string","contentFormat":"Plaintext","metadataFields":["string"]}}'
        - 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\"]}},\"optimization\":{\"enabled\":true,\"target\":\"ctr\",\"optimizedWeights\":{\"property1\":{\"baseWeights\":{\"personalized\":5,\"transactionsPopularity\":5,\"pageVisitsPopularity\":5,\"transactions7DaysPopularity\":5,\"pageVisits7DaysPopularity\":5,\"revenueBoost\":5,\"conversionRateBoost\":5,\"fullTextMultipliers\":{\"stronglyBoosted\":100,\"boosted\":100,\"normal\":100}},\"drrWeights\":{\"searchDRRWeight\":5,\"listingDRRWeight\":5,\"clickWeight\":5,\"buyWeight\":5,\"revenueWeight\":5}},\"property2\":{\"baseWeights\":{\"personalized\":5,\"transactionsPopularity\":5,\"pageVisitsPopularity\":5,\"transactions7DaysPopularity\":5,\"pageVisits7DaysPopularity\":5,\"revenueBoost\":5,\"conversionRateBoost\":5,\"fullTextMultipliers\":{\"stronglyBoosted\":100,\"boosted\":100,\"normal\":100}},\"drrWeights\":{\"searchDRRWeight\":5,\"listingDRRWeight\":5,\"clickWeight\":5,\"buyWeight\":5,\"revenueWeight\":5}}}},\"geoSearch\":{\"geoSearchableAttribute\":\"string\"},\"queryRules\":{\"consequencesJoinOperators\":{\"standardFilters\":\"AND\",\"elasticFilters\":\"AND\"}},\"indexType\":\"Product\",\"chunking\":{\"strategy\":\"recursive\",\"tokenLimit\":512,\"overlapTokens\":64,\"minChunkTokens\":16,\"respectHeaders\":true,\"preserveCodeBlocks\":true},\"documentFields\":{\"contentField\":\"string\",\"titleField\":\"string\",\"contentFormat\":\"Plaintext\",\"metadataFields\":[\"string\"]}}"

            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"
                  ]
                }
              },
              "optimization": {
                "enabled": true,
                "target": "ctr",
                "optimizedWeights": {
                  "property1": {
                    "baseWeights": {
                      "personalized": 5,
                      "transactionsPopularity": 5,
                      "pageVisitsPopularity": 5,
                      "transactions7DaysPopularity": 5,
                      "pageVisits7DaysPopularity": 5,
                      "revenueBoost": 5,
                      "conversionRateBoost": 5,
                      "fullTextMultipliers": {
                        "stronglyBoosted": 100,
                        "boosted": 100,
                        "normal": 100
                      }
                    },
                    "drrWeights": {
                      "searchDRRWeight": 5,
                      "listingDRRWeight": 5,
                      "clickWeight": 5,
                      "buyWeight": 5,
                      "revenueWeight": 5
                    }
                  },
                  "property2": {
                    "baseWeights": {
                      "personalized": 5,
                      "transactionsPopularity": 5,
                      "pageVisitsPopularity": 5,
                      "transactions7DaysPopularity": 5,
                      "pageVisits7DaysPopularity": 5,
                      "revenueBoost": 5,
                      "conversionRateBoost": 5,
                      "fullTextMultipliers": {
                        "stronglyBoosted": 100,
                        "boosted": 100,
                        "normal": 100
                      }
                    },
                    "drrWeights": {
                      "searchDRRWeight": 5,
                      "listingDRRWeight": 5,
                      "clickWeight": 5,
                      "buyWeight": 5,
                      "revenueWeight": 5
                    }
                  }
                }
              },
              "geoSearch": {
                "geoSearchableAttribute": "string"
              },
              "queryRules": {
                "consequencesJoinOperators": {
                  "standardFilters": "AND",
                  "elasticFilters": "AND"
                }
              },
              "indexType": "Product",
              "chunking": {
                "strategy": "recursive",
                "tokenLimit": 512,
                "overlapTokens": 64,
                "minChunkTokens": 16,
                "respectHeaders": true,
                "preserveCodeBlocks": true
              },
              "documentFields": {
                "contentField": "string",
                "titleField": "string",
                "contentFormat": "Plaintext",
                "metadataFields": [
                  "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/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']
                }
              },
              optimization: {
                enabled: true,
                target: 'ctr',
                optimizedWeights: {
                  property1: {
                    baseWeights: {
                      personalized: 5,
                      transactionsPopularity: 5,
                      pageVisitsPopularity: 5,
                      transactions7DaysPopularity: 5,
                      pageVisits7DaysPopularity: 5,
                      revenueBoost: 5,
                      conversionRateBoost: 5,
                      fullTextMultipliers: {stronglyBoosted: 100, boosted: 100, normal: 100}
                    },
                    drrWeights: {
                      searchDRRWeight: 5,
                      listingDRRWeight: 5,
                      clickWeight: 5,
                      buyWeight: 5,
                      revenueWeight: 5
                    }
                  },
                  property2: {
                    baseWeights: {
                      personalized: 5,
                      transactionsPopularity: 5,
                      pageVisitsPopularity: 5,
                      transactions7DaysPopularity: 5,
                      pageVisits7DaysPopularity: 5,
                      revenueBoost: 5,
                      conversionRateBoost: 5,
                      fullTextMultipliers: {stronglyBoosted: 100, boosted: 100, normal: 100}
                    },
                    drrWeights: {
                      searchDRRWeight: 5,
                      listingDRRWeight: 5,
                      clickWeight: 5,
                      buyWeight: 5,
                      revenueWeight: 5
                    }
                  }
                }
              },
              geoSearch: {geoSearchableAttribute: 'string'},
              queryRules: {consequencesJoinOperators: {standardFilters: 'AND', elasticFilters: 'AND'}},
              indexType: 'Product',
              chunking: {
                strategy: 'recursive',
                tokenLimit: 512,
                overlapTokens: 64,
                minChunkTokens: 16,
                respectHeaders: true,
                preserveCodeBlocks: true
              },
              documentFields: {
                contentField: 'string',
                titleField: 'string',
                contentFormat: 'Plaintext',
                metadataFields: ['string']
              }
            }));
            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"]}},"optimization":{"enabled":true,"target":"ctr","optimizedWeights":{"property1":{"baseWeights":{"personalized":5,"transactionsPopularity":5,"pageVisitsPopularity":5,"transactions7DaysPopularity":5,"pageVisits7DaysPopularity":5,"revenueBoost":5,"conversionRateBoost":5,"fullTextMultipliers":{"stronglyBoosted":100,"boosted":100,"normal":100}},"drrWeights":{"searchDRRWeight":5,"listingDRRWeight":5,"clickWeight":5,"buyWeight":5,"revenueWeight":5}},"property2":{"baseWeights":{"personalized":5,"transactionsPopularity":5,"pageVisitsPopularity":5,"transactions7DaysPopularity":5,"pageVisits7DaysPopularity":5,"revenueBoost":5,"conversionRateBoost":5,"fullTextMultipliers":{"stronglyBoosted":100,"boosted":100,"normal":100}},"drrWeights":{"searchDRRWeight":5,"listingDRRWeight":5,"clickWeight":5,"buyWeight":5,"revenueWeight":5}}}},"geoSearch":{"geoSearchableAttribute":"string"},"queryRules":{"consequencesJoinOperators":{"standardFilters":"AND","elasticFilters":"AND"}},"indexType":"Product","chunking":{"strategy":"recursive","tokenLimit":512,"overlapTokens":64,"minChunkTokens":16,"respectHeaders":true,"preserveCodeBlocks":true},"documentFields":{"contentField":"string","titleField":"string","contentFormat":"Plaintext","metadataFields":["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/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\"]}},\"optimization\":{\"enabled\":true,\"target\":\"ctr\",\"optimizedWeights\":{\"property1\":{\"baseWeights\":{\"personalized\":5,\"transactionsPopularity\":5,\"pageVisitsPopularity\":5,\"transactions7DaysPopularity\":5,\"pageVisits7DaysPopularity\":5,\"revenueBoost\":5,\"conversionRateBoost\":5,\"fullTextMultipliers\":{\"stronglyBoosted\":100,\"boosted\":100,\"normal\":100}},\"drrWeights\":{\"searchDRRWeight\":5,\"listingDRRWeight\":5,\"clickWeight\":5,\"buyWeight\":5,\"revenueWeight\":5}},\"property2\":{\"baseWeights\":{\"personalized\":5,\"transactionsPopularity\":5,\"pageVisitsPopularity\":5,\"transactions7DaysPopularity\":5,\"pageVisits7DaysPopularity\":5,\"revenueBoost\":5,\"conversionRateBoost\":5,\"fullTextMultipliers\":{\"stronglyBoosted\":100,\"boosted\":100,\"normal\":100}},\"drrWeights\":{\"searchDRRWeight\":5,\"listingDRRWeight\":5,\"clickWeight\":5,\"buyWeight\":5,\"revenueWeight\":5}}}},\"geoSearch\":{\"geoSearchableAttribute\":\"string\"},\"queryRules\":{\"consequencesJoinOperators\":{\"standardFilters\":\"AND\",\"elasticFilters\":\"AND\"}},\"indexType\":\"Product\",\"chunking\":{\"strategy\":\"recursive\",\"tokenLimit\":512,\"overlapTokens\":64,\"minChunkTokens\":16,\"respectHeaders\":true,\"preserveCodeBlocks\":true},\"documentFields\":{\"contentField\":\"string\",\"titleField\":\"string\",\"contentFormat\":\"Plaintext\",\"metadataFields\":[\"string\"]}}")
              .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();
  /optimizer/v2/experiments:
    post:
      summary: Create experiment
      description: |
        Create a new A/B/X test for recommendations or item 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:** `OPTIMIZER_MANAGER_TESTOPTIMIZER_CREATE`

        **User role permission required:** `campaigns_test_optimizer: create`
      operationId: CreateExperimentV2
      tags:
        - Experiments
      security:
        - JWT: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/optimizer-manager-ExperimentCreateOrUpdateRequestV2"
      responses:
        "200":
          description: ID of the created experiment
          content:
            application/json:
              schema:
                type: object
                properties:
                  experimentId:
                    $ref: "#/components/schemas/optimizer-manager-ExperimentId"
        "400":
          description: Check error message for more details.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/optimizer-manager-ErrorV2"
      x-snr-doc-urls:
        - /api-reference/ai-suite#tag/Experiments/operation/CreateExperimentV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/optimizer/v2/experiments \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"string","description":"string","experimentKind":"ITEMS_SEARCH","variantsAllocationMethod":"Manual","variants":[{"externalId":"string","name":"string","weight":10000,"metadata":"string","isBaseline":true}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"name\":\"string\",\"description\":\"string\",\"experimentKind\":\"ITEMS_SEARCH\",\"variantsAllocationMethod\":\"Manual\",\"variants\":[{\"externalId\":\"string\",\"name\":\"string\",\"weight\":10000,\"metadata\":\"string\",\"isBaseline\":true}]}"

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

            conn.request("POST", "/optimizer/v2/experiments", 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",
              "experimentKind": "ITEMS_SEARCH",
              "variantsAllocationMethod": "Manual",
              "variants": [
                {
                  "externalId": "string",
                  "name": "string",
                  "weight": 10000,
                  "metadata": "string",
                  "isBaseline": 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/optimizer/v2/experiments");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

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

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

              res.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',
              experimentKind: 'ITEMS_SEARCH',
              variantsAllocationMethod: 'Manual',
              variants: [
                {
                  externalId: 'string',
                  name: 'string',
                  weight: 10000,
                  metadata: 'string',
                  isBaseline: true
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"name":"string","description":"string","experimentKind":"ITEMS_SEARCH","variantsAllocationMethod":"Manual","variants":[{"externalId":"string","name":"string","weight":10000,"metadata":"string","isBaseline":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/optimizer/v2/experiments")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\",\"description\":\"string\",\"experimentKind\":\"ITEMS_SEARCH\",\"variantsAllocationMethod\":\"Manual\",\"variants\":[{\"externalId\":\"string\",\"name\":\"string\",\"weight\":10000,\"metadata\":\"string\",\"isBaseline\":true}]}")
              .asString();
    get:
      summary: Find experiments
      description: |
        Find experiments. You can filter the results by campaign type, status, author, or search for a string in the name, or declare the ID of the experiment.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_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:** `OPTIMIZER_MANAGER_TESTOPTIMIZER_READ`

        **User role permission required:** `campaigns_test_optimizer: read`
      operationId: FindExperimentsV2
      tags:
        - Experiments
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/optimizer-manager-InQueryCampaignType"
        - $ref: "#/components/parameters/optimizer-manager-InQueryStatus"
        - $ref: "#/components/parameters/optimizer-manager-InQuerySearch"
      responses:
        "200":
          description: Experiments returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/optimizer-manager-ExperimentV2Seq"
      x-snr-doc-urls:
        - /api-reference/ai-suite#tag/Experiments/operation/FindExperimentsV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/optimizer/v2/experiments?campaignType=SOME_STRING_VALUE&status=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", "/optimizer/v2/experiments?campaignType=SOME_STRING_VALUE&status=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/optimizer/v2/experiments?campaignType=SOME_STRING_VALUE&status=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": "/optimizer/v2/experiments?campaignType=SOME_STRING_VALUE&status=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/optimizer/v2/experiments');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'campaignType' => 'SOME_STRING_VALUE',
              'status' => '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/optimizer/v2/experiments?campaignType=SOME_STRING_VALUE&status=SOME_ARRAY_VALUE&search=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /optimizer/v2/experiments/{id}:
    put:
      summary: Update experiment
      description: |
        Update an existing experiment.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_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:** `OPTIMIZER_MANAGER_TESTOPTIMIZER_UPDATE`

        **User role permission required:** `campaigns_test_optimizer: update`
      operationId: UpdateExperimentV2
      tags:
        - Experiments
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/optimizer-manager-InPathExperimentId"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/optimizer-manager-ExperimentCreateOrUpdateRequestV2"
      responses:
        "204":
          description: Experiment updated successfully
        "400":
          description: Check error message for more details.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/optimizer-manager-ErrorV2"
        "404":
          description: Experiment not found. Check error message for more details.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/optimizer-manager-ErrorV2"
      x-snr-doc-urls:
        - /api-reference/ai-suite#tag/Experiments/operation/UpdateExperimentV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/optimizer/v2/experiments/%7Bid%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"string","description":"string","experimentKind":"ITEMS_SEARCH","variantsAllocationMethod":"Manual","variants":[{"externalId":"string","name":"string","weight":10000,"metadata":"string","isBaseline":true}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"name\":\"string\",\"description\":\"string\",\"experimentKind\":\"ITEMS_SEARCH\",\"variantsAllocationMethod\":\"Manual\",\"variants\":[{\"externalId\":\"string\",\"name\":\"string\",\"weight\":10000,\"metadata\":\"string\",\"isBaseline\":true}]}"

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

            conn.request("PUT", "/optimizer/v2/experiments/%7Bid%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",
              "experimentKind": "ITEMS_SEARCH",
              "variantsAllocationMethod": "Manual",
              "variants": [
                {
                  "externalId": "string",
                  "name": "string",
                  "weight": 10000,
                  "metadata": "string",
                  "isBaseline": 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/optimizer/v2/experiments/%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": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/optimizer/v2/experiments/%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({
              name: 'string',
              description: 'string',
              experimentKind: 'ITEMS_SEARCH',
              variantsAllocationMethod: 'Manual',
              variants: [
                {
                  externalId: 'string',
                  name: 'string',
                  weight: 10000,
                  metadata: 'string',
                  isBaseline: true
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/optimizer/v2/experiments/%7Bid%7D');
            $request->setMethod(HTTP_METH_PUT);

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

            $request->setBody('{"name":"string","description":"string","experimentKind":"ITEMS_SEARCH","variantsAllocationMethod":"Manual","variants":[{"externalId":"string","name":"string","weight":10000,"metadata":"string","isBaseline":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/optimizer/v2/experiments/%7Bid%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\",\"description\":\"string\",\"experimentKind\":\"ITEMS_SEARCH\",\"variantsAllocationMethod\":\"Manual\",\"variants\":[{\"externalId\":\"string\",\"name\":\"string\",\"weight\":10000,\"metadata\":\"string\",\"isBaseline\":true}]}")
              .asString();
    get:
      summary: Get experiment
      description: |
        Retrieve the details of an experiment.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_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:** `OPTIMIZER_MANAGER_TESTOPTIMIZER_READ`

        **User role permission required:** `campaigns_test_optimizer: read`
      operationId: FindExperimentV2
      tags:
        - Experiments
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/optimizer-manager-InPathExperimentId"
      responses:
        "200":
          description: Extended experiment returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/optimizer-manager-ExperimentDetailsResponseV2"
        "404":
          description: Experiment not found. Check error message for more details.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/optimizer-manager-ErrorV2"
      x-snr-doc-urls:
        - /api-reference/ai-suite#tag/Experiments/operation/FindExperimentV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/optimizer/v2/experiments/%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", "/optimizer/v2/experiments/%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/optimizer/v2/experiments/%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": "/optimizer/v2/experiments/%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/optimizer/v2/experiments/%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/optimizer/v2/experiments/%7Bid%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    delete:
      summary: Delete experiment
      description: |
        Delete an experiment permanently.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_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:** `OPTIMIZER_MANAGER_TESTOPTIMIZER_DELETE`

        **User role permission required:** `campaigns_test_optimizer: delete`
      operationId: DeleteExperimentV2
      tags:
        - Experiments
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/optimizer-manager-InPathExperimentId"
      responses:
        "204":
          description: Experiment deleted successfully
        "404":
          description: Experiment not found. Check error message for more details.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/optimizer-manager-ErrorV2"
      x-snr-doc-urls:
        - /api-reference/ai-suite#tag/Experiments/operation/DeleteExperimentV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/optimizer/v2/experiments/%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("DELETE", "/optimizer/v2/experiments/%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("DELETE", "https://api.synerise.com/optimizer/v2/experiments/%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": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/optimizer/v2/experiments/%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/optimizer/v2/experiments/%7Bid%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/optimizer/v2/experiments/%7Bid%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /optimizer/v2/experiments/{id}/start:
    post:
      summary: Start experiment
      description: |
        Start an experiment (for paused experiments, use [this method](#operation/ResumeExperiment)).

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_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:** `OPTIMIZER_MANAGER_TESTOPTIMIZER_EXECUTE`

        **User role permission required:** `campaigns_test_optimizer: execute`
      operationId: StartExperimentV2
      tags:
        - Experiments
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/optimizer-manager-InPathExperimentId"
      responses:
        "204":
          description: Experiment started successfully
        "400":
          description: Check error message for more details.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/optimizer-manager-ErrorV2"
        "404":
          description: Experiment not found. Check error message for more details.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/optimizer-manager-ErrorV2"
      x-snr-doc-urls:
        - /api-reference/ai-suite#tag/Experiments/operation/StartExperimentV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/optimizer/v2/experiments/%7Bid%7D/start \
              --header 'Authorization: Bearer REPLACE_BEARER_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", "/optimizer/v2/experiments/%7Bid%7D/start", headers=headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const 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/optimizer/v2/experiments/%7Bid%7D/start");
            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": "/optimizer/v2/experiments/%7Bid%7D/start",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/optimizer/v2/experiments/%7Bid%7D/start');
            $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/optimizer/v2/experiments/%7Bid%7D/start")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /optimizer/v2/experiments/{id}/stop:
    post:
      summary: Stop experiment
      description: |
        Stop an experiment. It **cannot** be started 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:** `OPTIMIZER_MANAGER_TESTOPTIMIZER_EXECUTE`

        **User role permission required:** `campaigns_test_optimizer: execute`
      operationId: StopExperimentV2
      tags:
        - Experiments
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/optimizer-manager-InPathExperimentId"
      responses:
        "204":
          description: Experiment stopped successfully
        "400":
          description: Check error message for more details.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/optimizer-manager-ErrorV2"
        "404":
          description: Experiment not found. Check error message for more details.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/optimizer-manager-ErrorV2"
      x-snr-doc-urls:
        - /api-reference/ai-suite#tag/Experiments/operation/StopExperimentV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/optimizer/v2/experiments/%7Bid%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", "/optimizer/v2/experiments/%7Bid%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/optimizer/v2/experiments/%7Bid%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": "/optimizer/v2/experiments/%7Bid%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/optimizer/v2/experiments/%7Bid%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/optimizer/v2/experiments/%7Bid%7D/stop")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /optimizer/v2/experiments/{id}/pause:
    post:
      summary: Pause experiment
      description: |
        Pause an experiment. It can be resumed later.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_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:** `OPTIMIZER_MANAGER_TESTOPTIMIZER_EXECUTE`

        **User role permission required:** `campaigns_test_optimizer: execute`
      operationId: PauseExperimentV2
      tags:
        - Experiments
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/optimizer-manager-InPathExperimentId"
      responses:
        "204":
          description: Experiment paused successfully
        "400":
          description: Check error message for more details.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/optimizer-manager-ErrorV2"
        "404":
          description: Experiment not found. Check error message for more details.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/optimizer-manager-ErrorV2"
      x-snr-doc-urls:
        - /api-reference/ai-suite#tag/Experiments/operation/PauseExperimentV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/optimizer/v2/experiments/%7Bid%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", "/optimizer/v2/experiments/%7Bid%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/optimizer/v2/experiments/%7Bid%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": "/optimizer/v2/experiments/%7Bid%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/optimizer/v2/experiments/%7Bid%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/optimizer/v2/experiments/%7Bid%7D/pause")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /optimizer/v2/experiments/{id}/resume:
    post:
      summary: Resume experiment
      description: |
        Resume an experiment after it 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:** `OPTIMIZER_MANAGER_TESTOPTIMIZER_EXECUTE`

        **User role permission required:** `campaigns_test_optimizer: execute`
      operationId: ResumeExperimentV2
      tags:
        - Experiments
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/optimizer-manager-InPathExperimentId"
      responses:
        "204":
          description: Experiment resumed successfully
        "400":
          description: Check error message for more details.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/optimizer-manager-ErrorV2"
        "404":
          description: Experiment not found. Check error message for more details.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/optimizer-manager-Error"
      x-snr-doc-urls:
        - /api-reference/ai-suite#tag/Experiments/operation/ResumeExperimentV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/optimizer/v2/experiments/%7Bid%7D/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", "/optimizer/v2/experiments/%7Bid%7D/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/optimizer/v2/experiments/%7Bid%7D/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": "/optimizer/v2/experiments/%7Bid%7D/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/optimizer/v2/experiments/%7Bid%7D/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/optimizer/v2/experiments/%7Bid%7D/resume")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /optimizer/v2/experiments/{id}/duplicate:
    post:
      summary: Duplicate experiment
      description: |
        Create a copy of an existing experiment. You can only duplicate experiments that are stopped.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_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:** `OPTIMIZER_MANAGER_TESTOPTIMIZER_CREATE`

        **User role permission required:** `campaigns_test_optimizer: create`
      operationId: CopyExperimentV2
      tags:
        - Experiments
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/optimizer-manager-InPathExperimentId"
      responses:
        "200":
          description: ID of the created experiment
          content:
            application/json:
              schema:
                type: object
                properties:
                  experimentId:
                    $ref: "#/components/schemas/optimizer-manager-ExperimentId"
        "400":
          description: Check error message for more details.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/optimizer-manager-ErrorV2"
        "404":
          description: Experiment not found. Check error message for more details.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/optimizer-manager-ErrorV2"
      x-snr-doc-urls:
        - /api-reference/ai-suite#tag/Experiments/operation/CopyExperimentV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/optimizer/v2/experiments/%7Bid%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("POST", "/optimizer/v2/experiments/%7Bid%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("POST", "https://api.synerise.com/optimizer/v2/experiments/%7Bid%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": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/optimizer/v2/experiments/%7Bid%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/optimizer/v2/experiments/%7Bid%7D/duplicate');
            $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/optimizer/v2/experiments/%7Bid%7D/duplicate")
              .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 100 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.
        This method **can't be used to activate promotions which require voucher assignment**. You need to activate such promotions individually.

        ---

        **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
              minItems: 1
              maxItems: 200
              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
              minItems: 1
              maxItems: 200
              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
              minItems: 1
              maxItems: 200
              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 100 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: |
        **Deprecated.** Use [/v2/promotion/get-for-client/{identifierType}/{identifierValue}](#operation/GetAllClientPromotionsV2) instead.

        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 100 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"
        "404":
          $ref: "#/components/responses/promotions-ClientNotFoundError"
      deprecated: true
      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 100 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"],"catalogFilterQuery":"color==green;price=lt=100"},"discountedItemsCount":1},"cashbackSettings":{"exchangeRate":0.0001,"limits":{"minPoints":10,"maxPoints":1000,"maxTransactionAmount":20,"maxTransactionPercentage":50}}},"discountType":"PERCENT","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"}],"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"],"catalogFilterQuery":"color==green;price=lt=100","excludeCatalog":["311"],"excludeCatalogItemType":"SELECTED","excludeCatalogIndexItems":["29727276"],"excludeCatalogFilterIds":[],"excludeCatalogFilterQuery":"brand==acme","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\"],\"catalogFilterQuery\":\"color==green;price=lt=100\"},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.0001,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}},\"discountType\":\"PERCENT\",\"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\"}],\"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\"],\"catalogFilterQuery\":\"color==green;price=lt=100\",\"excludeCatalog\":[\"311\"],\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"29727276\"],\"excludeCatalogFilterIds\":[],\"excludeCatalogFilterQuery\":\"brand==acme\",\"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"
                    ],
                    "catalogFilterQuery": "color==green;price=lt=100"
                  },
                  "discountedItemsCount": 1
                },
                "cashbackSettings": {
                  "exchangeRate": 0.0001,
                  "limits": {
                    "minPoints": 10,
                    "maxPoints": 1000,
                    "maxTransactionAmount": 20,
                    "maxTransactionPercentage": 50
                  }
                }
              },
              "discountType": "PERCENT",
              "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"
                }
              ],
              "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"
              ],
              "catalogFilterQuery": "color==green;price=lt=100",
              "excludeCatalog": [
                "311"
              ],
              "excludeCatalogItemType": "SELECTED",
              "excludeCatalogIndexItems": [
                "29727276"
              ],
              "excludeCatalogFilterIds": [],
              "excludeCatalogFilterQuery": "brand==acme",
              "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'],
                    catalogFilterQuery: 'color==green;price=lt=100'
                  },
                  discountedItemsCount: 1
                },
                cashbackSettings: {
                  exchangeRate: 0.0001,
                  limits: {
                    minPoints: 10,
                    maxPoints: 1000,
                    maxTransactionAmount: 20,
                    maxTransactionPercentage: 50
                  }
                }
              },
              discountType: 'PERCENT',
              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'}],
              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'],
              catalogFilterQuery: 'color==green;price=lt=100',
              excludeCatalog: ['311'],
              excludeCatalogItemType: 'SELECTED',
              excludeCatalogIndexItems: ['29727276'],
              excludeCatalogFilterIds: [],
              excludeCatalogFilterQuery: 'brand==acme',
              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"],"catalogFilterQuery":"color==green;price=lt=100"},"discountedItemsCount":1},"cashbackSettings":{"exchangeRate":0.0001,"limits":{"minPoints":10,"maxPoints":1000,"maxTransactionAmount":20,"maxTransactionPercentage":50}}},"discountType":"PERCENT","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"}],"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"],"catalogFilterQuery":"color==green;price=lt=100","excludeCatalog":["311"],"excludeCatalogItemType":"SELECTED","excludeCatalogIndexItems":["29727276"],"excludeCatalogFilterIds":[],"excludeCatalogFilterQuery":"brand==acme","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\"],\"catalogFilterQuery\":\"color==green;price=lt=100\"},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.0001,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}},\"discountType\":\"PERCENT\",\"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\"}],\"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\"],\"catalogFilterQuery\":\"color==green;price=lt=100\",\"excludeCatalog\":[\"311\"],\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"29727276\"],\"excludeCatalogFilterIds\":[],\"excludeCatalogFilterQuery\":\"brand==acme\",\"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 100 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.
        This method **can't be used to activate promotions which require voucher assignment**. You need to activate such promotions individually.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_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
              minItems: 1
              maxItems: 200
              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
              minItems: 1
              maxItems: 200
              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"],"catalogFilterQuery":"color==green;price=lt=100"},"discountedItemsCount":1},"cashbackSettings":{"exchangeRate":0.0001,"limits":{"minPoints":10,"maxPoints":1000,"maxTransactionAmount":20,"maxTransactionPercentage":50}}},"discountType":"PERCENT","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"}],"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"],"catalogFilterQuery":"color==green;price=lt=100","excludeCatalog":["311"],"excludeCatalogItemType":"SELECTED","excludeCatalogIndexItems":["29727276"],"excludeCatalogFilterIds":[],"excludeCatalogFilterQuery":"brand==acme","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\"],\"catalogFilterQuery\":\"color==green;price=lt=100\"},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.0001,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}},\"discountType\":\"PERCENT\",\"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\"}],\"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\"],\"catalogFilterQuery\":\"color==green;price=lt=100\",\"excludeCatalog\":[\"311\"],\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"29727276\"],\"excludeCatalogFilterIds\":[],\"excludeCatalogFilterQuery\":\"brand==acme\",\"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"
                    ],
                    "catalogFilterQuery": "color==green;price=lt=100"
                  },
                  "discountedItemsCount": 1
                },
                "cashbackSettings": {
                  "exchangeRate": 0.0001,
                  "limits": {
                    "minPoints": 10,
                    "maxPoints": 1000,
                    "maxTransactionAmount": 20,
                    "maxTransactionPercentage": 50
                  }
                }
              },
              "discountType": "PERCENT",
              "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"
                }
              ],
              "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"
              ],
              "catalogFilterQuery": "color==green;price=lt=100",
              "excludeCatalog": [
                "311"
              ],
              "excludeCatalogItemType": "SELECTED",
              "excludeCatalogIndexItems": [
                "29727276"
              ],
              "excludeCatalogFilterIds": [],
              "excludeCatalogFilterQuery": "brand==acme",
              "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'],
                    catalogFilterQuery: 'color==green;price=lt=100'
                  },
                  discountedItemsCount: 1
                },
                cashbackSettings: {
                  exchangeRate: 0.0001,
                  limits: {
                    minPoints: 10,
                    maxPoints: 1000,
                    maxTransactionAmount: 20,
                    maxTransactionPercentage: 50
                  }
                }
              },
              discountType: 'PERCENT',
              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'}],
              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'],
              catalogFilterQuery: 'color==green;price=lt=100',
              excludeCatalog: ['311'],
              excludeCatalogItemType: 'SELECTED',
              excludeCatalogIndexItems: ['29727276'],
              excludeCatalogFilterIds: [],
              excludeCatalogFilterQuery: 'brand==acme',
              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"],"catalogFilterQuery":"color==green;price=lt=100"},"discountedItemsCount":1},"cashbackSettings":{"exchangeRate":0.0001,"limits":{"minPoints":10,"maxPoints":1000,"maxTransactionAmount":20,"maxTransactionPercentage":50}}},"discountType":"PERCENT","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"}],"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"],"catalogFilterQuery":"color==green;price=lt=100","excludeCatalog":["311"],"excludeCatalogItemType":"SELECTED","excludeCatalogIndexItems":["29727276"],"excludeCatalogFilterIds":[],"excludeCatalogFilterQuery":"brand==acme","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\"],\"catalogFilterQuery\":\"color==green;price=lt=100\"},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.0001,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}},\"discountType\":\"PERCENT\",\"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\"}],\"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\"],\"catalogFilterQuery\":\"color==green;price=lt=100\",\"excludeCatalog\":[\"311\"],\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"29727276\"],\"excludeCatalogFilterIds\":[],\"excludeCatalogFilterQuery\":\"brand==acme\",\"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"],"catalogFilterQuery":"color==green;price=lt=100"},"discountedItemsCount":1},"cashbackSettings":{"exchangeRate":0.0001,"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"}],"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"],"catalogFilterQuery":"color==green;price=lt=100","excludeCatalog":["311"],"excludeCatalogItemType":"SELECTED","excludeCatalogIndexItems":["29727276"],"excludeCatalogFilterIds":[],"excludeCatalogFilterQuery":"brand==acme","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\"],\"catalogFilterQuery\":\"color==green;price=lt=100\"},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.0001,\"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\"}],\"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\"],\"catalogFilterQuery\":\"color==green;price=lt=100\",\"excludeCatalog\":[\"311\"],\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"29727276\"],\"excludeCatalogFilterIds\":[],\"excludeCatalogFilterQuery\":\"brand==acme\",\"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"
                    ],
                    "catalogFilterQuery": "color==green;price=lt=100"
                  },
                  "discountedItemsCount": 1
                },
                "cashbackSettings": {
                  "exchangeRate": 0.0001,
                  "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"
                }
              ],
              "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"
              ],
              "catalogFilterQuery": "color==green;price=lt=100",
              "excludeCatalog": [
                "311"
              ],
              "excludeCatalogItemType": "SELECTED",
              "excludeCatalogIndexItems": [
                "29727276"
              ],
              "excludeCatalogFilterIds": [],
              "excludeCatalogFilterQuery": "brand==acme",
              "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'],
                    catalogFilterQuery: 'color==green;price=lt=100'
                  },
                  discountedItemsCount: 1
                },
                cashbackSettings: {
                  exchangeRate: 0.0001,
                  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'}],
              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'],
              catalogFilterQuery: 'color==green;price=lt=100',
              excludeCatalog: ['311'],
              excludeCatalogItemType: 'SELECTED',
              excludeCatalogIndexItems: ['29727276'],
              excludeCatalogFilterIds: [],
              excludeCatalogFilterQuery: 'brand==acme',
              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"],"catalogFilterQuery":"color==green;price=lt=100"},"discountedItemsCount":1},"cashbackSettings":{"exchangeRate":0.0001,"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"}],"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"],"catalogFilterQuery":"color==green;price=lt=100","excludeCatalog":["311"],"excludeCatalogItemType":"SELECTED","excludeCatalogIndexItems":["29727276"],"excludeCatalogFilterIds":[],"excludeCatalogFilterQuery":"brand==acme","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\"],\"catalogFilterQuery\":\"color==green;price=lt=100\"},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.0001,\"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\"}],\"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\"],\"catalogFilterQuery\":\"color==green;price=lt=100\",\"excludeCatalog\":[\"311\"],\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"29727276\"],\"excludeCatalogFilterIds\":[],\"excludeCatalogFilterQuery\":\"brand==acme\",\"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"],"catalogFilterQuery":"color==green;price=lt=100"},"discountedItemsCount":1},"cashbackSettings":{"exchangeRate":0.0001,"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"],"catalogFilterQuery":"color==green;price=lt=100","excludeCatalog":"string","excludeCatalogItemType":"SELECTED","excludeCatalogIndexItems":["string"],"excludeCatalogFilterIds":["string"],"excludeCatalogFilterQuery":"brand==acme","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\"],\"catalogFilterQuery\":\"color==green;price=lt=100\"},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.0001,\"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\"],\"catalogFilterQuery\":\"color==green;price=lt=100\",\"excludeCatalog\":\"string\",\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"string\"],\"excludeCatalogFilterIds\":[\"string\"],\"excludeCatalogFilterQuery\":\"brand==acme\",\"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"
                        ],
                        "catalogFilterQuery": "color==green;price=lt=100"
                      },
                      "discountedItemsCount": 1
                    },
                    "cashbackSettings": {
                      "exchangeRate": 0.0001,
                      "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"
                  ],
                  "catalogFilterQuery": "color==green;price=lt=100",
                  "excludeCatalog": "string",
                  "excludeCatalogItemType": "SELECTED",
                  "excludeCatalogIndexItems": [
                    "string"
                  ],
                  "excludeCatalogFilterIds": [
                    "string"
                  ],
                  "excludeCatalogFilterQuery": "brand==acme",
                  "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'],
                        catalogFilterQuery: 'color==green;price=lt=100'
                      },
                      discountedItemsCount: 1
                    },
                    cashbackSettings: {
                      exchangeRate: 0.0001,
                      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'],
                  catalogFilterQuery: 'color==green;price=lt=100',
                  excludeCatalog: 'string',
                  excludeCatalogItemType: 'SELECTED',
                  excludeCatalogIndexItems: ['string'],
                  excludeCatalogFilterIds: ['string'],
                  excludeCatalogFilterQuery: 'brand==acme',
                  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"],"catalogFilterQuery":"color==green;price=lt=100"},"discountedItemsCount":1},"cashbackSettings":{"exchangeRate":0.0001,"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"],"catalogFilterQuery":"color==green;price=lt=100","excludeCatalog":"string","excludeCatalogItemType":"SELECTED","excludeCatalogIndexItems":["string"],"excludeCatalogFilterIds":["string"],"excludeCatalogFilterQuery":"brand==acme","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\"],\"catalogFilterQuery\":\"color==green;price=lt=100\"},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.0001,\"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\"],\"catalogFilterQuery\":\"color==green;price=lt=100\",\"excludeCatalog\":\"string\",\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"string\"],\"excludeCatalogFilterIds\":[\"string\"],\"excludeCatalogFilterQuery\":\"brand==acme\",\"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"}],"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\"}],\"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"
                }
              ],
              "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'}],
              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"}],"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\"}],\"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.

        **IMPORTANT**: When assigning handbill promotions, candidate promotions are bounded by configurable limits: at most 40,000 candidates are read per handbill slot (ordered by priority), and the total number of candidates sent to the recommendation (AI) engine in a single request is capped at 45,000. If the combined candidates across all slots exceed the AI request cap, each slot is reduced proportionally to the number of candidates it contributed, but never below a configurable per-slot floor (default 1,000), so the smallest slots are left intact.


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_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"}],"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\"}],\"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"
                }
              ],
              "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'}],
              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"}],"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\"}],\"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.

        **IMPORTANT**: When assigning handbill promotions, candidate promotions are bounded by configurable limits: at most 40,000 candidates are read per handbill slot (ordered by priority), and the total number of candidates sent to the recommendation (AI) engine in a single request is capped at 45,000. If the combined candidates across all slots exceed the AI request cap, each slot is reduced proportionally to the number of candidates it contributed, but never below a configurable per-slot floor (default 1,000), so the smallest slots are left intact.


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_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"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "500":
          $ref: "#/components/responses/promotions-500"
      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:
        "201":
          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-handbill"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "422":
          $ref: "#/components/responses/promotions-Validation422"
      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":100},"variants":[{"name":"string","uuid":"095be615-a8ad-4c33-8e9c-c7612fbf6c9f","percentage":100,"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"},"interval":{"every":2,"unit":"WEEKS","anchorDate":"2026-07-05T23:59:00Z"}},"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":";"},"types":["MEMBERS_ONLY","HANDBILL"],"excludeByAvailableProducts":true,"slotFilters":{"order":"GIVEN","slots":[{"filterId":"aff0ee0f-f371-4b82-82c6-dc3b96f05c91","limit":5,"distinctFilter":{"filters":[{"field":"brand","maxNumItems":2,"levelRangeModifier":1}],"elastic":true},"fallback":{"filterId":"3f2c9a4e-8b1d-4e5f-9c6a-7d8e9f0a1b2c"}}]},"distinctFilter":{"filters":[{"field":"brand","maxNumItems":2,"levelRangeModifier":1}],"elastic":true}}]}'
        - 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\":100},\"variants\":[{\"name\":\"string\",\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"percentage\":100,\"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\"},\"interval\":{\"every\":2,\"unit\":\"WEEKS\",\"anchorDate\":\"2026-07-05T23:59:00Z\"}},\"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\":\";\"},\"types\":[\"MEMBERS_ONLY\",\"HANDBILL\"],\"excludeByAvailableProducts\":true,\"slotFilters\":{\"order\":\"GIVEN\",\"slots\":[{\"filterId\":\"aff0ee0f-f371-4b82-82c6-dc3b96f05c91\",\"limit\":5,\"distinctFilter\":{\"filters\":[{\"field\":\"brand\",\"maxNumItems\":2,\"levelRangeModifier\":1}],\"elastic\":true},\"fallback\":{\"filterId\":\"3f2c9a4e-8b1d-4e5f-9c6a-7d8e9f0a1b2c\"}}]},\"distinctFilter\":{\"filters\":[{\"field\":\"brand\",\"maxNumItems\":2,\"levelRangeModifier\":1}],\"elastic\":true}}]}"

            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": 100
              },
              "variants": [
                {
                  "name": "string",
                  "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
                  "percentage": 100,
                  "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"
                    },
                    "interval": {
                      "every": 2,
                      "unit": "WEEKS",
                      "anchorDate": "2026-07-05T23:59:00Z"
                    }
                  },
                  "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": ";"
                  },
                  "types": [
                    "MEMBERS_ONLY",
                    "HANDBILL"
                  ],
                  "excludeByAvailableProducts": true,
                  "slotFilters": {
                    "order": "GIVEN",
                    "slots": [
                      {
                        "filterId": "aff0ee0f-f371-4b82-82c6-dc3b96f05c91",
                        "limit": 5,
                        "distinctFilter": {
                          "filters": [
                            {
                              "field": "brand",
                              "maxNumItems": 2,
                              "levelRangeModifier": 1
                            }
                          ],
                          "elastic": true
                        },
                        "fallback": {
                          "filterId": "3f2c9a4e-8b1d-4e5f-9c6a-7d8e9f0a1b2c"
                        }
                      }
                    ]
                  },
                  "distinctFilter": {
                    "filters": [
                      {
                        "field": "brand",
                        "maxNumItems": 2,
                        "levelRangeModifier": 1
                      }
                    ],
                    "elastic": 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/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: 100},
              variants: [
                {
                  name: 'string',
                  uuid: '095be615-a8ad-4c33-8e9c-c7612fbf6c9f',
                  percentage: 100,
                  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'},
                    interval: {every: 2, unit: 'WEEKS', anchorDate: '2026-07-05T23:59:00Z'}
                  },
                  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: ';'
                  },
                  types: ['MEMBERS_ONLY', 'HANDBILL'],
                  excludeByAvailableProducts: true,
                  slotFilters: {
                    order: 'GIVEN',
                    slots: [
                      {
                        filterId: 'aff0ee0f-f371-4b82-82c6-dc3b96f05c91',
                        limit: 5,
                        distinctFilter: {
                          filters: [{field: 'brand', maxNumItems: 2, levelRangeModifier: 1}],
                          elastic: true
                        },
                        fallback: {filterId: '3f2c9a4e-8b1d-4e5f-9c6a-7d8e9f0a1b2c'}
                      }
                    ]
                  },
                  distinctFilter: {
                    filters: [{field: 'brand', maxNumItems: 2, levelRangeModifier: 1}],
                    elastic: true
                  }
                }
              ]
            }));
            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":100},"variants":[{"name":"string","uuid":"095be615-a8ad-4c33-8e9c-c7612fbf6c9f","percentage":100,"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"},"interval":{"every":2,"unit":"WEEKS","anchorDate":"2026-07-05T23:59:00Z"}},"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":";"},"types":["MEMBERS_ONLY","HANDBILL"],"excludeByAvailableProducts":true,"slotFilters":{"order":"GIVEN","slots":[{"filterId":"aff0ee0f-f371-4b82-82c6-dc3b96f05c91","limit":5,"distinctFilter":{"filters":[{"field":"brand","maxNumItems":2,"levelRangeModifier":1}],"elastic":true},"fallback":{"filterId":"3f2c9a4e-8b1d-4e5f-9c6a-7d8e9f0a1b2c"}}]},"distinctFilter":{"filters":[{"field":"brand","maxNumItems":2,"levelRangeModifier":1}],"elastic":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/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\":100},\"variants\":[{\"name\":\"string\",\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"percentage\":100,\"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\"},\"interval\":{\"every\":2,\"unit\":\"WEEKS\",\"anchorDate\":\"2026-07-05T23:59:00Z\"}},\"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\":\";\"},\"types\":[\"MEMBERS_ONLY\",\"HANDBILL\"],\"excludeByAvailableProducts\":true,\"slotFilters\":{\"order\":\"GIVEN\",\"slots\":[{\"filterId\":\"aff0ee0f-f371-4b82-82c6-dc3b96f05c91\",\"limit\":5,\"distinctFilter\":{\"filters\":[{\"field\":\"brand\",\"maxNumItems\":2,\"levelRangeModifier\":1}],\"elastic\":true},\"fallback\":{\"filterId\":\"3f2c9a4e-8b1d-4e5f-9c6a-7d8e9f0a1b2c\"}}]},\"distinctFilter\":{\"filters\":[{\"field\":\"brand\",\"maxNumItems\":2,\"levelRangeModifier\":1}],\"elastic\":true}}]}")
              .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-handbill"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "422":
          $ref: "#/components/responses/promotions-Validation422"
      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":100},"variants":[{"name":"string","uuid":"095be615-a8ad-4c33-8e9c-c7612fbf6c9f","percentage":100,"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"},"interval":{"every":2,"unit":"WEEKS","anchorDate":"2026-07-05T23:59:00Z"}},"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":";"},"types":["MEMBERS_ONLY","HANDBILL"],"excludeByAvailableProducts":true,"slotFilters":{"order":"GIVEN","slots":[{"filterId":"aff0ee0f-f371-4b82-82c6-dc3b96f05c91","limit":5,"distinctFilter":{"filters":[{"field":"brand","maxNumItems":2,"levelRangeModifier":1}],"elastic":true},"fallback":{"filterId":"3f2c9a4e-8b1d-4e5f-9c6a-7d8e9f0a1b2c"}}]},"distinctFilter":{"filters":[{"field":"brand","maxNumItems":2,"levelRangeModifier":1}],"elastic":true}}]}'
        - 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\":100},\"variants\":[{\"name\":\"string\",\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"percentage\":100,\"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\"},\"interval\":{\"every\":2,\"unit\":\"WEEKS\",\"anchorDate\":\"2026-07-05T23:59:00Z\"}},\"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\":\";\"},\"types\":[\"MEMBERS_ONLY\",\"HANDBILL\"],\"excludeByAvailableProducts\":true,\"slotFilters\":{\"order\":\"GIVEN\",\"slots\":[{\"filterId\":\"aff0ee0f-f371-4b82-82c6-dc3b96f05c91\",\"limit\":5,\"distinctFilter\":{\"filters\":[{\"field\":\"brand\",\"maxNumItems\":2,\"levelRangeModifier\":1}],\"elastic\":true},\"fallback\":{\"filterId\":\"3f2c9a4e-8b1d-4e5f-9c6a-7d8e9f0a1b2c\"}}]},\"distinctFilter\":{\"filters\":[{\"field\":\"brand\",\"maxNumItems\":2,\"levelRangeModifier\":1}],\"elastic\":true}}]}"

            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": 100
              },
              "variants": [
                {
                  "name": "string",
                  "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
                  "percentage": 100,
                  "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"
                    },
                    "interval": {
                      "every": 2,
                      "unit": "WEEKS",
                      "anchorDate": "2026-07-05T23:59:00Z"
                    }
                  },
                  "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": ";"
                  },
                  "types": [
                    "MEMBERS_ONLY",
                    "HANDBILL"
                  ],
                  "excludeByAvailableProducts": true,
                  "slotFilters": {
                    "order": "GIVEN",
                    "slots": [
                      {
                        "filterId": "aff0ee0f-f371-4b82-82c6-dc3b96f05c91",
                        "limit": 5,
                        "distinctFilter": {
                          "filters": [
                            {
                              "field": "brand",
                              "maxNumItems": 2,
                              "levelRangeModifier": 1
                            }
                          ],
                          "elastic": true
                        },
                        "fallback": {
                          "filterId": "3f2c9a4e-8b1d-4e5f-9c6a-7d8e9f0a1b2c"
                        }
                      }
                    ]
                  },
                  "distinctFilter": {
                    "filters": [
                      {
                        "field": "brand",
                        "maxNumItems": 2,
                        "levelRangeModifier": 1
                      }
                    ],
                    "elastic": 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/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: 100},
              variants: [
                {
                  name: 'string',
                  uuid: '095be615-a8ad-4c33-8e9c-c7612fbf6c9f',
                  percentage: 100,
                  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'},
                    interval: {every: 2, unit: 'WEEKS', anchorDate: '2026-07-05T23:59:00Z'}
                  },
                  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: ';'
                  },
                  types: ['MEMBERS_ONLY', 'HANDBILL'],
                  excludeByAvailableProducts: true,
                  slotFilters: {
                    order: 'GIVEN',
                    slots: [
                      {
                        filterId: 'aff0ee0f-f371-4b82-82c6-dc3b96f05c91',
                        limit: 5,
                        distinctFilter: {
                          filters: [{field: 'brand', maxNumItems: 2, levelRangeModifier: 1}],
                          elastic: true
                        },
                        fallback: {filterId: '3f2c9a4e-8b1d-4e5f-9c6a-7d8e9f0a1b2c'}
                      }
                    ]
                  },
                  distinctFilter: {
                    filters: [{field: 'brand', maxNumItems: 2, levelRangeModifier: 1}],
                    elastic: true
                  }
                }
              ]
            }));
            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":100},"variants":[{"name":"string","uuid":"095be615-a8ad-4c33-8e9c-c7612fbf6c9f","percentage":100,"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"},"interval":{"every":2,"unit":"WEEKS","anchorDate":"2026-07-05T23:59:00Z"}},"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":";"},"types":["MEMBERS_ONLY","HANDBILL"],"excludeByAvailableProducts":true,"slotFilters":{"order":"GIVEN","slots":[{"filterId":"aff0ee0f-f371-4b82-82c6-dc3b96f05c91","limit":5,"distinctFilter":{"filters":[{"field":"brand","maxNumItems":2,"levelRangeModifier":1}],"elastic":true},"fallback":{"filterId":"3f2c9a4e-8b1d-4e5f-9c6a-7d8e9f0a1b2c"}}]},"distinctFilter":{"filters":[{"field":"brand","maxNumItems":2,"levelRangeModifier":1}],"elastic":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/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\":100},\"variants\":[{\"name\":\"string\",\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"percentage\":100,\"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\"},\"interval\":{\"every\":2,\"unit\":\"WEEKS\",\"anchorDate\":\"2026-07-05T23:59:00Z\"}},\"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\":\";\"},\"types\":[\"MEMBERS_ONLY\",\"HANDBILL\"],\"excludeByAvailableProducts\":true,\"slotFilters\":{\"order\":\"GIVEN\",\"slots\":[{\"filterId\":\"aff0ee0f-f371-4b82-82c6-dc3b96f05c91\",\"limit\":5,\"distinctFilter\":{\"filters\":[{\"field\":\"brand\",\"maxNumItems\":2,\"levelRangeModifier\":1}],\"elastic\":true},\"fallback\":{\"filterId\":\"3f2c9a4e-8b1d-4e5f-9c6a-7d8e9f0a1b2c\"}}]},\"distinctFilter\":{\"filters\":[{\"field\":\"brand\",\"maxNumItems\":2,\"levelRangeModifier\":1}],\"elastic\":true}}]}")
              .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` 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.
            - Candidate promotions are gathered per handbill slot. For each slot, at most a configurable number of promotions (default 40,000) is read from the database, ordered by priority ascending (`1` = highest); any promotions beyond that limit are not considered for that slot. Promotions sharing the same priority have no guaranteed order between them, so when the limit falls within a group of equal priority it is not defined which of them are kept — assign distinct priorities to control this.
            - When using the AI engine, the total number of candidate promotions sent to the recommendation engine in a single request is capped by a configurable limit (default 45,000). If the combined candidates across all slots exceed this limit, each slot is reduced proportionally to the number of candidates it contributed, but never below a configurable per-slot floor (default 1,000), so the smallest slots are left intact.


        ---

        **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"
        "409":
          $ref: "#/components/responses/promotions-WaitingForProfileLockReleaseError"
      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` 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.
            - Candidate promotions are gathered per handbill slot. For each slot, at most a configurable number of promotions (default 40,000) is read from the database, ordered by priority ascending (`1` = highest); any promotions beyond that limit are not considered for that slot. Promotions sharing the same priority have no guaranteed order between them, so when the limit falls within a group of equal priority it is not defined which of them are kept — assign distinct priorities to control this.
            - When using the AI engine, the total number of candidate promotions sent to the recommendation engine in a single request is capped by a configurable limit (default 45,000). If the combined candidates across all slots exceed this limit, each slot is reduced proportionally to the number of candidates it contributed, but never below a configurable per-slot floor (default 1,000), so the smallest slots are left intact.


        ---

        **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"
        "409":
          $ref: "#/components/responses/promotions-WaitingForProfileLockReleaseError"
      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: |
        **Deprecated.** Use [/v2/promotion/get-for-client/{identifierType}/{identifierValue}/handbill/{handbillUuid}](#operation/getHandbillForClientV2_GET) instead.

        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` 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.
            - Candidate promotions are gathered per handbill slot. For each slot, at most a configurable number of promotions (default 40,000) is read from the database, ordered by priority ascending (`1` = highest); any promotions beyond that limit are not considered for that slot. Promotions sharing the same priority have no guaranteed order between them, so when the limit falls within a group of equal priority it is not defined which of them are kept — assign distinct priorities to control this.
            - When using the AI engine, the total number of candidate promotions sent to the recommendation engine in a single request is capped by a configurable limit (default 45,000). If the combined candidates across all slots exceed this limit, each slot is reduced proportionally to the number of candidates it contributed, but never below a configurable per-slot floor (default 1,000), so the smallest slots are left intact.


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_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"
      deprecated: true
      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` 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.
            - Candidate promotions are gathered per handbill slot. For each slot, at most a configurable number of promotions (default 40,000) is read from the database, ordered by priority ascending (`1` = highest); any promotions beyond that limit are not considered for that slot. Promotions sharing the same priority have no guaranteed order between them, so when the limit falls within a group of equal priority it is not defined which of them are kept — assign distinct priorities to control this.
            - When using the AI engine, the total number of candidate promotions sent to the recommendation engine in a single request is capped by a configurable limit (default 45,000). If the combined candidates across all slots exceed this limit, each slot is reduced proportionally to the number of candidates it contributed, but never below a configurable per-slot floor (default 1,000), so the smallest slots are left intact.


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_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"
        "409":
          $ref: "#/components/responses/promotions-WaitingForProfileLockReleaseError"
      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` 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.
            - Candidate promotions are gathered per handbill slot. For each slot, at most a configurable number of promotions (default 40,000) is read from the database, ordered by priority ascending (`1` = highest); any promotions beyond that limit are not considered for that slot. Promotions sharing the same priority have no guaranteed order between them, so when the limit falls within a group of equal priority it is not defined which of them are kept — assign distinct priorities to control this.
            - When using the AI engine, the total number of candidate promotions sent to the recommendation engine in a single request is capped by a configurable limit (default 45,000). If the combined candidates across all slots exceed this limit, each slot is reduced proportionally to the number of candidates it contributed, but never below a configurable per-slot floor (default 1,000), so the smallest slots are left intact.


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_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
      parameters:
        - in: query
          name: only
          required: false
          description: |
            Return only the settings property at this dotted path (e.g. `saleSettings.discountOrder.strategy`) instead of the whole settings object. Responds with 404 when the property is not defined.
          schema:
            type: string
            pattern: ^[A-Za-z0-9]+(\.[A-Za-z0-9]+)*$
          example: saleSettings.combineBasketDiscounts
        - in: query
          name: withDefaults
          required: false
          description: |
            When true, missing values are filled from the server-side defaults before the response is built. Combined with `only`, a property that has a configured default resolves even when the Workspace has not stored it; a property without a default still responds with 404.
          schema:
            type: boolean
            default: false
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $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"
        "404":
          $ref: "#/components/responses/promotions-404"
      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?only=saleSettings.combineBasketDiscounts&withDefaults=SOME_BOOLEAN_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            conn.request("GET", "/v4/promotions/settings?only=saleSettings.combineBasketDiscounts&withDefaults=SOME_BOOLEAN_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/v4/promotions/settings?only=saleSettings.combineBasketDiscounts&withDefaults=SOME_BOOLEAN_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": "/v4/promotions/settings?only=saleSettings.combineBasketDiscounts&withDefaults=SOME_BOOLEAN_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/settings');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'only' => 'saleSettings.combineBasketDiscounts',
              'withDefaults' => 'SOME_BOOLEAN_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/v4/promotions/settings?only=saleSettings.combineBasketDiscounts&withDefaults=SOME_BOOLEAN_VALUE")
              .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"}]},"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"}]},"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":60,"processSalePromotionActivationLockWaitTime":0,"lockPromotionRequestByIdentifier":true},"transferSettings":[{"expression":"2395fc33-f2f0-420c-8e7b-0ac63c3454de","recipient":{"segments":["string"]},"sender":{"segments":["string"]}}],"cashbackSettings":{"exchangeRate":0.0001,"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\"}]},\"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\"}]},\"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\":60,\"processSalePromotionActivationLockWaitTime\":0,\"lockPromotionRequestByIdentifier\":true},\"transferSettings\":[{\"expression\":\"2395fc33-f2f0-420c-8e7b-0ac63c3454de\",\"recipient\":{\"segments\":[\"string\"]},\"sender\":{\"segments\":[\"string\"]}}],\"cashbackSettings\":{\"exchangeRate\":0.0001,\"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"
                    }
                  ]
                },
                "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"
                    }
                  ]
                },
                "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": 60,
                "processSalePromotionActivationLockWaitTime": 0,
                "lockPromotionRequestByIdentifier": true
              },
              "transferSettings": [
                {
                  "expression": "2395fc33-f2f0-420c-8e7b-0ac63c3454de",
                  "recipient": {
                    "segments": [
                      "string"
                    ]
                  },
                  "sender": {
                    "segments": [
                      "string"
                    ]
                  }
                }
              ],
              "cashbackSettings": {
                "exchangeRate": 0.0001,
                "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'}]},
                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'}]},
                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: 60,
                processSalePromotionActivationLockWaitTime: 0,
                lockPromotionRequestByIdentifier: true
              },
              transferSettings: [
                {
                  expression: '2395fc33-f2f0-420c-8e7b-0ac63c3454de',
                  recipient: {segments: ['string']},
                  sender: {segments: ['string']}
                }
              ],
              cashbackSettings: {
                exchangeRate: 0.0001,
                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"}]},"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"}]},"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":60,"processSalePromotionActivationLockWaitTime":0,"lockPromotionRequestByIdentifier":true},"transferSettings":[{"expression":"2395fc33-f2f0-420c-8e7b-0ac63c3454de","recipient":{"segments":["string"]},"sender":{"segments":["string"]}}],"cashbackSettings":{"exchangeRate":0.0001,"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\"}]},\"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\"}]},\"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\":60,\"processSalePromotionActivationLockWaitTime\":0,\"lockPromotionRequestByIdentifier\":true},\"transferSettings\":[{\"expression\":\"2395fc33-f2f0-420c-8e7b-0ac63c3454de\",\"recipient\":{\"segments\":[\"string\"]},\"sender\":{\"segments\":[\"string\"]}}],\"cashbackSettings\":{\"exchangeRate\":0.0001,\"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,"positions":[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"],"scoringOverride":{"type":"ranking","weights":{"personalized":5,"pageVisitsPopularity":5,"transactionsPopularity":5,"pageVisits7DaysPopularity":5,"transactions7DaysPopularity":5,"revenueBoost":5,"conversionRateBoost":5}}}}}'
        - 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,\"positions\":[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\"],\"scoringOverride\":{\"type\":\"ranking\",\"weights\":{\"personalized\":5,\"pageVisitsPopularity\":5,\"transactionsPopularity\":5,\"pageVisits7DaysPopularity\":5,\"transactions7DaysPopularity\":5,\"revenueBoost\":5,\"conversionRateBoost\":5}}}}}"

            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,
                      "positions": [
                        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"
                  ],
                  "scoringOverride": {
                    "type": "ranking",
                    "weights": {
                      "personalized": 5,
                      "pageVisitsPopularity": 5,
                      "transactionsPopularity": 5,
                      "pageVisits7DaysPopularity": 5,
                      "transactions7DaysPopularity": 5,
                      "revenueBoost": 5,
                      "conversionRateBoost": 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/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,
                      positions: [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'],
                  scoringOverride: {
                    type: 'ranking',
                    weights: {
                      personalized: 5,
                      pageVisitsPopularity: 5,
                      transactionsPopularity: 5,
                      pageVisits7DaysPopularity: 5,
                      transactions7DaysPopularity: 5,
                      revenueBoost: 5,
                      conversionRateBoost: 5
                    }
                  }
                }
              }
            }));
            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,"positions":[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"],"scoringOverride":{"type":"ranking","weights":{"personalized":5,"pageVisitsPopularity":5,"transactionsPopularity":5,"pageVisits7DaysPopularity":5,"transactions7DaysPopularity":5,"revenueBoost":5,"conversionRateBoost":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/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,\"positions\":[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\"],\"scoringOverride\":{\"type\":\"ranking\",\"weights\":{\"personalized\":5,\"pageVisitsPopularity\":5,\"transactionsPopularity\":5,\"pageVisits7DaysPopularity\":5,\"transactions7DaysPopularity\":5,\"revenueBoost\":5,\"conversionRateBoost\":5}}}}}")
              .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"
        "409":
          description: The rule is inherited from the parent index and cannot be modified on the child index
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-Error"
        "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,"positions":[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"],"scoringOverride":{"type":"ranking","weights":{"personalized":5,"pageVisitsPopularity":5,"transactionsPopularity":5,"pageVisits7DaysPopularity":5,"transactions7DaysPopularity":5,"revenueBoost":5,"conversionRateBoost":5}}}}}'
        - 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,\"positions\":[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\"],\"scoringOverride\":{\"type\":\"ranking\",\"weights\":{\"personalized\":5,\"pageVisitsPopularity\":5,\"transactionsPopularity\":5,\"pageVisits7DaysPopularity\":5,\"transactions7DaysPopularity\":5,\"revenueBoost\":5,\"conversionRateBoost\":5}}}}}"

            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,
                      "positions": [
                        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"
                  ],
                  "scoringOverride": {
                    "type": "ranking",
                    "weights": {
                      "personalized": 5,
                      "pageVisitsPopularity": 5,
                      "transactionsPopularity": 5,
                      "pageVisits7DaysPopularity": 5,
                      "transactions7DaysPopularity": 5,
                      "revenueBoost": 5,
                      "conversionRateBoost": 5
                    }
                  }
                }
              }
            });

            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,
                      positions: [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'],
                  scoringOverride: {
                    type: 'ranking',
                    weights: {
                      personalized: 5,
                      pageVisitsPopularity: 5,
                      transactionsPopularity: 5,
                      pageVisits7DaysPopularity: 5,
                      transactions7DaysPopularity: 5,
                      revenueBoost: 5,
                      conversionRateBoost: 5
                    }
                  }
                }
              }
            }));
            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,"positions":[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"],"scoringOverride":{"type":"ranking","weights":{"personalized":5,"pageVisitsPopularity":5,"transactionsPopularity":5,"pageVisits7DaysPopularity":5,"transactions7DaysPopularity":5,"revenueBoost":5,"conversionRateBoost":5}}}}}');

            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,\"positions\":[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\"],\"scoringOverride\":{\"type\":\"ranking\",\"weights\":{\"personalized\":5,\"pageVisitsPopularity\":5,\"transactionsPopularity\":5,\"pageVisits7DaysPopularity\":5,\"transactions7DaysPopularity\":5,\"revenueBoost\":5,\"conversionRateBoost\":5}}}}}")
              .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
        "409":
          description: The rule is inherited from the parent index and cannot be modified on the child index
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-Error"
        "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
        "409":
          description: The rule is inherited from the parent index and cannot be modified on the child index
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-Error"
        "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
        "409":
          description: The rule is inherited from the parent index and cannot be modified on the child index
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-Error"
        "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
        "409":
          description: The rule is inherited from the parent index and cannot be modified on the child index
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-Error"
        "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
        "409":
          description: The rule is inherited from the parent index and cannot be modified on the child index
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-Error"
        "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
            minimum: 1
            default: 1
        - 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:
      deprecated: true
      summary: Create functional template
      operationId: create-functional-template
      tags:
        - Templates
      description: |
        <span style="color:red">This method is deprecated. It will be disabled on November 22, 2026.</span><br />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],"expirationDate":"2019-08-24T14:15:22Z"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"email\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"roles\":[0],\"expirationDate\":\"2019-08-24T14:15:22Z\"}"

            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
              ],
              "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("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],
              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/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],"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.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],\"expirationDate\":\"2019-08-24T14:15:22Z\"}")
              .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],"expirationDate":"2019-08-24T14:15:22Z"}]}'
        - 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],\"expirationDate\":\"2019-08-24T14:15:22Z\"}]}"

            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
                  ],
                  "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("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],
                  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/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],"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.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],\"expirationDate\":\"2019-08-24T14:15:22Z\"}]}")
              .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-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-isHistogramMetric:
      name: isHistogramMetric
      in: query
      description: Filter metrics by whether they are histogram metrics.
      required: false
      style: form
      explode: true
      schema:
        type: boolean
    analytics-isReportMetric:
      name: isReportMetric
      in: query
      description: Filter metrics by whether they are report metrics.
      required: false
      style: form
      explode: true
      schema:
        type: boolean
    analytics-AnalyticIdPathParam:
      name: AnalysisId
      in: path
      description: UUID of the analysis
      required: true
      style: simple
      explode: false
      schema:
        type: string
        format: uuid
    analytics-DirectoryIdPathParam:
      name: DirectoryId
      in: path
      description: ID of a directory
      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-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-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-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-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
    analytics-expressionType:
      name: type
      description: Filter by expression type. When omitted, expressions of all types are returned.
      in: query
      required: false
      schema:
        type: string
        enum:
          - CLIENT
          - EVENT
    analytics-actionName:
      name: actionName
      description: Filter event expressions by their action's event name. When omitted, expressions for all actions are returned.
      in: query
      required: false
      schema:
        type: string
    analytics-clientIdAsPathParameter:
      name: ProfileId
      in: path
      description: Unique identifier of a profile
      required: true
      style: simple
      explode: false
      schema:
        type: integer
        format: int64
    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-pathNamespace:
      name: Namespace
      in: path
      description: Namespace. Currently, only `profiles` is available.
      required: true
      style: simple
      explode: false
      schema:
        type: string
        enum:
          - profiles
    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-aggregateIdentifierAsPathParam:
      name: AggregateIdentifier
      in: path
      description: Aggregate identifier (UUID or numeric ID)
      required: true
      style: simple
      explode: false
      schema:
        type: string
    api-service-pathIdentifierValue-apiv4:
      name: identifierValue
      in: path
      description: |
        The value of the selected identifier. It must be URL-encoded.

        **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
      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

        **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
      required: true
      schema:
        type: integer
        format: int64
        example: 434428563
    api-service-pathClientCustomId-apiv4:
      name: customId
      in: path
      description: |
        The custom ID of the profile

        **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
      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])/`

        **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
      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: Number of items per page
      schema:
        type: number
        default: 10
    automation-brain-limit50:
      name: limit
      in: query
      description: Number of items per 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-timePeriod:
      name: timePeriod
      in: query
      description: Time period for statistics
      schema:
        type: string
        enum:
          - 24h
          - 7d
    automation-brain-ScheduleEventFilterStart:
      name: start
      in: query
      description: Start date
      schema:
        type: string
        format: date-time
    automation-brain-ScheduleEventFilterEnd:
      name: end
      in: query
      description: End date
      schema:
        type: string
        format: date-time
    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/catalogue/folder.
      schema:
        type: string
        format: uuid
    automation-brain-tagIds:
      name: tags
      in: query
      required: false
      schema:
        type: string
        description: List of comma separated tags
    automation-brain-blockTypes:
      name: blockTypes
      in: query
      required: false
      description: |
        Comma-separated list of block type names (e.g. "Email,EventTrigger").
        If provided, only workflows that contain a block of EVERY listed type
        are returned. The parameter may also be repeated.
      schema:
        type: string
    automation-brain-triggersOnEvent:
      name: triggersOnEvent
      in: query
      required: false
      description: |
        Event name that triggers or filters the workflow. If provided, only
        workflows containing an EventTrigger or EventFilter block configured
        for this event are returned. Matched case-insensitively.
      schema:
        type: string
        maxLength: 64
        pattern: ^[a-zA-Z0-9.\-_]+$
    automation-brain-generatesEvent:
      name: generatesEvent
      in: query
      required: false
      description: |
        Event name generated by the workflow. If provided, only workflows
        containing a SendEvent block, or a Webhook block whose responseAction
        is set to this event, are returned. Matched case-insensitively.
      schema:
        type: string
        maxLength: 64
        pattern: ^[a-zA-Z0-9.\-_]+$
    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
    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

          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
            - scoringOverride
    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-QueriesSummaryData:
      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-QueriesTopData:
      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-FiltersSummaryData:
      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-RulesSummaryData:
      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-QueriesSummaryMultipleIndicesData:
      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-QueriesSummaryData"
    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-RecoStatsByDateData:
      type: object
      description: Recommendation campaigns statistics payload.
      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-WrappedRecoStatsByDate:
      type: object
      description: |
        Response envelope for `GetCampaignsGlobalStats` and `GetCampaignStats`.
        The `data` field carries aggregated campaign statistics: an overall
        summary plus a per-day breakdown.
      required:
        - data
      properties:
        data:
          $ref: "#/components/schemas/ai-stats-RecoStatsByDateData"
    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-RecoStatsByCampaignData:
      type: object
      description: Recommendation campaigns stats payload.
      properties:
        summary:
          $ref: "#/components/schemas/ai-stats-RecoStatsSchema"
        byCampaign:
          type: array
          items:
            $ref: "#/components/schemas/ai-stats-RecoCampaignStatsSchema"
    ai-stats-WrappedRecoStatsByCampaign:
      type: object
      description: |
        Response envelope for `PostCampaignsStats`. The `data` field carries
        aggregated statistics: an overall summary plus a per-campaign
        breakdown for the requested campaign IDs.
      required:
        - data
      properties:
        data:
          $ref: "#/components/schemas/ai-stats-RecoStatsByCampaignData"
    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-RecoTopProductsStatsData:
      type: array
      description: Statistics of best-performing products in the campaign, ordered by the selected metric. Each item is one product's stats.
      items:
        $ref: "#/components/schemas/ai-stats-RecoTopProductsEntryStatsSchema"
    ai-stats-WrappedRecoTopProductsStats:
      type: object
      description: |
        Response envelope for `GetRecoTopProductsStats`. The `data` field
        carries an array of per-product statistics, one entry per product,
        ordered by the metric selected in the request.
      required:
        - data
      properties:
        data:
          $ref: "#/components/schemas/ai-stats-RecoTopProductsStatsData"
    ai-stats-WrappedQueriesSummary:
      type: object
      description: |
        Response envelope for `GetQueriesSummary`. The `data` field carries
        aggregate query statistics for one search index over the requested
        time window.
      required:
        - data
      properties:
        data:
          $ref: "#/components/schemas/ai-stats-QueriesSummaryData"
    ai-stats-WrappedQueriesTop:
      type: object
      description: |
        Response envelope for `GetQueriesTop`. The `data` field carries
        the ranked list of top queries (up to 1000) for one search index.
      required:
        - data
      properties:
        data:
          $ref: "#/components/schemas/ai-stats-QueriesTopData"
    ai-stats-WrappedFiltersSummary:
      type: object
      description: |
        Response envelope for `GetFiltersSummary`. The `data` field carries
        an array of filter usage statistics — one entry per filterable
        attribute on the index.
      required:
        - data
      properties:
        data:
          $ref: "#/components/schemas/ai-stats-FiltersSummaryData"
    ai-stats-WrappedRulesSummary:
      type: object
      description: |
        Response envelope for `GetRulesSummary`. The `data` field carries
        an array of query rule application statistics — one entry per rule.
      required:
        - data
      properties:
        data:
          $ref: "#/components/schemas/ai-stats-RulesSummaryData"
    ai-stats-WrappedQueriesSummaryMultipleIndices:
      type: object
      description: |
        Response envelope for `GetQueriesSummaryMultipleIndices`. The `data`
        field carries an array of per-index query stats summaries, one entry
        per requested search index.
      required:
        - data
      properties:
        data:
          $ref: "#/components/schemas/ai-stats-QueriesSummaryMultipleIndicesData"
    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-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:
          description: |
            The value of the variable. Can be one of: string, integer, boolean, string[], integer[], or a DateFilter object (with type ABSOLUTE/RELATIVE).
          example: example-string-value
      required:
        - name
        - value
    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.
      discriminator:
        propertyName: type
        mapping:
          ABSOLUTE: "#/components/schemas/analytics-AbsoluteDateFilter"
          RELATIVE: "#/components/schemas/analytics-RelativeDateFilter"
      oneOf:
        - $ref: "#/components/schemas/analytics-AbsoluteDateFilter"
        - $ref: "#/components/schemas/analytics-RelativeDateFilter"
    analytics-AbsoluteDateFilter:
      type: object
      title: AbsoluteDateFilter
      properties:
        type:
          title: AbsoluteDateFilterType
          x-class-name: AbsoluteDateFilterType
          x-interface-name-ts: AbsoluteDateFilterType
          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-RelativeDateFilter:
      type: object
      title: RelativeDateFilter
      properties:
        type:
          title: RelativeDateFilterType
          x-class-name: RelativeDateFilterType
          x-interface-name-ts: RelativeDateFilterType
          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-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"
      discriminator:
        propertyName: type
        mapping:
          DAILY: "#/components/schemas/analytics-CustomDailyDateFilter"
          WEEKLY: "#/components/schemas/analytics-CustomWeeklyDateFilter"
          MONTHLY: "#/components/schemas/analytics-CustomMonthlyDateFilter"
    analytics-CustomDailyDateFilter:
      type: object
      title: Daily
      x-class-name: CustomDailyFilter
      x-interface-name-ts: CustomDailyFilter
      properties:
        type:
          type: string
          x-class-name: CustomDailyFilterType
          x-interface-name-ts: CustomDailyFilterType
          enum:
            - DAILY
          description: Daily filters limit the data scope to a range of hours every day.
        nestingType:
          x-class-name: CustomDailyFilterNestingType
          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-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-CustomWeeklyDateFilter:
      type: object
      title: Weekly
      x-class-name: CustomWeeklyFilter
      x-interface-name-ts: CustomWeeklyFilter
      properties:
        type:
          type: string
          x-class-name: CustomWeeklyFilterType
          x-interface-name-ts: CustomWeeklyFilterType
          enum:
            - WEEKLY
          description: Weekly filters let you define separate rules for each day of the week.
        nestingType:
          x-class-name: CustomWeeklyFilterNestingType
          type: string
          enum:
            - IN_PLACE
        days:
          $ref: "#/components/schemas/analytics-WeeklyDays"
      required:
        - days
        - nestingType
        - type
    analytics-CustomMonthlyDateFilter:
      type: object
      title: Monthly
      x-class-name: CustomMonthlyFilterType
      x-interface-name-ts: CustomMonthlyFilterType
      properties:
        type:
          type: string
          x-class-name: CustomMonthlyFilterType
          x-interface-name-ts: CustomMonthlyFilterType
          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:
          x-class-name: CustomMonthlyFilterNestingType
          type: string
          enum:
            - IN_PLACE
        rules:
          $ref: "#/components/schemas/analytics-DateRule"
      required:
        - nestingType
        - rules
        - type
    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"
      discriminator:
        propertyName: type
        mapping:
          WEEK: "#/components/schemas/analytics-WeekDateRule"
          MONTH: "#/components/schemas/analytics-MonthDateRule"
    analytics-WeekDateRule:
      type: object
      title: Days of the week
      x-class-name: WeekDateRule
      x-interface-name-ts: WeekDateRule
      properties:
        type:
          type: string
          x-class-name: WeekDateRuleType
          x-interface-name-ts: WeekDateRuleType
          enum:
            - WEEK
          description: Weekly filters limit the scope to days in a week
        weeks:
          type: array
          description: Weeks of the month 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-MonthDateRule:
      type: object
      title: Days of the month
      x-class-name: MonthDateRule
      x-interface-name-ts: MonthDateRule
      properties:
        type:
          description: Rules for days of the month
          type: string
          x-class-name: MonthDateRuleType
          x-interface-name-ts: MonthDateRuleType
          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-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-WeeklyDays:
      type: array
      description: An array of rules for different days of the week.
      items:
        $ref: "#/components/schemas/analytics-DayOf"
    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-DayOfMode:
      type: string
      enum:
        - Range
        - Hour
    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-TimePeriod:
      type: string
      x-class-name: TimePeriod
      x-interface-name-ts: TimePeriod
      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-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-Predecessor:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/analytics-Id"
        type:
          type: string
          x-class-name: AnalyticPredecessorType
          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-Successor:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/analytics-Id"
        type:
          type: string
          x-class-name: SuccessorAnalyticType
          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-AnalyticId:
      type: string
      format: uuid
      description: |
        UUID of the analysis
      example: 5370bf3c-2dfa-4e89-98ff-07100cffee6c
    analytics-ClientId:
      type: number
      format: int64
      description: ID of the profile
    analytics-AnalysisOldId:
      type: integer
      format: int64
      minimum: 0
      description: Unique numeric ID of the analysis
    analytics-AnalyticName:
      type: string
      description: Name of the analysis
      example: Nice people who read the documentation
    analytics-MetricListItem:
      allOf:
        - type: object
          properties:
            action:
              $ref: "#/components/schemas/analytics-Action"
            actions:
              description: Event definitions
              type: array
              items:
                $ref: "#/components/schemas/analytics-Action"
            eventName:
              $ref: "#/components/schemas/analytics-ActionName"
            eventNames:
              description: Event definition names
              type: array
              items:
                $ref: "#/components/schemas/analytics-ActionName"
            actionId:
              $ref: "#/components/schemas/analytics-ActionId"
            actionIds:
              description: Event definition IDs
              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-Action:
      type: object
      description: The analyzed event
      nullable: true
      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-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 a 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-InlineAnalytic:
      description: An inline analytic definition carried alongside a request so it can be referenced by id without being persisted.
      oneOf:
        - $ref: "#/components/schemas/analytics-InlineExpression"
        - $ref: "#/components/schemas/analytics-InlineSegmentation"
        - $ref: "#/components/schemas/analytics-InlineAggregate"
        - $ref: "#/components/schemas/analytics-InlineRunningAggregate"
        - $ref: "#/components/schemas/analytics-InlineMetric"
      discriminator:
        propertyName: analyticType
        mapping:
          EXPRESSION: "#/components/schemas/analytics-InlineExpression"
          SEGMENTATION: "#/components/schemas/analytics-InlineSegmentation"
          AGGREGATE: "#/components/schemas/analytics-InlineAggregate"
          RUNNING_AGGREGATE: "#/components/schemas/analytics-InlineRunningAggregate"
          METRIC: "#/components/schemas/analytics-InlineMetric"
    analytics-InlineAnalytics:
      type: array
      description: Analyses added to the request. They can be referenced by their ID in filters and expressions same as other analyses, but are not saved in persistent storage.
      items:
        $ref: "#/components/schemas/analytics-InlineAnalytic"
    analytics-InlineExpression:
      type: object
      x-class-name: InlineExpression
      x-interface-name-ts: InlineExpression
      properties:
        id:
          $ref: "#/components/schemas/analytics-Id"
        analyticType:
          type: string
          enum:
            - EXPRESSION
        analysis:
          discriminator:
            propertyName: type
            mapping:
              EVENT: "#/components/schemas/analytics-EventExpressionEntity"
              CLIENT: "#/components/schemas/analytics-ClientExpressionEntity"
          oneOf:
            - $ref: "#/components/schemas/analytics-EventExpressionEntity"
            - $ref: "#/components/schemas/analytics-ClientExpressionEntity"
      required:
        - id
        - analyticType
        - analysis
    analytics-InlineSegmentation:
      type: object
      x-class-name: InlineSegmentation
      x-interface-name-ts: InlineSegmentation
      properties:
        id:
          $ref: "#/components/schemas/analytics-Id"
        analyticType:
          type: string
          enum:
            - SEGMENTATION
        analysis:
          $ref: "#/components/schemas/analytics-SegmentationAnalysis"
      required:
        - id
        - analyticType
        - analysis
    analytics-InlineAggregate:
      type: object
      x-class-name: InlineAggregate
      x-interface-name-ts: InlineAggregate
      properties:
        id:
          $ref: "#/components/schemas/analytics-Id"
        analyticType:
          type: string
          enum:
            - AGGREGATE
        analysis:
          $ref: "#/components/schemas/analytics-AggregateAnalysis"
      required:
        - id
        - analyticType
        - analysis
    analytics-InlineRunningAggregate:
      type: object
      x-class-name: InlineRunningAggregate
      x-interface-name-ts: InlineRunningAggregate
      properties:
        id:
          $ref: "#/components/schemas/analytics-Id"
        analyticType:
          type: string
          enum:
            - RUNNING_AGGREGATE
        analysis:
          $ref: "#/components/schemas/analytics-AggregateAnalysis"
      required:
        - id
        - analyticType
        - analysis
    analytics-InlineMetric:
      type: object
      x-class-name: InlineMetric
      x-interface-name-ts: InlineMetric
      properties:
        id:
          $ref: "#/components/schemas/analytics-Id"
        analyticType:
          type: string
          enum:
            - METRIC
        analysis:
          $ref: "#/components/schemas/analytics-MetricAnalysis"
      required:
        - id
        - analyticType
        - analysis
    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-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-Id:
      type: string
      format: uuid
      description: Unique ID of the resource
    analytics-Name:
      type: string
      description: Name 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
        icon:
          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-UpdatedAt:
      type: string
      format: date-time
      description: Last update time
    analytics-CreatedAt:
      type: string
      format: date-time
      description: Creation time
    analytics-Variables:
      type: array
      description: Dynamic keys used in this analysis
      items:
        $ref: "#/components/schemas/analytics-Variable"
    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-UsedAt:
      type: string
      format: date-time
      description: The date and time when the item was last used
      nullable: true
    analytics-BusinessProfileId:
      type: integer
      format: int32
      description: ID of the workspace (formerly business profile)
      example: 48
    analytics-PathNamespace:
      type: string
      enum:
        - profiles
    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
          nullable: true
      required:
        - links
        - limit
    analytics-Link:
      type: object
      properties:
        url:
          type: string
          description: URL of the page, used for navigation
        rel:
          type: string
          x-class-name: LinkRel
          description: The type of relation to the current page. `first` is always the first page.
          enum:
            - first
            - prev
            - next
      required:
        - rel
        - url
    analytics-MetricRequest:
      type: object
      properties:
        analysis:
          $ref: "#/components/schemas/analytics-MetricAnalysis"
        inlineAnalytics:
          $ref: "#/components/schemas/analytics-InlineAnalytics"
    analytics-MetricAnalysis:
      type: object
      description: Structure of the analytical query
      properties:
        id:
          $ref: "#/components/schemas/analytics-AnalyticId"
        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-MetricExpressionContent"
        isVisibleForClientProfile:
          $ref: "#/components/schemas/analytics-IsVisibleForClientProfile"
        allowNull:
          $ref: "#/components/schemas/analytics-AllowNull"
        grouping:
          description: Defines how the results are returned
          type: array
          items:
            $ref: "#/components/schemas/analytics-ReportMetricGrouping"
      required:
        - id
        - title
        - description
        - format
        - comparison
        - metricType
        - expression
        - isVisibleForClientProfile
    analytics-Description:
      type: string
      description: Description of the resource
    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
          x-class-name: Currency
          nullable: true
          title: CurrencyName
          enum:
            - EUR
            - USD
            - PLN
            - JPY
          description: The currency to use when `dataFormat` is `cash`
        dataFormat:
          type: string
          title: DateFormatName
          x-class-name: DateFormatName
          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-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-MetricType:
      type: string
      x-class-name: MetricType
      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:
      discriminator:
        propertyName: type
        mapping:
          OPERATOR: "#/components/schemas/analytics-OperatorMetricExpression"
          NUMBER: "#/components/schemas/analytics-NumberMetricExpression"
          EVENT: "#/components/schemas/analytics-EventMetricExpression"
          CLIENT: "#/components/schemas/analytics-ClientMetricExpression"
          METRIC: "#/components/schemas/analytics-NestedMetricExpression"
      oneOf:
        - $ref: "#/components/schemas/analytics-ClientMetricExpression"
        - $ref: "#/components/schemas/analytics-EventMetricExpression"
        - $ref: "#/components/schemas/analytics-NestedMetricExpression"
        - $ref: "#/components/schemas/analytics-NumberMetricExpression"
        - $ref: "#/components/schemas/analytics-OperatorMetricExpression"
    analytics-IsVisibleForClientProfile:
      type: boolean
      description: When set to `true`, information about this analysis is shown on a profile's card.
    analytics-ReportMetricGrouping:
      description: |
        The type and number of results to show. "TOP" shows the highest results. "LAST" shows the most recent results.
      discriminator:
        propertyName: type
        mapping:
          TOP: "#/components/schemas/analytics-TopReportMetricGrouping"
          LAST: "#/components/schemas/analytics-LastReportMetricGrouping"
      oneOf:
        - $ref: "#/components/schemas/analytics-TopReportMetricGrouping"
        - $ref: "#/components/schemas/analytics-LastReportMetricGrouping"
    analytics-TopReportMetricGrouping:
      type: object
      title: Top
      required:
        - type
        - top
      properties:
        type:
          title: TopReportMetricGroupingType
          x-class-name: TopReportMetricGroupingType
          description: Returns the top results
          type: string
          enum:
            - TOP
        top:
          type: integer
          description: The number of results to show in the report
    analytics-LastReportMetricGrouping:
      type: object
      title: Last
      description: This type shows the most recent occurrences
      required:
        - type
        - last
      properties:
        type:
          title: LastReportMetricGroupingType
          x-class-name: LastReportMetricGroupingType
          type: string
          description: This type shows the most recent occurrences
          enum:
            - LAST
        last:
          type: integer
          description: The number of results to show in the report
    analytics-MetricExpressionContent:
      example:
        type: VALUE
        value:
          type: NUMBER
          value: 100
      discriminator:
        propertyName: type
        mapping:
          FUNCTION: "#/components/schemas/analytics-MetricExpressionContentFunction"
          VALUE: "#/components/schemas/analytics-MetricExpressionContentValue"
      oneOf:
        - $ref: "#/components/schemas/analytics-MetricExpressionContentFunction"
        - $ref: "#/components/schemas/analytics-MetricExpressionContentValue"
    analytics-MetricExpressionContentValue:
      type: object
      description: An expression to calculate
      properties:
        type:
          $ref: "#/components/schemas/analytics-MetricExpressionContentValueType"
        title:
          $ref: "#/components/schemas/analytics-Name"
        value:
          $ref: "#/components/schemas/analytics-MetricExpression"
    analytics-MetricExpressionContentValueType:
      type: string
      enum:
        - VALUE
    analytics-MetricExpressionContentFunction:
      type: object
      description: A function to apply
      x-interface-name-ts: MetricExpressionContentFunction
      properties:
        type:
          $ref: "#/components/schemas/analytics-MetricExpressionContentFunctionType"
        function:
          x-class-name: MetricExpressionContentFunctionFunction
          description: |
            The function to apply. The number of required arguments depends on the function arity:
            - Nullary (0 args): NOW
            - Unary (1 arg via `arg`): 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
            - Binary (2 args via `arg1`, `arg2`): DIVIDE, IF_NULL, MAX, MIN, MOD, MULTIPLY, SUB, SUM, GREATER, GREATER_OR_EQUALS, LESS, LESS_OR_EQUAL, NOT_EQUAL, EQUALS, ADD_YEARS, CONCAT, REGEXP
            - Ternary (3 args via `arg1`, `arg2`, `arg3`): IF (arg1 - condition; arg2 - return if true; arg3 - return if false)
          type: string
          enum:
            - NOW
            - LN
            - ABS
            - CEIL
            - EXP
            - FLOOR
            - ROUND
            - BRACKET
            - TO_NUMBER
            - TO_STRING
            - DAY_OF_MONTH
            - DAY_OF_WEEK
            - DAY_OF_YEAR
            - HOUR
            - MONTH
            - WEEK
            - YEAR
            - TO_MONEY
            - TO_TIMESTAMP
            - TO_DATE
            - DIVIDE
            - IFNULL
            - MAX
            - MIN
            - MOD
            - MULTIPLY
            - SUB
            - SUM
            - GREATER
            - GREATER_OR_EQUALS
            - LESS
            - LESS_OR_EQUALS
            - NOT_EQUALS
            - EQUALS
            - ADD_YEARS
            - CONCAT
            - REGEXP
            - IF
        arg:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: MetricExpressionContent
        arg1:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: MetricExpressionContent
        arg2:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: MetricExpressionContent
        arg3:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: MetricExpressionContent
      required:
        - type
        - function
    analytics-MetricExpressionContentFunctionType:
      type: string
      enum:
        - FUNCTION
    analytics-MetricExpressionClientType:
      type: string
      enum:
        - CLIENT
    analytics-MetricExpressionEventType:
      type: string
      enum:
        - EVENT
    analytics-MetricExpressionOperatorType:
      type: string
      enum:
        - OPERATOR
    analytics-MetricExpressionMetricType:
      type: string
      enum:
        - METRIC
    analytics-MetricExpressionNumberType:
      type: string
      enum:
        - NUMBER
    analytics-ClientMetricExpression:
      type: object
      description: Definition of a metric expression
      x-class-name: ClientMetricExpression
      x-interface-name-ts: ClientMetricExpression
      properties:
        type:
          $ref: "#/components/schemas/analytics-MetricExpressionClientType"
        title:
          $ref: "#/components/schemas/analytics-Name"
        aggregation:
          $ref: "#/components/schemas/analytics-ClientMetricAggregation"
        filter:
          $ref: "#/components/schemas/analytics-ExpressionFilter"
        groupBy:
          $ref: "#/components/schemas/analytics-ClientValue"
      required:
        - type
        - title
        - aggregation
        - filter
    analytics-ClientMetricAggregation:
      type: object
      properties:
        type:
          $ref: "#/components/schemas/analytics-AggregateExpressionType"
        attribute:
          $ref: "#/components/schemas/analytics-ClientAttribute"
        level:
          $ref: "#/components/schemas/analytics-QuantileLevel"
      required:
        - type
        - attribute
    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-QuantileLevel:
      type: number
      format: double
      nullable: true
      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-AggregateSize:
      type: integer
      format: int32
      minimum: 0
      description: Only applies and is required when `type` is *_MULTI. Defines how many results to return.
    analytics-AggregateUnique:
      type: boolean
      description: Only applies when `type`` is *_MULTI. When set to `true``, only unique occurrences of an event parameter are included in the results.
    analytics-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.
    analytics-ClientAttributeParamType:
      type: string
      enum:
        - PARAM
    analytics-ClientAttributeTagType:
      type: string
      enum:
        - TAG
    analytics-ClientAttributeAggregateType:
      type: string
      enum:
        - AGGREGATE
    analytics-ClientAttributeSegmentationType:
      type: string
      enum:
        - SEGMENTATION
    analytics-ClientAttributeExpressionType:
      type: string
      enum:
        - EXPRESSION
    analytics-ClientAttributeSpecialType:
      type: string
      enum:
        - SPECIAL
    analytics-ClientAttributeEmptyType:
      type: string
      enum:
        - EMPTY
    analytics-ClientAttribute:
      description: A profile attribute to analyze
      discriminator:
        propertyName: type
        mapping:
          PARAM: "#/components/schemas/analytics-ClientParamAttribute"
          TAG: "#/components/schemas/analytics-ClientTagAttribute"
          AGGREGATE: "#/components/schemas/analytics-ClientAggregateAttribute"
          SEGMENTATION: "#/components/schemas/analytics-ClientSegmentationAttribute"
          EXPRESSION: "#/components/schemas/analytics-ClientExpressionAttribute"
          SPECIAL: "#/components/schemas/analytics-ClientSpecialAttribute"
          EMPTY: "#/components/schemas/analytics-ClientEmptyAttribute"
      oneOf:
        - $ref: "#/components/schemas/analytics-ClientParamAttribute"
        - $ref: "#/components/schemas/analytics-ClientTagAttribute"
        - $ref: "#/components/schemas/analytics-ClientAggregateAttribute"
        - $ref: "#/components/schemas/analytics-ClientSegmentationAttribute"
        - $ref: "#/components/schemas/analytics-ClientExpressionAttribute"
        - $ref: "#/components/schemas/analytics-ClientSpecialAttribute"
        - $ref: "#/components/schemas/analytics-ClientEmptyAttribute"
    analytics-ClientParamAttribute:
      type: object
      properties:
        type:
          $ref: "#/components/schemas/analytics-ClientAttributeParamType"
        param:
          description: Name of the parameter
          type: string
      required:
        - type
        - param
    analytics-ClientTagAttribute:
      type: object
      description: Reference to a tag
      properties:
        type:
          $ref: "#/components/schemas/analytics-ClientAttributeTagType"
        tag:
          description: Name of the tag
          type: string
      required:
        - type
        - tag
    analytics-ClientAggregateAttribute:
      type: object
      properties:
        type:
          $ref: "#/components/schemas/analytics-ClientAttributeAggregateType"
        uuid:
          $ref: "#/components/schemas/analytics-AnalyticId"
        id:
          $ref: "#/components/schemas/analytics-AnalyticId"
      required:
        - type
        - uuid
        - id
    analytics-ClientSegmentationAttribute:
      type: object
      description: Reference to a segmentation
      properties:
        type:
          $ref: "#/components/schemas/analytics-ClientAttributeSegmentationType"
        id:
          $ref: "#/components/schemas/analytics-AnalyticId"
      required:
        - type
        - id
    analytics-ClientExpressionAttribute:
      type: object
      description: Pointer to an expression
      properties:
        type:
          $ref: "#/components/schemas/analytics-ClientAttributeExpressionType"
        id:
          $ref: "#/components/schemas/analytics-AnalyticId"
      required:
        - type
        - id
    analytics-ClientSpecialAttribute:
      type: object
      description: Reference to a special parameter
      properties:
        type:
          $ref: "#/components/schemas/analytics-ClientAttributeSpecialType"
        special:
          type: string
          description: The name of the special parameter
      required:
        - type
        - special
    analytics-ClientEmptyAttribute:
      type: object
      properties:
        type:
          $ref: "#/components/schemas/analytics-ClientAttributeEmptyType"
      required:
        - type
    analytics-ExpressionFilter:
      type: object
      description: |
        This filter lets you limit the results to profiles that match it. For no filter, leave the object empty.  

        The `expression` object is only used by the Synerise Web Portal. If you're integrating an API, don't send this object or send it empty. If you send `expression` and `expressions`, `expressions` takes priority.
      properties:
        matching:
          $ref: "#/components/schemas/analytics-matching"
        expressions:
          type: array
          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.
          items:
            $ref: "#/components/schemas/analytics-FilterBox"
        expression:
          $ref: "#/components/schemas/analytics-FilterExpressionContent"
        groupBy:
          type: array
          items:
            $ref: "#/components/schemas/analytics-ClientValue"
      required:
        - matching
        - expressions
        - expression
    analytics-MetricView:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/analytics-AnalyticId"
        name:
          $ref: "#/components/schemas/analytics-Name"
        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"
        analysis:
          $ref: "#/components/schemas/analytics-MetricAnalysis"
        inlineAnalytics:
          $ref: "#/components/schemas/analytics-InlineAnalytics"
        isPredefinedAnalytic:
          $ref: "#/components/schemas/analytics-IsPredefinedAnalytic"
        isDynamicAnalytic:
          $ref: "#/components/schemas/analytics-IsDynamicAnalytic"
        isMetricHistogram:
          $ref: "#/components/schemas/analytics-IsMetricHistogram"
        isDeleted:
          $ref: "#/components/schemas/analytics-IsDeleted"
        namespace:
          $ref: "#/components/schemas/analytics-Namespace"
        directoryId:
          $ref: "#/components/schemas/analytics-DirectoryId"
      required:
        - id
        - name
        - author
        - modifier
        - updatedAt
        - createdAt
        - usedAt
        - analysis
        - isPredefinedAnalytic
        - isDynamicAnalytic
        - isMetricHistogram
        - isDeleted
        - namespace
        - directoryId
    analytics-ClientValue:
      discriminator:
        propertyName: type
        mapping:
          CONSTANT: "#/components/schemas/analytics-ConstantClientValue"
          CLIENT: "#/components/schemas/analytics-ClientAttributeValue"
          VARIABLE: "#/components/schemas/analytics-VariableClientValue"
      oneOf:
        - $ref: "#/components/schemas/analytics-ConstantClientValue"
        - $ref: "#/components/schemas/analytics-ClientAttributeValue"
        - $ref: "#/components/schemas/analytics-VariableClientValue"
    analytics-ConstantClientValue:
      type: object
      title: Static value
      description: Inserts a static value.
      properties:
        type:
          x-class-name: ConstantClientValueType
          type: string
          description: Inserts a static value.
          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
            - type: number
            - type: boolean
            - type: array
              items:
                type: string
      required:
        - type
        - constant
    analytics-ClientAttributeValue:
      type: object
      title: Profile attribute
      properties:
        type:
          x-class-name: ClientClientValueType
          type: string
          enum:
            - CLIENT
          description: Definition of a profile attribute
        attribute:
          $ref: "#/components/schemas/analytics-ClientAttribute"
      required:
        - type
        - attribute
    analytics-VariableClientValue:
      type: object
      title: Dynamic value
      properties:
        type:
          x-class-name: VariableClientValueType
          type: string
          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.
          enum:
            - VARIABLE
        name:
          type: string
          description: The name of the dynamic key
        defaultValue:
          description: The default value to use
          oneOf:
            - type: string
            - type: number
            - type: array
              items: {}
      required:
        - type
        - name
        - defaultValue
    analytics-EventMetricExpression:
      type: object
      x-class-name: EventMetricExpression
      description: An event metric
      x-interface-name-ts: EventMetricExpression
      properties:
        type:
          $ref: "#/components/schemas/analytics-MetricExpressionEventType"
        occurrenceType:
          $ref: "#/components/schemas/analytics-OccurrenceType"
        title:
          $ref: "#/components/schemas/analytics-Name"
        aggregation:
          $ref: "#/components/schemas/analytics-EventMetricAggregation"
        dateFilter:
          $ref: "#/components/schemas/analytics-DateFilter"
        action:
          $ref: "#/components/schemas/analytics-Action"
        filter:
          $ref: "#/components/schemas/analytics-ExpressionFilter"
        expressions:
          $ref: "#/components/schemas/analytics-EventExpressions"
        eventName:
          type: string
          description: Name (action) of the analyzed event
          nullable: true
      required:
        - type
        - occurrenceType
        - title
        - aggregation
        - dateFilter
        - action
        - filter
        - expressions
    analytics-EventMetricAggregation:
      type: object
      x-class-name: EventMetricAggregation
      x-interface-name-ts: EventMetricAggregation
      properties:
        type:
          $ref: "#/components/schemas/analytics-AggregateExpressionType"
        attribute:
          $ref: "#/components/schemas/analytics-EventAttribute"
        level:
          type: number
          nullable: true
      required:
        - type
        - attribute
    analytics-OccurrenceType:
      type: string
      x-class-name: OccurrenceType
      x-interface-name-ts: OccurrenceType
      enum:
        - FIRST
        - LAST
        - ALL
    analytics-NestedMetricExpression:
      type: object
      description: Reference to a metric
      x-class-name: NestedMetricExpression
      x-interface-name-ts: NestedMetricExpression
      properties:
        type:
          $ref: "#/components/schemas/analytics-MetricExpressionMetricType"
        id:
          $ref: "#/components/schemas/analytics-AnalyticId"
        title:
          type: string
          description: Can't be empty, can't contain whitespace only
      required:
        - type
        - id
        - title
    analytics-NumberMetricExpression:
      type: object
      x-class-name: NumberMetricExpression
      x-interface-name-ts: NumberMetricExpression
      properties:
        type:
          $ref: "#/components/schemas/analytics-MetricExpressionNumberType"
        value:
          description: The numeric value
          type: number
      required:
        - type
        - value
    analytics-OperatorMetricExpression:
      type: object
      x-class-name: OperatorMetricExpression
      x-interface-name-ts: OperatorMetricExpression
      properties:
        type:
          $ref: "#/components/schemas/analytics-MetricExpressionOperatorType"
        operator:
          $ref: "#/components/schemas/analytics-MetricOperator"
      required:
        - type
        - operator
    analytics-MetricOperator:
      type: string
      description: A mathematical/logical operator
      enum:
        - ADDITION_SIGN
        - SUBSTRACTION_SIGN
        - DIVISION_SIGN
        - MULTIPLICATION_SIGN
        - REMINDER
        - LEFT_BRACKET
        - RIGHT_BRACKET
    analytics-FilterBox:
      discriminator:
        propertyName: type
        mapping:
          ATTRIBUTE: "#/components/schemas/analytics-AttributeFilterBox"
          EXPRESSION: "#/components/schemas/analytics-ExpressionFilterBox"
          FUNNEL: "#/components/schemas/analytics-FunnelFilterBox"
          OPERATOR: "#/components/schemas/analytics-OperatorFilterBox"
      oneOf:
        - $ref: "#/components/schemas/analytics-AttributeFilterBox"
        - $ref: "#/components/schemas/analytics-ExpressionFilterBox"
        - $ref: "#/components/schemas/analytics-FunnelFilterBox"
        - $ref: "#/components/schemas/analytics-OperatorFilterBox"
    analytics-AttributeFilterBox:
      type: object
      properties:
        type:
          x-class-name: AttributeFilterBoxType
          type: string
          enum:
            - ATTRIBUTE
          description: Tests a profile attribute against a condition
        name:
          $ref: "#/components/schemas/analytics-Name"
        matching:
          $ref: "#/components/schemas/analytics-matching"
        attribute:
          $ref: "#/components/schemas/analytics-Attribute"
    analytics-Attribute:
      type: object
      description: The condition to test a profile attribute
      properties:
        expressions:
          $ref: "#/components/schemas/analytics-ClientExpressions"
      required:
        - expressions
    analytics-ClientExpression:
      type: object
      properties:
        constraint:
          $ref: "#/components/schemas/analytics-ClientConstraint"
        attribute:
          $ref: "#/components/schemas/analytics-ClientAttribute"
    analytics-ClientExpressions:
      type: array
      description: An array of conditions. All conditions must be met.
      items:
        $ref: "#/components/schemas/analytics-ClientExpression"
    analytics-ExpressionFilterBox:
      description: A condition to test
      type: object
      properties:
        type:
          description: A condition to test
          x-class-name: ExpressionFilterBoxType
          type: string
          enum:
            - EXPRESSION
        name:
          type: string
        matching:
          type: boolean
        expressions:
          $ref: "#/components/schemas/analytics-FilterBox"
      required:
        - type
        - expressions
    analytics-FunnelFilterBox:
      type: object
      properties:
        type:
          description: Tests against a funnel
          x-class-name: ExpressionFilterBoxType
          type: string
          enum:
            - FUNNEL
        name:
          $ref: "#/components/schemas/analytics-Name"
        matching:
          $ref: "#/components/schemas/analytics-matching"
        funnel:
          $ref: "#/components/schemas/analytics-Funnel"
      required:
        - type
        - funnel
    analytics-OperatorFilterBox:
      type: object
      properties:
        type:
          description: Logical operator between expressions
          x-class-name: OperatorFilterBoxType
          type: string
          enum:
            - OPERATOR
        name:
          $ref: "#/components/schemas/analytics-Name"
        logic:
          x-class-name: FilterBoxOperatorType
          type: string
          enum:
            - OR
            - AND
            - LEFT_BRACKET
            - RIGHT_BRACKET
      required:
        - type
        - name
        - logic
    analytics-Funnel:
      type: object
      description: Funnel conditions
      properties:
        title:
          type: string
          description: Title of the funnel.
        completedWithin:
          $ref: "#/components/schemas/analytics-CompletedWithin"
        dateFilter:
          $ref: "#/components/schemas/analytics-DateFilter"
        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"
        exact:
          type: boolean
          default: false
          description: |
            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.
      required:
        - title
        - steps
    analytics-FunnelStep:
      type: object
      properties:
        title:
          type: string
          description: The name of the step
        action:
          $ref: "#/components/schemas/analytics-Action"
        expressions:
          $ref: "#/components/schemas/analytics-EventExpressions"
      required:
        - action
        - title
        - expressions
    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:
        constraint:
          $ref: "#/components/schemas/analytics-EventConstraint"
        attribute:
          $ref: "#/components/schemas/analytics-EventAttribute"
      required:
        - constrain
        - attribute
    analytics-EventExpressions:
      type: array
      description: An array of conditions that the event must meet
      items:
        $ref: "#/components/schemas/analytics-EventExpression"
    analytics-EventAttribute:
      description: An event attribute to analyze
      discriminator:
        propertyName: type
        mapping:
          PARAM: "#/components/schemas/analytics-ParameterEventAttribute"
          RUNNING_AGGREGATE: "#/components/schemas/analytics-RunningAggregateEventAttribute"
          EXPRESSION: "#/components/schemas/analytics-ExpressionEventAttribute"
          SPECIAL: "#/components/schemas/analytics-SpecialEventAttribute"
          EMPTY: "#/components/schemas/analytics-EmptyEventAttribute"
      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-ParameterEventAttribute:
      type: object
      title: Event parameter
      properties:
        type:
          x-class-name: ParamEventAttributeType
          enum:
            - PARAM
          description: This `type` refers to parameters in an event.
        param:
          type: string
          description: Name of the parameter
      required:
        - type
    analytics-RunningAggregateEventAttribute:
      type: object
      title: Event aggregate
      properties:
        type:
          x-class-name: RunningAggregateEventAttributeType
          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:
          x-class-name: ExpressionEventAttributeType
          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:
          x-class-name: SpecialEventAttributeType
          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:
          x-class-name: EmptyEventAttributeType
          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**.
      discriminator:
        propertyName: type
        mapping:
          BOOL: "#/components/schemas/analytics-BoolConstraintEventConstraint"
          STRING_ZERO: "#/components/schemas/analytics-StringZeroConstraintEventConstraint"
          STRING_ONE: "#/components/schemas/analytics-StringOneConstraintEventConstraint"
          NUMBER_ONE: "#/components/schemas/analytics-NumberOneConstraintEventConstraint"
          NUMBER_TWO: "#/components/schemas/analytics-NumberTwoConstraintEventConstraint"
          STRING_ARRAY: "#/components/schemas/analytics-StringArrayConstraintEventConstraint"
          ARRAY_STRING_ONE_DEPRECATED: "#/components/schemas/analytics-StringArrayOneConstraintEventConstraint"
          "NULL": "#/components/schemas/analytics-NullConstraintEventConstraint"
          DATE_ZERO: "#/components/schemas/analytics-DateZeroConstraintEventConstraint"
          DATE_ONE: "#/components/schemas/analytics-DateOneConstraintEventConstraint"
          DATE_TWO: "#/components/schemas/analytics-DateTwoConstraintEventConstraint"
          DATE_FILTER: "#/components/schemas/analytics-DateFilterConstraintEventConstraint"
      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-DateFilterConstraintEventConstraint"
    analytics-BoolConstraintEventConstraint:
      type: object
      title: Boolean
      properties:
        type:
          x-class-name: BoolConstraintType
          type: string
          enum:
            - BOOL
          description: Tests a boolean value
        logic:
          x-class-name: BoolConstraintLogic
          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
      description: This type is used to check if a string is empty.
      properties:
        type:
          title: String zero
          x-class-name: StringZeroConstraintType
          type: string
          description: This type is used to check if a string is empty.
          enum:
            - STRING_ZERO
        logic:
          x-class-name: StringZeroConstraintLogic
          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:
          x-class-name: StringOneConstraintType
          type: string
          enum:
            - STRING_ONE
          description: This type is used to test values that are a single string.
        logic:
          x-class-name: StringOneConstraintLogic
          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:
          x-class-name: NumberOneConstraintType
          type: string
          enum:
            - NUMBER_ONE
          description: This type is used to test values that are a single number
        logic:
          x-class-name: NumberOneConstraintLogic
          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:
          x-class-name: NumberTwoConstraintType
          type: string
          enum:
            - NUMBER_TWO
          description: Checks if the `attribute` is between two numbers, defined in `value1` and `value2`.
        logic:
          description: Checks if the attribute is between two numbers.
          x-class-name: NumberTwoConstraintLogic
          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:
          x-class-name: StringArrayConstraintType
          type: string
          enum:
            - STRING_ARRAY
          description: This type is used to check if a string exists in an array defined in `value`
        logic:
          type: string
          x-class-name: StringArrayConstraintLogic
          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:
          x-class-name: ArrayStringOneConstraintType
          type: string
          enum:
            - ARRAY_STRING_ONE_DEPRECATED
          description: "`value` should be an array"
        logic:
          x-class-name: ArrayStringOneConstraintLogic
          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:
          x-class-name: NullConstraintType
          description: This type is used to check if a value is null
          type: string
          enum:
            - "NULL"
        logic:
          x-class-name: NullConstraintLogic
          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:
          x-class-name: DateZeroConstraintType
          type: string
          enum:
            - DATE_ZERO
          description: Compare a date from `attribute` to the current date
        logic:
          x-class-name: LogicZeroConstraintLogic
          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:
      description: This type is used to check `attribute` against a date.
      type: object
      title: Date
      properties:
        type:
          x-class-name: DateOneConstraintType
          type: string
          description: This type is used to check `attribute` against a date.
          enum:
            - DATE_ONE
        logic:
          x-class-name: DateOneConstraintLogic
          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:
      description: This type is used to check if a date is between two other dates.
      type: object
      title: Date range
      properties:
        type:
          x-class-name: DateTwoConstraintType
          type: string
          description: This type is used to check if a date is between two other dates.
          enum:
            - DATE_TWO
        logic:
          x-class-name: DateTwoConstraintLogic
          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-DateFilterConstraintEventConstraint:
      description: This type is used to check if a date matches a date filter.
      type: object
      title: Date filter
      properties:
        type:
          x-class-name: DateFilterConstraintType
          type: string
          description: This type is used to check if a date matches a date filter.
          enum:
            - DATE_FILTER
        logic:
          x-class-name: DateFilterConstraintLogic
          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
    analytics-EventValue:
      description: The value to test `attribute` against.
      discriminator:
        propertyName: type
        mapping:
          CONSTANT: "#/components/schemas/analytics-ConstantValue"
          EVENT: "#/components/schemas/analytics-EventParameter"
          CLIENT: "#/components/schemas/analytics-ClientParameter"
          VARIABLE: "#/components/schemas/analytics-VariableValue"
      oneOf:
        - $ref: "#/components/schemas/analytics-ConstantValue"
        - $ref: "#/components/schemas/analytics-EventParameter"
        - $ref: "#/components/schemas/analytics-ClientParameter"
        - $ref: "#/components/schemas/analytics-VariableValue"
    analytics-ConstantValue:
      type: object
      title: Static value
      description: Inserts a static value.
      properties:
        type:
          x-class-name: ConstantValueType
          type: string
          description: Inserts a static value.
          enum:
            - CONSTANT
        constant:
          $ref: "#/components/schemas/analytics-ConstantValueConstant"
      required:
        - type
        - constant
    analytics-ConstantValueConstant:
      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
    analytics-EventParameter:
      type: object
      title: Event parameter
      description: Inserts an event parameter value
      properties:
        type:
          x-class-name: EventParameterType
          description: Inserts an event parameter value
          type: string
          enum:
            - EVENT
        attribute:
          $ref: "#/components/schemas/analytics-EventAttribute"
      required:
        - type
        - attribute
    analytics-ClientParameter:
      type: object
      title: Profile attribute
      properties:
        type:
          description: References a profile attribute, including analyses.
          x-class-name: ClientEventValueType
          type: string
          enum:
            - CLIENT
        attribute:
          $ref: "#/components/schemas/analytics-ClientAttribute"
      required:
        - type
        - attribute
    analytics-VariableValue:
      type: object
      title: Dynamic value
      properties:
        type:
          x-class-name: VariableValueType
          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-FilterExpressionContent:
      deprecated: true
      example:
        type: EMPTY
      discriminator:
        propertyName: type
        mapping:
          FUNCTION: "#/components/schemas/analytics-FilterExpressionFunction"
          ATTRIBUTE: "#/components/schemas/analytics-AttributeFilterExpressionContent"
          FUNNEL: "#/components/schemas/analytics-FunnelFilterExpressionContent"
          EXPRESSION: "#/components/schemas/analytics-ExpressionFilterExpressionContent"
          EMPTY: "#/components/schemas/analytics-EmptyFilterExpressionContent"
      oneOf:
        - $ref: "#/components/schemas/analytics-FilterExpressionFunction"
        - $ref: "#/components/schemas/analytics-AttributeFilterExpressionContent"
        - $ref: "#/components/schemas/analytics-FunnelFilterExpressionContent"
        - $ref: "#/components/schemas/analytics-ExpressionFilterExpressionContent"
        - $ref: "#/components/schemas/analytics-EmptyFilterExpressionContent"
    analytics-FilterExpressionFunction:
      type: object
      description: Logical operators
      properties:
        type:
          description: Logical operators
          x-class-name: FunctionFilterExpressionContentType
          type: string
          enum:
            - FUNCTION
        function:
          x-class-name: FilterFunctionType
          type: string
          enum:
            - AND
            - OR
            - BRACKET
        arg:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: FilterExpressionContent
        arg1:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: FilterExpressionContent
        arg2:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: FilterExpressionContent
        name:
          type: string
      required:
        - type
        - function
    analytics-AttributeFilterExpressionContent:
      type: object
      title: Profile attribute
      properties:
        type:
          x-class-name: AttributeFilterExpressionContentType
          type: string
          enum:
            - ATTRIBUTE
          description: Tests a profile attribute against a condition
        matching:
          $ref: "#/components/schemas/analytics-matching"
        attribute:
          $ref: "#/components/schemas/analytics-Attribute"
    analytics-FunnelFilterExpressionContent:
      type: object
      title: Funnel
      properties:
        type:
          description: Tests against a funnel
          x-class-name: FunnelFilterExpressionContentType
          type: string
          enum:
            - FUNNEL
        matching:
          $ref: "#/components/schemas/analytics-matching"
        funnel:
          $ref: "#/components/schemas/analytics-Funnel"
    analytics-ExpressionFilterExpressionContent:
      description: Definition of a profile filter
      type: object
      properties:
        type:
          x-class-name: ExpressionFilterExpressionContentType
          type: string
          enum:
            - EXPRESSION
        name:
          type: string
        matching:
          $ref: "#/components/schemas/analytics-matching"
        expressions:
          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.
          type: array
          items:
            $ref: "#/components/schemas/analytics-FilterBox"
        expression:
          $ref: "#/components/schemas/analytics-FilterExpressionContent"
      required:
        - type
        - expressions
    analytics-EmptyFilterExpressionContent:
      description: An empty value
      type: object
      properties:
        type:
          description: An empty value
          x-class-name: EmptyFilterExpressionContentType
          type: string
          enum:
            - EMPTY
        name:
          type: string
      required:
        - type
    analytics-ClientConstraint:
      discriminator:
        propertyName: type
        mapping:
          BOOL: "#/components/schemas/analytics-BoolConstraintClientConstraint"
          STRING_ZERO: "#/components/schemas/analytics-StringZeroConstraintClientConstraint"
          STRING_ONE: "#/components/schemas/analytics-StringOneConstraintClientConstraint"
          NUMBER_ONE: "#/components/schemas/analytics-NumberOneConstraintClientConstraint"
          NUMBER_TWO: "#/components/schemas/analytics-NumberTwoConstraintClientConstraint"
          STRING_ARRAY: "#/components/schemas/analytics-StringArrayConstraintClientConstraint"
          ARRAY_STRING_ONE_DEPRECATED: "#/components/schemas/analytics-StringArrayOneConstraintClientConstraint"
          "NULL": "#/components/schemas/analytics-NullConstraintClientConstraint"
          DATE_ZERO: "#/components/schemas/analytics-DateZeroConstraintClientConstraint"
          DATE_ONE: "#/components/schemas/analytics-DateOneConstraintClientConstraint"
          DATE_TWO: "#/components/schemas/analytics-DateTwoConstraintClientConstraint"
          DATE_FILTER: "#/components/schemas/analytics-DateFilterConstraintClientConstraint"
      oneOf:
        - $ref: "#/components/schemas/analytics-BoolConstraintClientConstraint"
        - $ref: "#/components/schemas/analytics-StringZeroConstraintClientConstraint"
        - $ref: "#/components/schemas/analytics-StringOneConstraintClientConstraint"
        - $ref: "#/components/schemas/analytics-NumberOneConstraintClientConstraint"
        - $ref: "#/components/schemas/analytics-NumberTwoConstraintClientConstraint"
        - $ref: "#/components/schemas/analytics-StringArrayConstraintClientConstraint"
        - $ref: "#/components/schemas/analytics-StringArrayOneConstraintClientConstraint"
        - $ref: "#/components/schemas/analytics-NullConstraintClientConstraint"
        - $ref: "#/components/schemas/analytics-DateZeroConstraintClientConstraint"
        - $ref: "#/components/schemas/analytics-DateOneConstraintClientConstraint"
        - $ref: "#/components/schemas/analytics-DateTwoConstraintClientConstraint"
        - $ref: "#/components/schemas/analytics-DateFilterConstraintClientConstraint"
    analytics-BoolConstraintClientConstraint:
      type: object
      title: Boolean
      properties:
        type:
          x-class-name: BoolClientConstraintType
          type: string
          enum:
            - BOOL
          description: Tests a boolean value
        logic:
          description: Boolean logic. Empty (zero-length) strings, `0`, and `"0"` are considered false. Null values are false.
          x-class-name: BoolClientConstraintLogic
          type: string
          enum:
            - IS_TRUE
            - IS_FALSE
      required:
        - type
        - logic
    analytics-StringZeroConstraintClientConstraint:
      type: object
      title: Check empty
      description: This type is used to check if a string is empty.
      properties:
        type:
          x-class-name: StringZeroClientConstraintType
          type: string
          description: This type is used to check if a string is empty.
          enum:
            - STRING_ZERO
        logic:
          description: Checks if a string is empty (zero-length). Null value is considered empty. A string of whitespace characters is NOT empty.
          x-class-name: StringZeroClientConstraintLogic
          type: string
          enum:
            - IS_EMPTY
            - IS_NOT_EMPTY
      required:
        - type
        - logic
    analytics-StringOneConstraintClientConstraint:
      type: object
      title: String
      properties:
        type:
          description: This type is used to test values that are a single string.
          x-class-name: StringOneClientConstraintType
          type: string
          enum:
            - STRING_ONE
        logic:
          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".
          x-class-name: StringOneClientConstraintLogic
          type: string
          enum:
            - CONTAIN
            - NOT_CONTAIN
            - EQUAL
            - NOT_EQUAL
            - STARTS_WITH
            - REGEXP
            - ENDS_WITH
        value:
          $ref: "#/components/schemas/analytics-ClientValue"
      required:
        - type
        - logic
        - value
    analytics-NumberOneConstraintClientConstraint:
      type: object
      title: Number
      properties:
        type:
          description: This type is used to test values that are a single number
          x-class-name: NumberOneClientConstraintType
          type: string
          enum:
            - NUMBER_ONE
        logic:
          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.
          x-class-name: NumberOneClientConstraintLogic
          type: string
          enum:
            - EQUAL
            - NOT_EQUAL
            - LESS
            - MORE
            - MORE_OR_EQUAL
            - LESS_OR_EQUAL
        value:
          $ref: "#/components/schemas/analytics-ClientValue"
      required:
        - type
        - logic
        - value
    analytics-NumberTwoConstraintClientConstraint:
      type: object
      title: Two numbers
      properties:
        type:
          description: Checks if the `attribute` is between two numbers, defined in `value1` and `value2`.
          x-class-name: NumberTwoClientConstraintType
          type: string
          enum:
            - NUMBER_TWO
        logic:
          description: Checks if the attribute is between two numbers.
          x-class-name: NumberTwoClientConstraintLogic
          type: string
          enum:
            - BETWEEN
        value1:
          $ref: "#/components/schemas/analytics-ClientValue"
        value2:
          $ref: "#/components/schemas/analytics-ClientValue"
      required:
        - type
        - logic
        - value1
        - value2
    analytics-StringArrayConstraintClientConstraint:
      type: object
      title: Check if string in array
      properties:
        type:
          description: This type is used to check if a string exists in an array defined in `value`
          x-class-name: StringArrayClientConstraintType
          type: string
          enum:
            - STRING_ARRAY
        logic:
          description: You can check if the value from `attribute` is in the array defined in `value`
          x-class-name: StringArrayClientConstraintLogic
          type: string
          enum:
            - IN
            - NOT_IN
        value:
          $ref: "#/components/schemas/analytics-ClientValue"
      required:
        - type
        - logic
        - value
    analytics-StringArrayOneConstraintClientConstraint:
      type: object
      title: Other string array tests
      properties:
        type:
          description: "`value` should be an array"
          x-class-name: ArrayStringOneClientConstraintType
          type: string
          enum:
            - ARRAY_STRING_ONE_DEPRECATED
        logic:
          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` "
          x-class-name: ArrayStringOneClientConstraintLogic
          type: string
          enum:
            - CONTAIN
            - NOT_CONTAIN
            - EQUAL
            - NOT_EQUAL
            - STARTS_WITH
            - REGEXP
            - ENDS_WITH
        value:
          $ref: "#/components/schemas/analytics-ClientValue"
      required:
        - type
        - logic
        - value
    analytics-NullConstraintClientConstraint:
      type: object
      title: Check if null
      properties:
        type:
          x-class-name: NullClientConstraintType
          type: string
          enum:
            - "NULL"
          description: This type is used to check if a value is null
        logic:
          description: Checks if the attribute is or isn't null. Empty strings, `0`, and negative numbers are NOT null. String `"null"` is NOT null.
          x-class-name: NullClientConstraintLogic
          type: string
          enum:
            - IS_NULL
            - IS_NOT_NULL
      required:
        - type
        - logic
    analytics-DateZeroConstraintClientConstraint:
      type: object
      title: Current date
      properties:
        type:
          description: Compare a date from `attribute` to the current date
          x-class-name: DateZeroClientConstraintType
          type: string
          enum:
            - DATE_ZERO
        logic:
          description: Logic to apply to the date from `attribute`
          x-class-name: DateZeroClientConstraintLogic
          type: string
          enum:
            - MATCHES_CURRENT_DAY
            - MATCHES_CURRENT_HOUR
            - MATCHES_CURRENT_MONTH
            - MATCHES_CURRENT_YEAR
      required:
        - type
        - logic
    analytics-DateOneConstraintClientConstraint:
      description: This type is used to check `attribute` against a date.
      type: object
      title: Date
      properties:
        type:
          x-class-name: DateOneClientConstraintType
          type: string
          description: This type is used to check `attribute` against a date.
          enum:
            - DATE_ONE
        logic:
          description: Checks how the date from `attribute` compares to the one in `value`. For example, MORE returns true if `attribute` is the later date.
          x-class-name: DateOneClientConstraintLogic
          type: string
          enum:
            - LESS
            - MORE
            - LESS_OR_EQUAL
            - MORE_OR_EQUAL
        value:
          $ref: "#/components/schemas/analytics-ClientValue"
      required:
        - type
        - logic
        - value
    analytics-DateTwoConstraintClientConstraint:
      description: This type is used to check if a date is between two other dates.
      type: object
      title: Date range
      properties:
        type:
          x-class-name: DateTwoClientConstraintType
          type: string
          description: This type is used to check if a date is between two other dates.
          enum:
            - DATE_TWO
        logic:
          description: Checks if the date from `attribute` is between the dates from `value1` and `value2`.
          x-class-name: DateTwoClientConstraintLogic
          type: string
          enum:
            - BETWEEN
        value1:
          $ref: "#/components/schemas/analytics-ClientValue"
        value2:
          $ref: "#/components/schemas/analytics-ClientValue"
      required:
        - type
        - logic
        - value1
        - value2
    analytics-DateFilterConstraintClientConstraint:
      type: object
      title: Date filter
      description: This type is used to check if a date matches a date filter.
      properties:
        type:
          x-class-name: DateFilterClientConstraintType
          type: string
          description: This type is used to check if a date matches a date filter.
          enum:
            - DATE_FILTER
        logic:
          description: Checks if the date from `attribute` matches a date filter.
          x-class-name: DateFilterClientConstraintLogic
          type: string
          enum:
            - DATE_FILTER
        value:
          $ref: "#/components/schemas/analytics-DateFilter"
      required:
        - type
        - logic
        - value
    analytics-ReportPreviewRequest:
      type: object
      properties:
        allowNull:
          $ref: "#/components/schemas/analytics-AllowNull"
        analysis:
          $ref: "#/components/schemas/analytics-ReportAnalysis"
        inlineAnalytics:
          $ref: "#/components/schemas/analytics-InlineAnalytics"
      required:
        - analysis
    analytics-AllowNull:
      type: boolean
      default: true
      description: When `true`, null values can be included in the results.
    analytics-ReportAnalysis:
      type: object
      description: Structure of the report analysis
      properties:
        id:
          $ref: "#/components/schemas/analytics-AnalyticId"
        title:
          $ref: "#/components/schemas/analytics-Name"
        description:
          $ref: "#/components/schemas/analytics-Description"
        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"
        filter:
          $ref: "#/components/schemas/analytics-ExpressionFilter"
      required:
        - title
        - description
        - reportMetrics
        - filter
    analytics-OverrideQueryRequest:
      type: object
      description: Override details
      properties:
        title:
          $ref: "#/components/schemas/analytics-Name"
        dateFilter:
          $ref: "#/components/schemas/analytics-DateFilter"
        aggregateDataBy:
          $ref: "#/components/schemas/analytics-Period"
        filter:
          $ref: "#/components/schemas/analytics-ExpressionFilter"
        variables:
          type: array
          description: A list of variable values to use in this calculation
          items:
            $ref: "#/components/schemas/analytics-Variable"
        overrideNested:
          description: When `true`, the date filter overrides date filters in analyses nested in the conditions.
          type: boolean
          default: false
    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-ReportCalculationData:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/analytics-Id"
        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-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-ReportMetricGroup:
      description: |
        The type and source of data shown in the report.
        When type is CLIENT, attribute refers to a ProfileAttribute.
        When type is EVENT, attribute refers to an EventAttribute.
      discriminator:
        propertyName: type
        mapping:
          CLIENT: "#/components/schemas/analytics-ClientReportMetricGroup"
          EVENT: "#/components/schemas/analytics-EventReportMetricGroup"
      oneOf:
        - $ref: "#/components/schemas/analytics-ClientReportMetricGroup"
        - $ref: "#/components/schemas/analytics-EventReportMetricGroup"
    analytics-ClientReportMetricGroup:
      type: object
      title: ClientReportMetricGroup
      required:
        - type
        - attribute
      properties:
        title:
          type: string
          description: The name of the dimension
        format:
          $ref: "#/components/schemas/analytics-MetricFormat"
        type:
          title: ClientReportMetricGroupType
          x-class-name: ClientReportMetricGroupType
          type: string
          enum:
            - CLIENT
          description: Defines the source type of the data shown in the report.
        attribute:
          $ref: "#/components/schemas/analytics-ClientAttribute"
    analytics-EventReportMetricGroup:
      type: object
      title: EventReportMetricGroup
      required:
        - type
        - attribute
      properties:
        title:
          type: string
          description: The name of the dimension
        format:
          $ref: "#/components/schemas/analytics-MetricFormat"
        type:
          title: EventReportMetricGroupType
          x-class-name: EventReportMetricGroupType
          type: string
          enum:
            - EVENT
          description: Defines the source type of the data shown in the report.
        attribute:
          $ref: "#/components/schemas/analytics-EventAttribute"
    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-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-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-DirectoryRenameRequest:
      type: object
      properties:
        newName:
          type: string
          description: New name for the directory
      required:
        - newName
    analytics-ObjectType:
      type: string
      enum:
        - EXPRESSION
        - AGGREGATE
        - SEGMENTATION
        - METRIC
        - FUNNEL
        - SANKEY
        - TREND
        - HISTOGRAM
        - REPORT
        - ANALYTICS_QUERY
        - ANALYTICS_DASHBOARD
    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-DirectoryCreateRequest:
      type: object
      properties:
        name:
          $ref: "#/components/schemas/analytics-Name"
        analyticType:
          $ref: "#/components/schemas/analytics-ObjectType"
      required:
        - analyticType
        - name
    analytics-SegmentationPreviewRequest:
      type: object
      properties:
        analysis:
          $ref: "#/components/schemas/analytics-SegmentationAnalysis"
        allowNull:
          $ref: "#/components/schemas/analytics-AllowNull"
        inlineAnalytics:
          $ref: "#/components/schemas/analytics-InlineAnalytics"
      required:
        - analysis
    analytics-SegmentationAnalysis:
      type: object
      description: Definition of the segmentation.
      properties:
        id:
          $ref: "#/components/schemas/analytics-AnalyticId"
        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:
        - title
        - segments
    analytics-SegmentationView:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/analytics-AnalyticId"
        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"
        analysis:
          $ref: "#/components/schemas/analytics-SegmentationAnalysis"
        inlineAnalytics:
          $ref: "#/components/schemas/analytics-InlineAnalytics"
        isPredefinedAnalytic:
          $ref: "#/components/schemas/analytics-IsPredefinedAnalytic"
        isVisibleForClientProfile:
          $ref: "#/components/schemas/analytics-IsVisibleForClientProfile"
        isDynamicAnalytic:
          $ref: "#/components/schemas/analytics-IsDynamicAnalytic"
        isDeleted:
          $ref: "#/components/schemas/analytics-IsDeleted"
        namespace:
          $ref: "#/components/schemas/analytics-Namespace"
        directoryId:
          $ref: "#/components/schemas/analytics-DirectoryId"
        sharing:
          $ref: "#/components/schemas/analytics-SharingData"
      required:
        - id
        - businessProfileId
        - name
        - description
        - author
        - modifier
        - updatedAt
        - createdAt
        - usedAt
        - analysis
        - isPredefinedAnalytic
        - isVisibleForClientProfile
        - isDynamicAnalytic
        - isDeleted
        - namespace
        - directoryId
        - sharing
    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-OneSegment:
      type: object
      x-class-name: Segment
      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-ExpressionFilter"
      required:
        - title
        - description
        - filter
    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-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-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-IdentifierValue:
      type: string
      description: Value of the selected identifier. Note that IDs must also be sent as strings.
    analytics-BatchCalculationResult:
      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-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-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-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-ExpressionListItem:
      allOf:
        - type: object
          properties:
            action:
              $ref: "#/components/schemas/analytics-Action"
            type:
              $ref: "#/components/schemas/analytics-ExpressionType"
          required:
            - action
            - type
        - $ref: "#/components/schemas/analytics-ListAnalyticsItemCommon"
    analytics-ExpressionView:
      type: object
      x-interface-name-ts: ExpressionView
      properties:
        analysis:
          $ref: "#/components/schemas/analytics-ExpressionEntity"
        inlineAnalytics:
          $ref: "#/components/schemas/analytics-InlineAnalytics"
        analyticVersion:
          $ref: "#/components/schemas/analytics-AnalyticVersion"
        isVisibleForClientProfile:
          $ref: "#/components/schemas/analytics-IsVisibleForClientProfile"
        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:
        - analysis
        - analyticVersion
        - author
        - businessProfileId
        - createdAt
        - description
        - directoryId
        - id
        - isDeleted
        - isDynamicAnalytic
        - isPredefinedAnalytic
        - isVisibleForClientProfile
        - modifier
        - name
        - namespace
        - updatedAt
        - usedAt
    analytics-ExpressionType:
      type: string
      x-class-name: ExpressionType
      enum:
        - EVENT
        - CLIENT
    analytics-ExpressionEntity:
      description: Details of the analysis
      discriminator:
        propertyName: type
        mapping:
          EVENT: "#/components/schemas/analytics-EventExpressionEntity"
          CLIENT: "#/components/schemas/analytics-ClientExpressionEntity"
      oneOf:
        - $ref: "#/components/schemas/analytics-EventExpressionEntity"
        - $ref: "#/components/schemas/analytics-ClientExpressionEntity"
    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-EventExpressionContentEntity:
      description: Structure of the expression. This is a recursive schema - functions can contain more functions.
      example:
        type: VALUE
        title: title
        value:
          type: CONSTANT
          constant: 10
      discriminator:
        propertyName: type
        mapping:
          VALUE: "#/components/schemas/analytics-EventExpressionContentEntityValue"
          FUNCTION: "#/components/schemas/analytics-EventExpressionContentEntityFunction"
      oneOf:
        - $ref: "#/components/schemas/analytics-EventExpressionContentEntityValue"
        - $ref: "#/components/schemas/analytics-EventExpressionContentEntityFunction"
    analytics-EventExpressionContentEntityValue:
      type: object
      title: Value
      description: A value reference in the expression - can reference an event parameter, profile parameter, constant, or variable.
      properties:
        type:
          description: A value reference in the expression - can reference an event parameter, profile parameter, constant, or variable.
          x-class-name: EventExpressionContentEntityValueType
          type: string
          enum:
            - VALUE
        title:
          type: string
          description: Title of the value
        value:
          $ref: "#/components/schemas/analytics-EventValue"
      required:
        - title
        - type
        - value
    analytics-EventExpressionContentEntityFunction:
      type: object
      title: Function
      description: |
        A function in the expression. Arguments are optional depending on function arity:
        - `arg` - argument for single-argument (unary) functions
        - `arg1` - first argument for multi-argument functions (binary, ternary)
        - `arg2` - second argument for multi-argument functions (binary, ternary)
        - `arg3` - third argument for ternary functions (IF)
      example:
        type: FUNCTION
        function: LN
        arg:
          type: VALUE
          title: title
          value:
            type: CONSTANT
            constant: 10
      properties:
        type:
          x-class-name: EventExpressionContentEntityFunctionType
          type: string
          enum:
            - FUNCTION
        function:
          x-class-name: EventExpressionFunctionType
          type: string
          description: |
            The function to apply. The number of required arguments depends on the function arity:
            - Nullary (0 args): NOW
            - Unary (1 arg via `arg`): 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
            - Binary (2 args via `arg1`, `arg2`): DIVIDE, IF_NULL, MAX, MIN, MOD, MULTIPLY, SUB, SUM, GREATER, GREATER_OR_EQUALS, LESS, LESS_OR_EQUAL, NOT_EQUAL, EQUALS, ADD_YEARS, CONCAT, REGEXP
            - Ternary (3 args via `arg1`, `arg2`, `arg3`): IF (arg1 - condition; arg2 - return if true; arg3 - return if false)
          enum:
            - NOW
            - 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
            - DIVIDE
            - IF_NULL
            - MAX
            - MIN
            - MOD
            - MULTIPLY
            - SUB
            - SUM
            - GREATER
            - GREATER_OR_EQUALS
            - LESS
            - LESS_OR_EQUAL
            - NOT_EQUAL
            - EQUALS
            - ADD_YEARS
            - CONCAT
            - REGEXP
            - IF
        arg:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: EventExpressionContentEntity
        arg1:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: EventExpressionContentEntity
        arg2:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: EventExpressionContentEntity
        arg3:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: EventExpressionContentEntity
      required:
        - type
        - function
    analytics-ClientExpressionEntity:
      type: object
      title: Profile expression
      description: Details of a profile expression. In the Synerise Portal, they are called _attribute_ expressions.
      properties:
        id:
          $ref: "#/components/schemas/analytics-AnalyticId"
        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:
        - type
        - name
        - expression
    analytics-ClientExpressionContentEntity:
      description: Structure of the expression. This is a recursive schema - functions can contain more functions.
      example:
        type: VALUE
        title: title
        value:
          type: CONSTANT
          constant: 10
      discriminator:
        propertyName: type
        mapping:
          VALUE: "#/components/schemas/analytics-ClientExpressionContentEntityValue"
          FUNCTION: "#/components/schemas/analytics-ClientExpressionContentEntityFunction"
      oneOf:
        - $ref: "#/components/schemas/analytics-ClientExpressionContentEntityValue"
        - $ref: "#/components/schemas/analytics-ClientExpressionContentEntityFunction"
    analytics-ClientExpressionContentEntityValue:
      type: object
      title: Value
      description: A value reference in the expression - can reference a profile parameter, constant, or variable.
      properties:
        type:
          x-class-name: ClientExpressionContentEntityValueType
          type: string
          description: A value reference in the expression - can reference a profile parameter, constant, or variable.
          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
    analytics-ClientExpressionContentEntityFunction:
      type: object
      title: Function
      description: |
        A function in the expression. Arguments are optional depending on function arity:
        - `arg` - argument for single-argument (unary) functions
        - `arg1` - first argument for multi-argument functions (binary, ternary)
        - `arg2` - second argument for multi-argument functions (binary, ternary)
        - `arg3` - third argument for ternary functions (IF)
      example:
        type: FUNCTION
        function: LN
        arg:
          type: VALUE
          title: title
          value:
            type: CONSTANT
            constant: 10
      properties:
        type:
          x-class-name: ClientExpressionContentEntityFunctionType
          type: string
          enum:
            - FUNCTION
        function:
          x-class-name: ClientExpressionFunctionType
          type: string
          description: |
            The function to apply. The number of required arguments depends on the function arity:
            - Nullary (0 args): NOW
            - Unary (1 arg via `arg`): 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
            - Binary (2 args via `arg1`, `arg2`): DIVIDE, IF_NULL, MAX, MIN, MOD, MULTIPLY, SUB, SUM, GREATER, GREATER_OR_EQUALS, LESS, LESS_OR_EQUAL, NOT_EQUAL, EQUALS, ADD_YEARS, CONCAT, REGEXP
            - Ternary (3 args via `arg1`, `arg2`, `arg3`): IF (arg1 - condition; arg2 - return if true; arg3 - return if false)
          enum:
            - NOW
            - 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
            - DIVIDE
            - IF_NULL
            - MAX
            - MIN
            - MOD
            - MULTIPLY
            - SUB
            - SUM
            - GREATER
            - GREATER_OR_EQUALS
            - LESS
            - LESS_OR_EQUAL
            - NOT_EQUAL
            - EQUALS
            - ADD_YEARS
            - CONCAT
            - REGEXP
            - IF
        arg:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: ClientExpressionContentEntity
        arg1:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: ClientExpressionContentEntity
        arg2:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: ClientExpressionContentEntity
        arg3:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: ClientExpressionContentEntity
      required:
        - type
        - function
    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-IsDeleted:
      type: boolean
      description: "`true` if the resource was deleted"
    analytics-IsPredefinedAnalytic:
      type: boolean
      description: "`true` if the analysis was automatically created with the workspace"
    analytics-ExpressionPreviewRequestWithClient:
      type: object
      properties:
        identifierValue:
          $ref: "#/components/schemas/analytics-IdentifierValue"
        expression:
          $ref: "#/components/schemas/analytics-ClientExpressionEntity"
        inlineAnalytics:
          $ref: "#/components/schemas/analytics-InlineAnalytics"
      required:
        - expression
        - identifierValue
    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-HistogramView:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/analytics-AnalyticId"
        businessProfileId:
          $ref: "#/components/schemas/analytics-BusinessProfileId"
        name:
          $ref: "#/components/schemas/analytics-Name"
        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"
        analysis:
          $ref: "#/components/schemas/analytics-HistogramAnalysis"
        inlineAnalytics:
          $ref: "#/components/schemas/analytics-InlineAnalytics"
        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:
        - id
        - businessProfileId
        - name
        - author
        - modifier
        - updatedAt
        - createdAt
        - usedAt
        - analysis
        - isPredefinedAnalytic
        - isDynamicAnalytic
        - isDeleted
        - namespace
        - directoryId
    analytics-HistogramMetric:
      type: object
      properties:
        metricId:
          $ref: "#/components/schemas/analytics-AnalyticId"
        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-ChartType:
      type: string
      description: Currently unused. For compatibility, set to COLUMN
      enum:
        - COLUMN
        - LINE
    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-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-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-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-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-HistogramMetadata:
      type: object
      description: Time constraints and aggregation details
      properties:
        period:
          $ref: "#/components/schemas/analytics-Period"
        dateFilter:
          $ref: "#/components/schemas/analytics-DateFilter"
      required:
        - aggregateDataBy
        - dateFilter
    analytics-TrendAnalysis:
      type: object
      description: Details of a trend analysis
      properties:
        id:
          $ref: "#/components/schemas/analytics-AnalyticId"
        title:
          $ref: "#/components/schemas/analytics-Name"
        description:
          $ref: "#/components/schemas/analytics-Description"
        filter:
          $ref: "#/components/schemas/analytics-ExpressionFilter"
        trend:
          $ref: "#/components/schemas/analytics-Trend"
      required:
        - filter
        - title
        - trend
    analytics-Trend:
      type: object
      properties:
        aggregateDataBy:
          $ref: "#/components/schemas/analytics-Period"
        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"
    analytics-TrendDefinition:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/analytics-AnalyticId"
        title:
          $ref: "#/components/schemas/analytics-Name"
        description:
          $ref: "#/components/schemas/analytics-Description"
        action:
          $ref: "#/components/schemas/analytics-Action"
        expressions:
          $ref: "#/components/schemas/analytics-EventExpressions"
        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-TerrariumVariable:
      type: object
      properties:
        name:
          type: string
        value: {}
      required:
        - name
        - value
    analytics-HistogramLegacyPreviewRequest:
      type: object
      properties:
        analysis:
          $ref: "#/components/schemas/analytics-HistogramAnalysis"
        inlineAnalytics:
          $ref: "#/components/schemas/analytics-InlineAnalytics"
    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-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-SegmentationBasic:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/analytics-AnalyticId"
        name:
          $ref: "#/components/schemas/analytics-Name"
        author:
          $ref: "#/components/schemas/analytics-Author"
        updatedAt:
          $ref: "#/components/schemas/analytics-UpdatedAt"
        createdAt:
          $ref: "#/components/schemas/analytics-CreatedAt"
        usedAt:
          $ref: "#/components/schemas/analytics-UsedAt"
        segments:
          description: The number of segments in the segmentation
          type: integer
        starred:
          description: "`true` if the segmentation is added to starred items"
          type: boolean
        isPredefinedAnalytic:
          $ref: "#/components/schemas/analytics-IsPredefinedAnalytic"
        children:
          description: Analyses nested in the segmentation
          type: array
          nullable: true
          items:
            $ref: "#/components/schemas/analytics-SegmentationChild"
        directoryId:
          $ref: "#/components/schemas/analytics-DirectoryId"
        isDynamicAnalytic:
          $ref: "#/components/schemas/analytics-IsDynamicAnalytic"
        variables:
          $ref: "#/components/schemas/analytics-Variables"
        sharing:
          $ref: "#/components/schemas/analytics-SharingData"
      required:
        - author
        - children
        - createdAt
        - directoryId
        - id
        - isDynamicAnalytic
        - isPredefinedAnalytic
        - name
        - segments
        - sharing
        - starred
        - updatedAt
        - usedAt
        - variables
    analytics-SegmentationChild:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/analytics-Id"
        segmentationId:
          $ref: "#/components/schemas/analytics-Id"
        name:
          $ref: "#/components/schemas/analytics-Name"
      required:
        - name
        - segmentationId
    analytics-SharingData:
      type: object
      properties:
        process:
          $ref: "#/components/schemas/analytics-SharingProcessSimple"
        attribute:
          $ref: "#/components/schemas/analytics-AttributeData"
      required:
        - process
        - attribute
    analytics-SharingProcessSimple:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/analytics-SharingProcessId"
        name:
          $ref: "#/components/schemas/analytics-SharingProcessName"
        shareType:
          $ref: "#/components/schemas/analytics-SharingProcessShareType"
        automationId:
          $ref: "#/components/schemas/analytics-SharingProcessAutomationId"
        status:
          $ref: "#/components/schemas/analytics-SharingProcessStatus"
      required:
        - id
        - name
        - shareType
        - status
    analytics-AttributeData:
      type: object
      properties:
        name:
          description: Name of the attribute
          type: string
        id:
          description: Unique ID of the attribute
          type: integer
          format: int64
      required:
        - name
        - id
    analytics-SegmentationRequest:
      type: object
      properties:
        analysis:
          $ref: "#/components/schemas/analytics-SegmentationAnalysis"
        isVisibleForClientProfile:
          $ref: "#/components/schemas/analytics-IsVisibleForClientProfile"
        inlineAnalytics:
          $ref: "#/components/schemas/analytics-InlineAnalytics"
      required:
        - analysis
        - isVisibleForClientProfile
    analytics-CalculatedAnalytic:
      type: object
      properties:
        analyticId:
          $ref: "#/components/schemas/analytics-AnalyticId"
        name:
          $ref: "#/components/schemas/analytics-AnalyticName"
        result:
          $ref: "#/components/schemas/analytics-CalculationResult"
      required:
        - analyticId
        - name
        - result
    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-Period"
      required:
        - aggregateDataBy
        - dateFilter
        - variables
    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-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-HistogramAggregateTimeDistributedChartItem"
      required:
        - aggregateTimeDescription
        - values
    analytics-HistogramAggregateTimeDistributedChartItem:
      type: object
      properties:
        uuid:
          description: Identifier of the value
          type: string
          format: uuid
        value:
          description: The value
          type: number
          format: double
      required:
        - metricId
        - value
    analytics-AggregatePreviewRequest:
      properties:
        identifierValue:
          $ref: "#/components/schemas/analytics-IdentifierValue"
        aggregate:
          $ref: "#/components/schemas/analytics-ClientAggregate"
        inlineAnalytics:
          $ref: "#/components/schemas/analytics-InlineAnalytics"
      required:
        - aggregate
        - identifierValue
    analytics-ClientAggregate:
      type: object
      description: The definition of an aggregate
      properties:
        aggregateType:
          x-class-name: ClientAggregateAggregateType
          type: string
          description: An aggregate with a profile context
          enum:
            - AGGREGATE
        id:
          $ref: "#/components/schemas/analytics-AnalysisOldId"
        name:
          $ref: "#/components/schemas/analytics-Name"
        description:
          $ref: "#/components/schemas/analytics-Description"
        uuid:
          $ref: "#/components/schemas/analytics-AnalyticId"
        type:
          $ref: "#/components/schemas/analytics-AggregateExpressionType"
        level:
          $ref: "#/components/schemas/analytics-QuantileLevel"
        size:
          $ref: "#/components/schemas/analytics-AggregateSize"
        unique:
          $ref: "#/components/schemas/analytics-AggregateUnique"
        dateFilter:
          $ref: "#/components/schemas/analytics-DateFilter"
        expressions:
          $ref: "#/components/schemas/analytics-EventExpressions"
        attribute:
          $ref: "#/components/schemas/analytics-EventAttribute"
        action:
          $ref: "#/components/schemas/analytics-Action"
      required:
        - aggregateType
        - id
        - name
        - description
        - uuid
        - type
        - level
        - size
        - unique
        - dateFilter
        - expressions
        - attribute
        - action
    analytics-RunningAggregate:
      type: object
      properties:
        aggregateType:
          description: An aggregate with an event context
          x-class-name: RunningAggregateAggregateType
          type: string
          enum:
            - RUNNING_AGGREGATE
        id:
          $ref: "#/components/schemas/analytics-AnalysisOldId"
        name:
          $ref: "#/components/schemas/analytics-Name"
        description:
          $ref: "#/components/schemas/analytics-Description"
        uuid:
          $ref: "#/components/schemas/analytics-AnalyticId"
        type:
          $ref: "#/components/schemas/analytics-AggregateExpressionType"
        level:
          $ref: "#/components/schemas/analytics-QuantileLevel"
        size:
          $ref: "#/components/schemas/analytics-AggregateSize"
        unique:
          $ref: "#/components/schemas/analytics-AggregateUnique"
        dateFilter:
          $ref: "#/components/schemas/analytics-DateFilter"
        expressions:
          $ref: "#/components/schemas/analytics-EventExpressions"
        attribute:
          $ref: "#/components/schemas/analytics-EventAttribute"
        action:
          $ref: "#/components/schemas/analytics-Action"
        excludeCurrent:
          $ref: "#/components/schemas/analytics-ExcludeCurrent"
        timeWindow:
          $ref: "#/components/schemas/analytics-Period"
      required:
        - aggregateType
        - id
        - name
        - description
        - uuid
        - type
        - level
        - size
        - unique
        - dateFilter
        - expressions
        - attribute
        - action
        - excludeCurrent
    analytics-AggregateTypedCalculationResponse:
      type: object
      properties:
        aggregateId:
          $ref: "#/components/schemas/analytics-AnalyticId"
        aggregateUuid:
          $ref: "#/components/schemas/analytics-AnalyticId"
        clientId:
          $ref: "#/components/schemas/analytics-ClientId"
        title:
          $ref: "#/components/schemas/analytics-AnalyticName"
        result:
          description: The result of the calculation
          anyOf:
            - type: string
            - type: number
            - type: object
            - type: boolean
            - type: array
              items: {}
        variables:
          $ref: "#/components/schemas/analytics-Variables"
        dateFilter:
          $ref: "#/components/schemas/analytics-DateFilter"
        analyticVersion:
          $ref: "#/components/schemas/analytics-AnalyticVersion"
      required:
        - aggregateId
        - aggregateUuid
        - clientId
        - title
        - result
        - variables
        - dateFilter
        - analyticVersion
    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-AggregateType:
      type: string
      enum:
        - AGGREGATE
        - RUNNING_AGGREGATE
    analytics-AggregateRequest:
      type: object
      description: Definition of the aggregate
      properties:
        analysis:
          $ref: "#/components/schemas/analytics-AggregateAnalysis"
        isVisibleForClientProfile:
          $ref: "#/components/schemas/analytics-IsVisibleForClientProfile"
        aggregateType:
          $ref: "#/components/schemas/analytics-AggregateType"
        previewDefaultObjectId:
          $ref: "#/components/schemas/analytics-PreviewDefaultObjectId"
        inlineAnalytics:
          $ref: "#/components/schemas/analytics-InlineAnalytics"
      required:
        - analysis
        - isVisibleForClientProfile
    analytics-AggregateAnalysis:
      description: |
        Definition of the aggregate. In `attribute`, define the attribute that you want to analyze.
      discriminator:
        propertyName: aggregateType
        mapping:
          AGGREGATE: "#/components/schemas/analytics-ClientAggregate"
          RUNNING_AGGREGATE: "#/components/schemas/analytics-RunningAggregate"
      oneOf:
        - $ref: "#/components/schemas/analytics-ClientAggregate"
        - $ref: "#/components/schemas/analytics-RunningAggregate"
    analytics-AggregatePaginationContainer:
      type: object
      properties:
        data:
          type: array
          description: An array of funnels
          items:
            $ref: "#/components/schemas/analytics-AggregateSimplifiedView"
        meta:
          $ref: "#/components/schemas/analytics-Meta"
      required:
        - data
    analytics-AggregateSimplifiedView:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/analytics-AnalyticId"
        name:
          $ref: "#/components/schemas/analytics-Name"
        author:
          $ref: "#/components/schemas/analytics-AuthorId"
        updatedAt:
          $ref: "#/components/schemas/analytics-UpdatedAt"
        createdAt:
          $ref: "#/components/schemas/analytics-CreatedAt"
        usedAt:
          $ref: "#/components/schemas/analytics-UsedAt"
        directoryId:
          $ref: "#/components/schemas/analytics-DirectoryId"
        isDynamicAnalytic:
          $ref: "#/components/schemas/analytics-IsDynamicAnalytic"
        aggregateType:
          $ref: "#/components/schemas/analytics-AggregateType"
        variables:
          description: Dynamic keys used in this analysis
          type: array
          items:
            $ref: "#/components/schemas/analytics-TerrariumVariable"
      required:
        - id
        - name
        - author
        - updatedAt
        - createdAt
        - usedAt
        - directoryId
        - isDynamicAnalytic
        - aggregateType
        - variables
    analytics-AggregateView:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/analytics-AnalyticId"
        oldId:
          $ref: "#/components/schemas/analytics-OldId"
        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"
        analysis:
          $ref: "#/components/schemas/analytics-AggregateAnalysis"
        inlineAnalytics:
          $ref: "#/components/schemas/analytics-InlineAnalytics"
        isPredefinedAnalytic:
          $ref: "#/components/schemas/analytics-IsPredefinedAnalytic"
        isVisibleForClientProfile:
          $ref: "#/components/schemas/analytics-IsVisibleForClientProfile"
        isDynamicAnalytic:
          $ref: "#/components/schemas/analytics-IsDynamicAnalytic"
        isDeleted:
          $ref: "#/components/schemas/analytics-IsDeleted"
        analyticVersion:
          $ref: "#/components/schemas/analytics-AnalyticVersion"
        namespace:
          $ref: "#/components/schemas/analytics-Namespace"
        directoryId:
          $ref: "#/components/schemas/analytics-DirectoryId"
        aggregateType:
          $ref: "#/components/schemas/analytics-AggregateType"
        previewDefaultObjectId:
          $ref: "#/components/schemas/analytics-PreviewDefaultObjectId"
      required:
        - id
        - oldId
        - businessProfileId
        - name
        - description
        - author
        - modifier
        - updatedAt
        - createdAt
        - usedAt
        - analysis
        - isPredefinedAnalytic
        - isVisibleForClientProfile
        - isDynamicAnalytic
        - isDeleted
        - analyticVersion
        - namespace
        - directoryId
        - aggregateType
        - previewDefaultObjectId
    analytics-PreviewDefaultObjectId:
      type: number
      format: int64
      nullable: true
      description: The ID of the default profile for generating a preview of the results.
    analytics-AggregateUpdateRequest:
      type: object
      description: Definition of the aggregate
      properties:
        analysis:
          $ref: "#/components/schemas/analytics-AggregateAnalysis"
        isVisibleForClientProfile:
          $ref: "#/components/schemas/analytics-IsVisibleForClientProfile"
        aggregateType:
          $ref: "#/components/schemas/analytics-AggregateType"
        previewDefaultObjectId:
          $ref: "#/components/schemas/analytics-PreviewDefaultObjectId"
        inlineAnalytics:
          $ref: "#/components/schemas/analytics-InlineAnalytics"
      required:
        - analysis
        - isVisibleForClientProfile
    analytics-OldId:
      type: integer
      description: A unique numeric ID required for backwards compatibility. Cannot be changed.
    analytics-CreateRequestSankeyAnalysis:
      type: object
      properties:
        analysis:
          $ref: "#/components/schemas/analytics-SankeyAnalysis"
        inlineAnalytics:
          $ref: "#/components/schemas/analytics-InlineAnalytics"
      required:
        - analysis
    analytics-SankeyAnalysis:
      type: object
      description: Details of a Sankey analysis
      properties:
        id:
          $ref: "#/components/schemas/analytics-AnalyticId"
        title:
          $ref: "#/components/schemas/analytics-Name"
        description:
          $ref: "#/components/schemas/analytics-Description"
        sourceEvent:
          $ref: "#/components/schemas/analytics-SankeySourceEvent"
        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:
          type: integer
          format: int32
          minimum: 0
          description: The number of steps to analyze before or after the source event
        numberOfPaths:
          type: integer
          format: int32
          minimum: 0
          description: The number of paths to analyze
        drillDown:
          type: array
          description: An array of drilldown conditions. On each layer, an event can only have one drilldown assigned.
          items:
            $ref: "#/components/schemas/analytics-SankeyDrillDown"
        drillDownCount:
          type: integer
          nullable: true
          description: Defines the number of displayed top drilldown results.
        dateFilter:
          $ref: "#/components/schemas/analytics-DateFilter"
        filter:
          $ref: "#/components/schemas/analytics-ExpressionFilter"
        eventFilters:
          type: array
          description: An array of events to include or exclude according to the `excludeEvents` setting.
          items:
            $ref: "#/components/schemas/analytics-FunnelStep"
        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.
      required:
        - id
        - title
        - description
        - sourceEvent
        - reverseOrder
        - numberOfSteps
        - numberOfPaths
        - drillDown
        - drillDownCount
        - dateFilter
        - filter
        - eventFilters
        - excludeEvents
        - firstOccurrenceOnly
    analytics-SankeySourceEvent:
      type: object
      description: The event that serves as the basis of the Sankey analysis
      properties:
        action:
          $ref: "#/components/schemas/analytics-Action"
        expressions:
          $ref: "#/components/schemas/analytics-EventExpressions"
      required:
        - action
        - expressions
    analytics-SankeyDrillDown:
      type: object
      description: A drilldown condition. On each layer, an event can only have one drilldown assigned.
      properties:
        layer:
          type: integer
          format: int32
          minimum: 0
          description: The layer where this drilldown applies. Layer indexes start at 0.
        action:
          $ref: "#/components/schemas/analytics-Action"
        attribute:
          $ref: "#/components/schemas/analytics-EventAttribute"
      required:
        - layer
        - action
        - attribute
    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-SankeyView:
      type: object
      description: A Sankey analytic view
      properties:
        id:
          $ref: "#/components/schemas/analytics-AnalyticId"
        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"
        analysis:
          $ref: "#/components/schemas/analytics-SankeyAnalysis"
        inlineAnalytics:
          $ref: "#/components/schemas/analytics-InlineAnalytics"
        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:
        - id
        - businessProfileId
        - name
        - description
        - author
        - modifier
        - updatedAt
        - createdAt
        - usedAt
        - analysis
        - isPredefinedAnalytic
        - isDynamicAnalytic
        - isDeleted
        - namespace
        - directoryId
    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:
            $ref: "#/components/schemas/analytics-TimeBetweenSteps"
    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-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-TimeBetweenSteps:
      type: object
      description: Data about time between steps. All times are in milliseconds.
      properties:
        min:
          type: integer
          format: int64
          description: Shortest time
        max:
          type: integer
          format: int64
          description: Longest time
        avg:
          type: integer
          format: int64
          description: Average time
      required:
        - min
        - max
        - avg
    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-Funnel"
        filter:
          $ref: "#/components/schemas/analytics-ExpressionFilter"
      required:
        - description
        - filter
        - funnel
        - title
    analytics-FunnelView:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/analytics-AnalyticId"
        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"
        analysis:
          $ref: "#/components/schemas/analytics-FunnelAnalysis"
        inlineAnalytics:
          $ref: "#/components/schemas/analytics-InlineAnalytics"
        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:
        - id
        - businessProfileId
        - name
        - description
        - author
        - modifier
        - updatedAt
        - createdAt
        - usedAt
        - analysis
        - isPredefinedAnalytic
        - isDynamicAnalytic
        - isDeleted
        - namespace
        - directoryId
    analytics-FunnelRequest:
      type: object
      properties:
        analysis:
          $ref: "#/components/schemas/analytics-FunnelAnalysis"
        inlineAnalytics:
          $ref: "#/components/schemas/analytics-InlineAnalytics"
      required:
        - analysis
    analytics-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:
          description: The number of time units
          type: number
          format: int64
    analytics-ReportView:
      type: object
      description: Full report analysis details
      properties:
        id:
          $ref: "#/components/schemas/analytics-AnalyticId"
        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"
        analysis:
          $ref: "#/components/schemas/analytics-ReportAnalysis"
        inlineAnalytics:
          $ref: "#/components/schemas/analytics-InlineAnalytics"
        isPredefinedAnalytic:
          $ref: "#/components/schemas/analytics-IsPredefinedAnalytic"
        isDynamicAnalytic:
          $ref: "#/components/schemas/analytics-IsDynamicAnalytic"
        allowNull:
          $ref: "#/components/schemas/analytics-AllowNull"
        isDeleted:
          $ref: "#/components/schemas/analytics-IsDeleted"
        namespace:
          $ref: "#/components/schemas/analytics-Namespace"
        directoryId:
          $ref: "#/components/schemas/analytics-DirectoryId"
      required:
        - id
        - businessProfileId
        - name
        - description
        - author
        - modifier
        - updatedAt
        - createdAt
        - usedAt
        - analysis
        - isPredefinedAnalytic
        - isDynamicAnalytic
        - allowNull
        - isDeleted
        - namespace
        - directoryId
    analytics-ReportRequest:
      type: object
      properties:
        analysis:
          $ref: "#/components/schemas/analytics-ReportAnalysis"
        allowNull:
          $ref: "#/components/schemas/analytics-AllowNull"
        inlineAnalytics:
          $ref: "#/components/schemas/analytics-InlineAnalytics"
    analytics-TrendRequest:
      type: object
      properties:
        analysis:
          $ref: "#/components/schemas/analytics-TrendAnalysis"
        inlineAnalytics:
          $ref: "#/components/schemas/analytics-InlineAnalytics"
      required:
        - analysis
    analytics-TrendView:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/analytics-AnalyticId"
        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"
        analysis:
          $ref: "#/components/schemas/analytics-TrendAnalysis"
        inlineAnalytics:
          $ref: "#/components/schemas/analytics-InlineAnalytics"
        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:
        - id
        - businessProfileId
        - name
        - description
        - author
        - modifier
        - updatedAt
        - createdAt
        - usedAt
        - analysis
        - isPredefinedAnalytic
        - isDynamicAnalytic
        - isDeleted
        - namespace
        - directoryId
    analytics-TrendSignedCalculationResponse:
      type: object
      properties:
        name:
          description: Name of the resource
          type: string
        metadata:
          $ref: "#/components/schemas/analytics-TrendMetadata"
        items:
          description: Results, grouped by time unit
          type: array
          items:
            $ref: "#/components/schemas/analytics-TrendTimeDistributionItem"
        legends:
          description: Information about included trends and their display mode
          type: array
          items:
            $ref: "#/components/schemas/analytics-TrendCalculationLegend"
      required:
        - name
        - metadata
        - items
        - legends
    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-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-TrendTimeDistributionItem:
      type: object
      properties:
        aggregateTimeDescription:
          type: string
          description: Timestamp of the result
          format: date-time
        values:
          description: An array of the results of the included metrics
          type: array
          items:
            $ref: "#/components/schemas/analytics-TrendCalculationExpression"
      required:
        - aggregateTimeDescription
        - values
    analytics-TrendCalculationExpression:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/analytics-AnalyticId"
        countedEvents:
          type: number
          format: double
          description: The number of events that matched the trend. If the trend analyzes profiles, this value is `0.0`.
        countedClients:
          type: number
          format: double
          description: The number of profiles which matched the trend. If the trend analyzes events, this value is `0.0`.
      required:
        - id
        - countedEvents
        - countedClients
    analytics-TrendCalculationLegend:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/analytics-Id"
        title:
          $ref: "#/components/schemas/analytics-Name"
        chartType:
          $ref: "#/components/schemas/analytics-ChartType"
      required:
        - id
        - title
        - chartType
    analytics-TrendAnalysisRequest:
      type: object
      description: A trend analysis
      properties:
        analysis:
          $ref: "#/components/schemas/analytics-TrendAnalysis"
        tags:
          description: Currently unused
          type: array
          items:
            type: string
      required:
        - analysis
    analytics-SharingProcessId:
      type: string
      format: uuid
      description: Unique identifier of the sharing process
    analytics-SharingProcessName:
      type: string
      description: Name of the sharing process
    analytics-SharingProcessAutomationId:
      type: string
      format: uuid
      description: ID of the automation which handles the sharing
    analytics-SharingProcessShareType:
      type: string
      description: Type of sharing process
      enum:
        - CROSSWORKSPACE
        - INTERNAL
    analytics-SharingProcessStatus:
      type: string
      description: Status of the sharing process
      enum:
        - ACTIVE
        - INACTIVE
        - DELETED
    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-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.
      default: true
    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-ReportMetricDefinition:
      type: object
      properties:
        metricId:
          $ref: "#/components/schemas/analytics-Id"
        dateFilter:
          $ref: "#/components/schemas/analytics-DateFilter"
        action:
          $ref: "#/components/schemas/analytics-Action"
        actions:
          type: array
          description: |
            
            All events that the metric referenced by `metricId` is based on.
            When the report defines dimensions (`groups`) based on event parameters, the grouping applies to every event of the metric, so each event the metric uses must be listed here. When omitted, it defaults to a single-element array containing `action`.
          items:
            $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:
          $ref: "#/components/schemas/analytics-ReportMetricGrouping"
        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.
            Grouping: 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.
            Date filter: This date filter overrides the date filter in the metric.
            **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:
            $ref: "#/components/schemas/analytics-ReportMetricGroup"
      required:
        - action
        - dateFilter
        - format
        - grouping
        - groups
        - metricId
    analytics-MetricLegacyPreview:
      type: object
      properties:
        analysis:
          $ref: "#/components/schemas/analytics-MetricAnalysis"
        inlineAnalytics:
          $ref: "#/components/schemas/analytics-InlineAnalytics"
      required:
        - analysis
    analytics-PathIdentifierType:
      type: string
      enum:
        - id
        - uuid
        - email
        - custom_identify
    analytics-ExpressionResult:
      type: object
      properties:
        clientId:
          type: integer
          format: int32
          description: ID of the profile
        expressionId:
          type: string
          format: uuid
          description: UUID of the expression
        name:
          type: string
          description: Name of the expression
        result:
          type: string
          description: The result of the expression
      required:
        - clientId
        - expressionId
        - name
        - result
    analytics-expressionCreateRequestBody:
      type: object
      properties:
        isVisibleForClientProfile:
          $ref: "#/components/schemas/analytics-IsVisibleForClientProfile"
        analysis:
          $ref: "#/components/schemas/analytics-ExpressionEntity"
        inlineAnalytics:
          $ref: "#/components/schemas/analytics-InlineAnalytics"
      required:
        - isVisibleForClientProfile
        - analysis
    analytics-AnalyticVersion:
      type: string
      format: uuid
      nullable: true
      description: Unique ID of this version of the resource
    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-Period"
        eventMetrics:
          type: array
          description: An array of metrics in the histogram
          items:
            $ref: "#/components/schemas/analytics-HistogramMetric"
      required:
        - dateFilter
        - eventMetrics
        - period
    analytics-HistogramRequest:
      type: object
      properties:
        analysis:
          $ref: "#/components/schemas/analytics-HistogramAnalysis"
        inlineAnalytics:
          $ref: "#/components/schemas/analytics-InlineAnalytics"
      required:
        - analysis
    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
    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"
        whatsAppId:
          $ref: "#/components/schemas/api-service-inBodyClientWhatsAppId-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.

        **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
      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.
      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])/`

        **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
    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])/`

        **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
      example: "+48111222333"
    api-service-inBodyClientWhatsAppId-apiv4:
      type: string
      nullable: true
      description: |
        WhatsApp identifier of the profile, used for WhatsApp communication.

        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`)
      example: TestWhatsappId
    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.

        **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
    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])/`

        **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
      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-ap