openapi: 3.0.0
info:
  title: Data Management - Synerise Public API
  version: 1.2.2
servers:
  - description: Microsoft Azure EU
    url: https://api.synerise.com
  - description: Microsoft Azure USA
    url: https://api.azu.synerise.com
  - description: Google Cloud Platform
    url: https://api.geb.synerise.com
tags:
  - name: Events
  - name: AI Events
  - name: Activities
  - name: Catalogs
  - name: Asset tags
  - name: Tags
  - name: Profile management
  - name: "Analytics: Expressions"
  - name: "Analytics: Aggregates"
x-tagGroups:
  - name: Data Management
    tags:
      - Events
      - AI Events
      - Activities
      - Catalogs
      - Asset tags
      - Tags
      - Profile management
      - "Analytics: Expressions"
      - "Analytics: Aggregates"
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:
    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();
    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();
  /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:
    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();
    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();
  /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:
    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();
    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();
  /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();
  /analytics/{namespace}/expressions/visible-for-client/by/{identifierType}:
    post:
      tags:
        - "Analytics: Expressions"
      summary: Get expressions for profile card
      description: |
        Retrieve expressions to display on a profile's card in the Profiles module (`"isVisibleForClientProfile": true` in the [expression config](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#operation/addExpressionPOST)).


        ---

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

        **API key permission required:** `ANALYTICS_BACKEND_EXPRESSION_FOR_CLIENT_READ`

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

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

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

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

            conn.request("POST", "/analytics/%7Bnamespace%7D/expressions/visible-for-client/by/%7BidentifierType%7D", payload, headers)

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

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

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

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

            xhr.open("POST", "https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/visible-for-client/by/%7BidentifierType%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/analytics/%7Bnamespace%7D/expressions/visible-for-client/by/%7BidentifierType%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({identifierValue: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/visible-for-client/by/%7BidentifierType%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"identifierValue\":\"string\"}")
              .asString();
  /analytics/{namespace}/expressions/{expressionId}/calculate/by/{identifierType}:
    post:
      tags:
        - "Analytics: Expressions"
      summary: Calculate expression for profile
      description: |
        Calculate the result of an expression in context of a single profile.

        ---

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

        **API key permission required:** `ANALYTICS_BACKEND_EXPRESSION_FOR_CLIENT_READ`

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

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

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

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

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

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

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

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

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

            xhr.open("POST", "https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D/calculate/by/%7BidentifierType%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D/calculate/by/%7BidentifierType%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({identifierValue: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D/calculate/by/%7BidentifierType%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"identifierValue\":\"string\"}")
              .asString();
  /analytics/{namespace}/expressions:
    get:
      tags:
        - "Analytics: Expressions"
      summary: List expressions
      description: |
        Returns a paginated list of expressions.

        ---

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

        **API key permission required:** `ANALYTICS_BACKEND_EXPRESSIONS_LIST_READ`

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

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

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

            conn.request("GET", "/analytics/%7Bnamespace%7D/expressions?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE", headers=headers)

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/analytics/%7Bnamespace%7D/expressions?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/analytics/%7Bnamespace%7D/expressions?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

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

            $request->setQueryData([
              'page' => 'SOME_INTEGER_VALUE',
              'limit' => 'SOME_INTEGER_VALUE',
              'search' => 'SOME_STRING_VALUE',
              'sortBy' => 'name:asc',
              'directoryId' => 'SOME_STRING_VALUE',
              'ids' => 'SOME_STRING_VALUE'
            ]);

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/analytics/%7Bnamespace%7D/expressions?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - "Analytics: Expressions"
      summary: Create expression
      description: |
        Create an expression that is saved in the database and can be used in other analyses.

        ---

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

        **API key permissions required (at least one):** `ANALYTICS_BACKEND_EXPRESSIONS_CREATE`, `ANALYTICS_BACKEND_EXPRESSION_CREATE`

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

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

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

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

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

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "isVisibleForClientProfile": true,
              "analysis": {
                "type": "EVENT",
                "action": {
                  "id": 0,
                  "name": "page.visit"
                },
                "name": "string",
                "description": "string",
                "expression": {
                  "type": "VALUE",
                  "title": "string",
                  "value": {
                    "type": "EVENT",
                    "attribute": {
                      "type": "PARAM",
                      "param": "string",
                      "id": 0
                    }
                  }
                }
              }
            });

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

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

            xhr.open("POST", "https://api.synerise.com/analytics/%7Bnamespace%7D/expressions");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

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

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

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

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

            req.write(JSON.stringify({
              isVisibleForClientProfile: true,
              analysis: {
                type: 'EVENT',
                action: {id: 0, name: 'page.visit'},
                name: 'string',
                description: 'string',
                expression: {
                  type: 'VALUE',
                  title: 'string',
                  value: {type: 'EVENT', attribute: {type: 'PARAM', param: 'string', id: 0}}
                }
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"isVisibleForClientProfile":true,"analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"string","value":{"type":"EVENT","attribute":{"type":"PARAM","param":"string","id":0}}}}}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/analytics/%7Bnamespace%7D/expressions")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"isVisibleForClientProfile\":true,\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"string\",\"value\":{\"type\":\"EVENT\",\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0}}}}}")
              .asString();
  /analytics/{namespace}/expressions/{expressionId}:
    get:
      tags:
        - "Analytics: Expressions"
      summary: Get expression details
      description: |
        Retrieve information about an expression analysis

        ---

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

        **API key permissions required (at least one):** `ANALYTICS_BACKEND_EXPRESSIONS_READ`, `ANALYTICS_BACKEND_EXPRESSION_READ`

        **User role permission required:** `analytics: read`
      operationId: analytics2-expressions-get
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-expressionIdAsPathParam"
      responses:
        "200":
          description: Get expression details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/analytics-Expression"
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Analytics:-Expressions/operation/analytics2-expressions-get
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

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

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

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

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    put:
      tags:
        - "Analytics: Expressions"
      summary: Update expression
      description: |
        Update an existing expression

        ---

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

        **API key permissions required (at least one):** `ANALYTICS_BACKEND_EXPRESSIONS_UPDATE`, `ANALYTICS_BACKEND_EXPRESSION_UPDATE`

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

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

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

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

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

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "isVisibleForClientProfile": true,
              "analysis": {
                "type": "EVENT",
                "action": {
                  "id": 0,
                  "name": "page.visit"
                },
                "name": "string",
                "description": "string",
                "expression": {
                  "type": "VALUE",
                  "title": "string",
                  "value": {
                    "type": "EVENT",
                    "attribute": {
                      "type": "PARAM",
                      "param": "string",
                      "id": 0
                    }
                  }
                }
              }
            });

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

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

            xhr.open("PUT", "https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({
              isVisibleForClientProfile: true,
              analysis: {
                type: 'EVENT',
                action: {id: 0, name: 'page.visit'},
                name: 'string',
                description: 'string',
                expression: {
                  type: 'VALUE',
                  title: 'string',
                  value: {type: 'EVENT', attribute: {type: 'PARAM', param: 'string', id: 0}}
                }
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"isVisibleForClientProfile":true,"analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"string","value":{"type":"EVENT","attribute":{"type":"PARAM","param":"string","id":0}}}}}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.put("https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"isVisibleForClientProfile\":true,\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"string\",\"value\":{\"type\":\"EVENT\",\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0}}}}}")
              .asString();
    delete:
      tags:
        - "Analytics: Expressions"
      summary: Delete expression
      operationId: analytics2-expressions-delete
      parameters:
        - $ref: "#/components/parameters/analytics-pathNamespace"
        - $ref: "#/components/parameters/analytics-expressionIdAsPathParam"
      responses:
        "204":
          description: Delete expression
        4XX:
          $ref: "#/components/responses/analytics-genericError"
        5XX:
          $ref: "#/components/responses/analytics-genericError"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Analytics:-Expressions/operation/analytics2-expressions-delete
      description: |
        

        ---

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

        **API key permissions required (at least one):** `ANALYTICS_BACKEND_EXPRESSIONS_DELETE`, `ANALYTICS_BACKEND_EXPRESSION_DELETE`

        **User role permission required:** `analytics: delete`
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

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

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

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

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

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

            xhr.open("DELETE", "https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

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

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /analytics/{namespace}/expressions/preview/by/{identifierType}:
    post:
      tags:
        - "Analytics: Expressions"
      summary: Get expression preview
      description: |
        Retrieve expression preview value. Previews are only available for CLIENT-type expressions. This request doesn't save the expression.

        ---

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

        **API key permission required:** `ANALYTICS_BACKEND_EXPRESSION_FOR_CLIENT_READ`

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

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

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

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

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

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "identifierValue": "string",
              "expression": {
                "type": "CLIENT",
                "name": "string",
                "description": "string",
                "expression": {
                  "type": "VALUE",
                  "title": "string",
                  "value": {
                    "type": "CLIENT",
                    "attribute": {
                      "type": "SEGMENTATION",
                      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
                    }
                  }
                }
              }
            });

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

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

            xhr.open("POST", "https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/preview/by/%7BidentifierType%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/analytics/%7Bnamespace%7D/expressions/preview/by/%7BidentifierType%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({
              identifierValue: 'string',
              expression: {
                type: 'CLIENT',
                name: 'string',
                description: 'string',
                expression: {
                  type: 'VALUE',
                  title: 'string',
                  value: {
                    type: 'CLIENT',
                    attribute: {type: 'SEGMENTATION', id: '497f6eca-6276-4993-bfeb-53cbbbba6f08'}
                  }
                }
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"identifierValue":"string","expression":{"type":"CLIENT","name":"string","description":"string","expression":{"type":"VALUE","title":"string","value":{"type":"CLIENT","attribute":{"type":"SEGMENTATION","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08"}}}}}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/preview/by/%7BidentifierType%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"identifierValue\":\"string\",\"expression\":{\"type\":\"CLIENT\",\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"string\",\"value\":{\"type\":\"CLIENT\",\"attribute\":{\"type\":\"SEGMENTATION\",\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"}}}}}")
              .asString();
  /analytics/analytics/definitions-manager/aggregates/{aggregateId}/client/{clientId}/calculate/histogram:
    post:
      tags:
        - "Analytics: Aggregates"
      summary: Calculate aggregate for profile with period conditions
      description: |
        Calculate the results of an aggregate in context of a single profile. The results can be date-filtered and aggregated in time periods.

        ---

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

        **API key permission required:** `ANALYTICS_BACKEND_AGGREGATE_HISTOGRAM_FOR_CLIENT_READ`

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

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

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

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

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

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "variables": [
                {
                  "name": "string",
                  "value": "string"
                }
              ],
              "dateFilter": {
                "type": "ABSOLUTE",
                "from": "2019-08-24T14:15:22Z",
                "to": "2019-08-24T14:15:22Z",
                "filter": {
                  "type": "DAILY",
                  "nestingType": "IN_PLACE",
                  "from": "string",
                  "to": "string",
                  "inverted": false
                }
              },
              "aggregateDataBy": {
                "type": "YEARS",
                "value": 0
              }
            });

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

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

            xhr.open("POST", "https://api.synerise.com/analytics/analytics/definitions-manager/aggregates/%7BaggregateId%7D/client/%7BclientId%7D/calculate/histogram");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/analytics/analytics/definitions-manager/aggregates/%7BaggregateId%7D/client/%7BclientId%7D/calculate/histogram",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({
              variables: [{name: 'string', value: 'string'}],
              dateFilter: {
                type: 'ABSOLUTE',
                from: '2019-08-24T14:15:22Z',
                to: '2019-08-24T14:15:22Z',
                filter: {
                  type: 'DAILY',
                  nestingType: 'IN_PLACE',
                  from: 'string',
                  to: 'string',
                  inverted: false
                }
              },
              aggregateDataBy: {type: 'YEARS', value: 0}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"variables":[{"name":"string","value":"string"}],"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"aggregateDataBy":{"type":"YEARS","value":0}}');

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

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

        ---

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

        **API key permissions required (at least one):** `ANALYTICS_BACKEND_AGGREGATES_READ`, `ANALYTICS_BACKEND_AGGREGATE_READ`

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

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

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

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

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

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "aggregate": {
                "oldId": 0,
                "aggregateType": "AGGREGATE",
                "name": "string",
                "description": "string",
                "action": {
                  "id": 0,
                  "name": "page.visit"
                },
                "attribute": {
                  "type": "PARAM",
                  "param": "string",
                  "id": 0
                },
                "type": "AVG",
                "level": 0.01,
                "dateFilter": {
                  "type": "ABSOLUTE",
                  "from": "2019-08-24T14:15:22Z",
                  "to": "2019-08-24T14:15:22Z",
                  "filter": {
                    "type": "DAILY",
                    "nestingType": "IN_PLACE",
                    "from": "string",
                    "to": "string",
                    "inverted": false
                  }
                },
                "size": 0,
                "unique": false,
                "expressions": [
                  {
                    "attribute": {
                      "type": "PARAM",
                      "param": "string",
                      "id": 0
                    },
                    "constraint": {
                      "type": "BOOL",
                      "logic": "IS_TRUE"
                    }
                  }
                ]
              },
              "identifierValue": "string"
            });

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

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

            xhr.open("POST", "https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates/preview/by/%7BidentifierType%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/analytics/%7Bnamespace%7D/aggregates/preview/by/%7BidentifierType%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({
              aggregate: {
                oldId: 0,
                aggregateType: 'AGGREGATE',
                name: 'string',
                description: 'string',
                action: {id: 0, name: 'page.visit'},
                attribute: {type: 'PARAM', param: 'string', id: 0},
                type: 'AVG',
                level: 0.01,
                dateFilter: {
                  type: 'ABSOLUTE',
                  from: '2019-08-24T14:15:22Z',
                  to: '2019-08-24T14:15:22Z',
                  filter: {
                    type: 'DAILY',
                    nestingType: 'IN_PLACE',
                    from: 'string',
                    to: 'string',
                    inverted: false
                  }
                },
                size: 0,
                unique: false,
                expressions: [
                  {
                    attribute: {type: 'PARAM', param: 'string', id: 0},
                    constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                  }
                ]
              },
              identifierValue: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

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

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

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


        ---

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

        **API key permission required:** `ANALYTICS_BACKEND_AGGREGATE_FOR_CLIENT_READ`

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

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

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

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

            conn.request("POST", "/analytics/%7Bnamespace%7D/aggregates/visible-for-client/by/%7BidentifierType%7D", payload, headers)

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

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

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

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

            xhr.open("POST", "https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates/visible-for-client/by/%7BidentifierType%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/analytics/%7Bnamespace%7D/aggregates/visible-for-client/by/%7BidentifierType%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({identifierValue: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates/visible-for-client/by/%7BidentifierType%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"identifierValue\":\"string\"}")
              .asString();
  /analytics/{namespace}/aggregates/{aggregateId}/calculate/by/{identifierType}:
    post:
      tags:
        - "Analytics: Aggregates"
      summary: Calculate aggregate for profile
      description: |
        Calculate the result of an existing aggregate in context of a single profile.

        ---

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

        **API key permission required:** `ANALYTICS_BACKEND_AGGREGATE_FOR_CLIENT_READ`

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

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

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

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

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

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

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

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

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

            xhr.open("POST", "https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%7D/calculate/by/%7BidentifierType%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%7D/calculate/by/%7BidentifierType%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({identifierValue: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%7D/calculate/by/%7BidentifierType%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"identifierValue\":\"string\"}")
              .asString();
  /analytics/{namespace}/aggregates:
    get:
      tags:
        - "Analytics: Aggregates"
      summary: List aggregates
      description: |
        Returns a paginated list of aggregates.

        ---

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

        **API key permission required:** `ANALYTICS_BACKEND_AGGREGATES_LIST_READ`

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

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

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

            conn.request("GET", "/analytics/%7Bnamespace%7D/aggregates?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&aggregateType=SOME_STRING_VALUE", headers=headers)

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&aggregateType=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/analytics/%7Bnamespace%7D/aggregates?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&aggregateType=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

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

            $request->setQueryData([
              'page' => 'SOME_INTEGER_VALUE',
              'limit' => 'SOME_INTEGER_VALUE',
              'search' => 'SOME_STRING_VALUE',
              'sortBy' => 'name:asc',
              'directoryId' => 'SOME_STRING_VALUE',
              'ids' => 'SOME_STRING_VALUE',
              'aggregateType' => 'SOME_STRING_VALUE'
            ]);

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&aggregateType=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - "Analytics: Aggregates"
      summary: Create aggregate
      description: |
        Create an aggregate analysis and save it to the database.

        ---

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

        **API key permissions required (at least one):** `ANALYTICS_BACKEND_AGGREGATES_CREATE`, `ANALYTICS_BACKEND_AGGREGATE_CREATE`

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

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

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

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

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

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

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

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

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

            xhr.open("POST", "https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

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

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

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

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

            req.write(JSON.stringify({
              analysis: {
                aggregateType: 'RUNNING_AGGREGATE',
                excludeCurrent: true,
                timeWindow: {type: 'YEARS', value: 0},
                name: 'string',
                description: 'string',
                action: {id: 0, name: 'page.visit'},
                attribute: {type: 'PARAM', param: 'string', id: 0},
                type: 'AVG',
                level: 0.01,
                dateFilter: {
                  type: 'ABSOLUTE',
                  from: '2019-08-24T14:15:22Z',
                  to: '2019-08-24T14:15:22Z',
                  filter: {
                    type: 'DAILY',
                    nestingType: 'IN_PLACE',
                    from: 'string',
                    to: 'string',
                    inverted: false
                  }
                },
                size: 0,
                unique: false,
                expressions: [
                  {
                    attribute: {type: 'PARAM', param: 'string', id: 0},
                    constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                  }
                ]
              },
              isVisibleForClientProfile: true,
              previewDefaultObjectId: 0
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"analysis\":{\"aggregateType\":\"RUNNING_AGGREGATE\",\"excludeCurrent\":true,\"timeWindow\":{\"type\":\"YEARS\",\"value\":0},\"name\":\"string\",\"description\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"type\":\"AVG\",\"level\":0.01,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"size\":0,\"unique\":false,\"expressions\":[{\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\",\"id\":0},\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"}}]},\"isVisibleForClientProfile\":true,\"previewDefaultObjectId\":0}")
              .asString();
  /analytics/{namespace}/aggregates/{aggregateId}:
    get:
      tags:
        - "Analytics: Aggregates"
      summary: Get aggregate details
      description: |
        Retrieve all data about an aggregate definition.

        ---

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

        **API key permissions required (at least one):** `ANALYTICS_BACKEND_AGGREGATES_READ`, `ANALYTICS_BACKEND_AGGREGATE_READ`

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

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

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

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

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

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

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    put:
      tags:
        - "Analytics: Aggregates"
      summary: Update aggregate
      description: |
        Update an aggregate.

        ---

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

        **API key permissions required (at least one):** `ANALYTICS_BACKEND_AGGREGATES_UPDATE`, `ANALYTICS_BACKEND_AGGREGATE_UPDATE`

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

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

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

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

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

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "analysis": {
                "oldId": 0,
                "aggregateType": "RUNNING_AGGREGATE",
                "excludeCurrent": true,
                "timeWindow": {
                  "type": "YEARS",
                  "value": 0
                },
                "name": "string",
                "description": "string",
                "action": {
                  "id": 0,
                  "name": "page.visit"
                },
                "attribute": {
                  "type": "PARAM",
                  "param": "string",
                  "id": 0
                },
                "type": "AVG",
                "level": 0.01,
                "dateFilter": {
                  "type": "ABSOLUTE",
                  "from": "2019-08-24T14:15:22Z",
                  "to": "2019-08-24T14:15:22Z",
                  "filter": {
                    "type": "DAILY",
                    "nestingType": "IN_PLACE",
                    "from": "string",
                    "to": "string",
                    "inverted": false
                  }
                },
                "size": 0,
                "unique": false,
                "expressions": [
                  {
                    "attribute": {
                      "type": "PARAM",
                      "param": "string",
                      "id": 0
                    },
                    "constraint": {
                      "type": "BOOL",
                      "logic": "IS_TRUE"
                    }
                  }
                ]
              },
              "isVisibleForClientProfile": true,
              "previewDefaultObjectId": 0
            });

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

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

            xhr.open("PUT", "https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({
              analysis: {
                oldId: 0,
                aggregateType: 'RUNNING_AGGREGATE',
                excludeCurrent: true,
                timeWindow: {type: 'YEARS', value: 0},
                name: 'string',
                description: 'string',
                action: {id: 0, name: 'page.visit'},
                attribute: {type: 'PARAM', param: 'string', id: 0},
                type: 'AVG',
                level: 0.01,
                dateFilter: {
                  type: 'ABSOLUTE',
                  from: '2019-08-24T14:15:22Z',
                  to: '2019-08-24T14:15:22Z',
                  filter: {
                    type: 'DAILY',
                    nestingType: 'IN_PLACE',
                    from: 'string',
                    to: 'string',
                    inverted: false
                  }
                },
                size: 0,
                unique: false,
                expressions: [
                  {
                    attribute: {type: 'PARAM', param: 'string', id: 0},
                    constraint: {type: 'BOOL', logic: 'IS_TRUE'}
                  }
                ]
              },
              isVisibleForClientProfile: true,
              previewDefaultObjectId: 0
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

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

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

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

        ---

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

        **API key permissions required (at least one):** `ANALYTICS_BACKEND_AGGREGATES_DELETE`, `ANALYTICS_BACKEND_AGGREGATE_DELETE`

        **User role permission required:** `analytics_aggregates: delete`
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

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

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

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

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

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

            xhr.open("DELETE", "https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

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

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/transactions:
    post:
      summary: Create a transaction
      description: |
        Create a transaction record in the database.

        For each transaction, a `transaction.charge` event is generated automatically. In addition, each item in the `products` array produces a `product.buy` event.

        All monetary values must use the same currency and be greater
        than or equal to zero. `discountAmount` must be greater than zero
        or omitted.


        ---

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

        **API key permission required:** `API_TRANSACTION_CREATE`
      operationId: CreateATransaction
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-CreateatransactionRequest-apiv4"
        required: true
      responses:
        "202":
          description: Accepted
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                timestamp: 2020-10-28T12:14:45.364+00:00
                status: 400
                error: Bad Request
                message: |-
                  JSON parse error: Missing property: 'currency'; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Missing property: 'currency'
                   at [Source: (PushbackInputStream); line: 13, column: 14] (through reference chain: com.synerise.api.endpoint.transactions.domain.model.IdentifiedTransactionData["products"]->java.util.ArrayList[0]->com.synerise.api.endpoint.transactions.domain.model.ProductData["finalUnitPrice"])
                path: /transactions
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          $ref: "#/components/responses/api-service-404-pii"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/CreateATransaction
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/transactions \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"discountAmount":{"amount":0,"currency":"USD"},"metadata":{"promotionCode":"string","quantityToRedeem":0},"orderId":"be466362-71e9-4bdd-ad11-bfacead5276b","paymentInfo":{"method":"CASH"},"products":[{"finalUnitPrice":{"amount":3.25,"currency":"USD"},"name":"Soft drink","sku":"189784563455","categories":["string"],"image":"string","url":"string","netUnitPrice":{"amount":3.25,"currency":"USD"},"tax":0.1,"quantity":2.5,"regularPrice":{"amount":3.25,"currency":"USD"},"discountPrice":{"amount":15.5,"currency":"USD"},"discountPercent":0.1,"property1":null,"property2":null}],"recordedAt":"2019-02-07T09:53:56.999+00:00","revenue":{"amount":64.25,"currency":"USD"},"value":{"amount":112.25,"currency":"USD"},"source":"MOBILE","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"discountAmount\":{\"amount\":0,\"currency\":\"USD\"},\"metadata\":{\"promotionCode\":\"string\",\"quantityToRedeem\":0},\"orderId\":\"be466362-71e9-4bdd-ad11-bfacead5276b\",\"paymentInfo\":{\"method\":\"CASH\"},\"products\":[{\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"name\":\"Soft drink\",\"sku\":\"189784563455\",\"categories\":[\"string\"],\"image\":\"string\",\"url\":\"string\",\"netUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"tax\":0.1,\"quantity\":2.5,\"regularPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"discountPrice\":{\"amount\":15.5,\"currency\":\"USD\"},\"discountPercent\":0.1,\"property1\":null,\"property2\":null}],\"recordedAt\":\"2019-02-07T09:53:56.999+00:00\",\"revenue\":{\"amount\":64.25,\"currency\":\"USD\"},\"value\":{\"amount\":112.25,\"currency\":\"USD\"},\"source\":\"MOBILE\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\"}"

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

            conn.request("POST", "/v4/transactions", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "discountAmount": {
                "amount": 0,
                "currency": "USD"
              },
              "metadata": {
                "promotionCode": "string",
                "quantityToRedeem": 0
              },
              "orderId": "be466362-71e9-4bdd-ad11-bfacead5276b",
              "paymentInfo": {
                "method": "CASH"
              },
              "products": [
                {
                  "finalUnitPrice": {
                    "amount": 3.25,
                    "currency": "USD"
                  },
                  "name": "Soft drink",
                  "sku": "189784563455",
                  "categories": [
                    "string"
                  ],
                  "image": "string",
                  "url": "string",
                  "netUnitPrice": {
                    "amount": 3.25,
                    "currency": "USD"
                  },
                  "tax": 0.1,
                  "quantity": 2.5,
                  "regularPrice": {
                    "amount": 3.25,
                    "currency": "USD"
                  },
                  "discountPrice": {
                    "amount": 15.5,
                    "currency": "USD"
                  },
                  "discountPercent": 0.1,
                  "property1": null,
                  "property2": null
                }
              ],
              "recordedAt": "2019-02-07T09:53:56.999+00:00",
              "revenue": {
                "amount": 64.25,
                "currency": "USD"
              },
              "value": {
                "amount": 112.25,
                "currency": "USD"
              },
              "source": "MOBILE",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00"
            });

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

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

            xhr.open("POST", "https://api.synerise.com/v4/transactions");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/transactions",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              discountAmount: {amount: 0, currency: 'USD'},
              metadata: {promotionCode: 'string', quantityToRedeem: 0},
              orderId: 'be466362-71e9-4bdd-ad11-bfacead5276b',
              paymentInfo: {method: 'CASH'},
              products: [
                {
                  finalUnitPrice: {amount: 3.25, currency: 'USD'},
                  name: 'Soft drink',
                  sku: '189784563455',
                  categories: ['string'],
                  image: 'string',
                  url: 'string',
                  netUnitPrice: {amount: 3.25, currency: 'USD'},
                  tax: 0.1,
                  quantity: 2.5,
                  regularPrice: {amount: 3.25, currency: 'USD'},
                  discountPrice: {amount: 15.5, currency: 'USD'},
                  discountPercent: 0.1,
                  property1: null,
                  property2: null
                }
              ],
              recordedAt: '2019-02-07T09:53:56.999+00:00',
              revenue: {amount: 64.25, currency: 'USD'},
              value: {amount: 112.25, currency: 'USD'},
              source: 'MOBILE',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"discountAmount":{"amount":0,"currency":"USD"},"metadata":{"promotionCode":"string","quantityToRedeem":0},"orderId":"be466362-71e9-4bdd-ad11-bfacead5276b","paymentInfo":{"method":"CASH"},"products":[{"finalUnitPrice":{"amount":3.25,"currency":"USD"},"name":"Soft drink","sku":"189784563455","categories":["string"],"image":"string","url":"string","netUnitPrice":{"amount":3.25,"currency":"USD"},"tax":0.1,"quantity":2.5,"regularPrice":{"amount":3.25,"currency":"USD"},"discountPrice":{"amount":15.5,"currency":"USD"},"discountPercent":0.1,"property1":null,"property2":null}],"recordedAt":"2019-02-07T09:53:56.999+00:00","revenue":{"amount":64.25,"currency":"USD"},"value":{"amount":112.25,"currency":"USD"},"source":"MOBILE","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00"}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/transactions")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"discountAmount\":{\"amount\":0,\"currency\":\"USD\"},\"metadata\":{\"promotionCode\":\"string\",\"quantityToRedeem\":0},\"orderId\":\"be466362-71e9-4bdd-ad11-bfacead5276b\",\"paymentInfo\":{\"method\":\"CASH\"},\"products\":[{\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"name\":\"Soft drink\",\"sku\":\"189784563455\",\"categories\":[\"string\"],\"image\":\"string\",\"url\":\"string\",\"netUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"tax\":0.1,\"quantity\":2.5,\"regularPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"discountPrice\":{\"amount\":15.5,\"currency\":\"USD\"},\"discountPercent\":0.1,\"property1\":null,\"property2\":null}],\"recordedAt\":\"2019-02-07T09:53:56.999+00:00\",\"revenue\":{\"amount\":64.25,\"currency\":\"USD\"},\"value\":{\"amount\":112.25,\"currency\":\"USD\"},\"source\":\"MOBILE\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\"}")
              .asString();
  /v4/transactions/batch:
    post:
      summary: Batch add or update transactions
      description: |
        Enqueue a number of add/update operations in the Synerise
        application database. 

        For each transaction, a `transaction.charge` event is generated automatically. In addition, each item in the `products` array produces a `product.buy` event.

        If you don't have some information about a transaction, don't insert a null-value parameter - omit the parameter entirely. Sending a null value <strong>deletes an attribute</strong> (if it's a custom attribute) or <strong>sets it to null/default value</strong> (if the attribute is Synerise-native).



        The body contains an array of objects to update. The objects are
        the same as in the *Update transaction* and *Create transaction*
        endpoints.



        All monetary values must use the same currency and be greater
        than or equal to zero. `discountAmount` must be greater than zero
        or omitted.


        ---

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

        **API key permission required:** `API_BATCH_TRANSACTION_CREATE`
      operationId: BatchAddOrUpdateTransactions
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: An array of transactions to post or update
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/api-service-CreateatransactionRequest-apiv4"
              description: ""
        required: true
      responses:
        "202":
          description: Accepted
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                error: Bad Request
                status: 400
                timestamp: 2020-10-28T12:24:24.444Z
                path: /transactions
                message: Some fields did not pass validation
                errors:
                  - code: 14191
                    field: client
                    message: Client cannot have null value
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/BatchAddOrUpdateTransactions
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/transactions/batch \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '[{"client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"discountAmount":{"amount":0,"currency":"USD"},"metadata":{"promotionCode":"string","quantityToRedeem":0},"orderId":"be466362-71e9-4bdd-ad11-bfacead5276b","paymentInfo":{"method":"CASH"},"products":[{"finalUnitPrice":{"amount":3.25,"currency":"USD"},"name":"Soft drink","sku":"189784563455","categories":["string"],"image":"string","url":"string","netUnitPrice":{"amount":3.25,"currency":"USD"},"tax":0.1,"quantity":2.5,"regularPrice":{"amount":3.25,"currency":"USD"},"discountPrice":{"amount":15.5,"currency":"USD"},"discountPercent":0.1,"property1":null,"property2":null}],"recordedAt":"2019-02-07T09:53:56.999+00:00","revenue":{"amount":64.25,"currency":"USD"},"value":{"amount":112.25,"currency":"USD"},"source":"MOBILE","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00"}]'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "[{\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"discountAmount\":{\"amount\":0,\"currency\":\"USD\"},\"metadata\":{\"promotionCode\":\"string\",\"quantityToRedeem\":0},\"orderId\":\"be466362-71e9-4bdd-ad11-bfacead5276b\",\"paymentInfo\":{\"method\":\"CASH\"},\"products\":[{\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"name\":\"Soft drink\",\"sku\":\"189784563455\",\"categories\":[\"string\"],\"image\":\"string\",\"url\":\"string\",\"netUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"tax\":0.1,\"quantity\":2.5,\"regularPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"discountPrice\":{\"amount\":15.5,\"currency\":\"USD\"},\"discountPercent\":0.1,\"property1\":null,\"property2\":null}],\"recordedAt\":\"2019-02-07T09:53:56.999+00:00\",\"revenue\":{\"amount\":64.25,\"currency\":\"USD\"},\"value\":{\"amount\":112.25,\"currency\":\"USD\"},\"source\":\"MOBILE\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\"}]"

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

            conn.request("POST", "/v4/transactions/batch", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              {
                "client": {
                  "customId": "string",
                  "id": 433230297,
                  "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                  "email": "string"
                },
                "discountAmount": {
                  "amount": 0,
                  "currency": "USD"
                },
                "metadata": {
                  "promotionCode": "string",
                  "quantityToRedeem": 0
                },
                "orderId": "be466362-71e9-4bdd-ad11-bfacead5276b",
                "paymentInfo": {
                  "method": "CASH"
                },
                "products": [
                  {
                    "finalUnitPrice": {
                      "amount": 3.25,
                      "currency": "USD"
                    },
                    "name": "Soft drink",
                    "sku": "189784563455",
                    "categories": [
                      "string"
                    ],
                    "image": "string",
                    "url": "string",
                    "netUnitPrice": {
                      "amount": 3.25,
                      "currency": "USD"
                    },
                    "tax": 0.1,
                    "quantity": 2.5,
                    "regularPrice": {
                      "amount": 3.25,
                      "currency": "USD"
                    },
                    "discountPrice": {
                      "amount": 15.5,
                      "currency": "USD"
                    },
                    "discountPercent": 0.1,
                    "property1": null,
                    "property2": null
                  }
                ],
                "recordedAt": "2019-02-07T09:53:56.999+00:00",
                "revenue": {
                  "amount": 64.25,
                  "currency": "USD"
                },
                "value": {
                  "amount": 112.25,
                  "currency": "USD"
                },
                "source": "MOBILE",
                "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00"
              }
            ]);

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

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

            xhr.open("POST", "https://api.synerise.com/v4/transactions/batch");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/transactions/batch",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify([
              {
                client: {
                  customId: 'string',
                  id: 433230297,
                  uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                  email: 'string'
                },
                discountAmount: {amount: 0, currency: 'USD'},
                metadata: {promotionCode: 'string', quantityToRedeem: 0},
                orderId: 'be466362-71e9-4bdd-ad11-bfacead5276b',
                paymentInfo: {method: 'CASH'},
                products: [
                  {
                    finalUnitPrice: {amount: 3.25, currency: 'USD'},
                    name: 'Soft drink',
                    sku: '189784563455',
                    categories: ['string'],
                    image: 'string',
                    url: 'string',
                    netUnitPrice: {amount: 3.25, currency: 'USD'},
                    tax: 0.1,
                    quantity: 2.5,
                    regularPrice: {amount: 3.25, currency: 'USD'},
                    discountPrice: {amount: 15.5, currency: 'USD'},
                    discountPercent: 0.1,
                    property1: null,
                    property2: null
                  }
                ],
                recordedAt: '2019-02-07T09:53:56.999+00:00',
                revenue: {amount: 64.25, currency: 'USD'},
                value: {amount: 112.25, currency: 'USD'},
                source: 'MOBILE',
                eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00'
              }
            ]));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('[{"client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"discountAmount":{"amount":0,"currency":"USD"},"metadata":{"promotionCode":"string","quantityToRedeem":0},"orderId":"be466362-71e9-4bdd-ad11-bfacead5276b","paymentInfo":{"method":"CASH"},"products":[{"finalUnitPrice":{"amount":3.25,"currency":"USD"},"name":"Soft drink","sku":"189784563455","categories":["string"],"image":"string","url":"string","netUnitPrice":{"amount":3.25,"currency":"USD"},"tax":0.1,"quantity":2.5,"regularPrice":{"amount":3.25,"currency":"USD"},"discountPrice":{"amount":15.5,"currency":"USD"},"discountPercent":0.1,"property1":null,"property2":null}],"recordedAt":"2019-02-07T09:53:56.999+00:00","revenue":{"amount":64.25,"currency":"USD"},"value":{"amount":112.25,"currency":"USD"},"source":"MOBILE","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00"}]');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/transactions/batch")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[{\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"discountAmount\":{\"amount\":0,\"currency\":\"USD\"},\"metadata\":{\"promotionCode\":\"string\",\"quantityToRedeem\":0},\"orderId\":\"be466362-71e9-4bdd-ad11-bfacead5276b\",\"paymentInfo\":{\"method\":\"CASH\"},\"products\":[{\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"name\":\"Soft drink\",\"sku\":\"189784563455\",\"categories\":[\"string\"],\"image\":\"string\",\"url\":\"string\",\"netUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"tax\":0.1,\"quantity\":2.5,\"regularPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"discountPrice\":{\"amount\":15.5,\"currency\":\"USD\"},\"discountPercent\":0.1,\"property1\":null,\"property2\":null}],\"recordedAt\":\"2019-02-07T09:53:56.999+00:00\",\"revenue\":{\"amount\":64.25,\"currency\":\"USD\"},\"value\":{\"amount\":112.25,\"currency\":\"USD\"},\"source\":\"MOBILE\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\"}]")
              .asString();
  /v4/clients:
    post:
      summary: Create or update a Profile
      description: |
        Create a new profile in the Synerise application database or update an existing one. If you don't have some information about the profile, don't insert a null-value parameter - omit the parameter entirely.

        This is an asynchronous operation. After the request body is validated, the request is added to the queue (HTTP 202).


        ---

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

        **API key permission required:** `API_CLIENT_CREATE`

        **User role permission required:** `client_management: create`
      operationId: CreateAClientInCrm
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: |
          
          In the request body, you must provide at least one of those identifiers: 
          - `email`  
            If [non-unique emails](https://hub.synerise.com/docs/settings/configuration/non-unique-emails/) are enabled, email is NOT an identifier.
          - `phone`  
            Phone is treated as an identifier only if no other identifier is provided. If this is the case and non-unique emails are disabled, an anonymous profile is created with a randomized email placeholder.
          - `customId`
          - `uuid`
        content:
          application/json:
            schema:
              type: object
              allOf:
                - $ref: "#/components/schemas/api-service-CreateClientRequestBody-apiv4"
      responses:
        "202":
          description: Accepted, queued for processing
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                error: Bad Request
                status: 400
                timestamp: 2019-03-18T13:15:39.84Z
                path: /clients
                message: Some fields did not pass validation
                errors:
                  - code: 12082
                    field: countryCode
                    message: Country Code must have 0 or 3 characters as per ISO format.
                    rejectedValue: string
                  - code: 120
                    field: avatarUrl
                    message: "120"
                    rejectedValue: string
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/CreateAClientInCrm
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/clients \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}"

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

            conn.request("POST", "/v4/clients", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "string",
              "phone": "+48111222333",
              "customId": "string",
              "firstName": "string",
              "lastName": "string",
              "displayName": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "avatarUrl": "string",
              "birthDate": "1987-10-24",
              "company": "string",
              "city": "string",
              "address": "string",
              "zipCode": "string",
              "province": "string",
              "countryCode": "PL",
              "sex": "FEMALE",
              "agreements": {
                "email": false,
                "sms": false,
                "push": false,
                "webPush": false,
                "bluetooth": false,
                "rfid": false,
                "wifi": false
              },
              "attributes": {
                "property1": null,
                "property2": null
              },
              "tags": [
                "string"
              ]
            });

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

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

            xhr.open("POST", "https://api.synerise.com/v4/clients");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/clients",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({
              email: 'string',
              phone: '+48111222333',
              customId: 'string',
              firstName: 'string',
              lastName: 'string',
              displayName: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              avatarUrl: 'string',
              birthDate: '1987-10-24',
              company: 'string',
              city: 'string',
              address: 'string',
              zipCode: 'string',
              province: 'string',
              countryCode: 'PL',
              sex: 'FEMALE',
              agreements: {
                email: false,
                sms: false,
                push: false,
                webPush: false,
                bluetooth: false,
                rfid: false,
                wifi: false
              },
              attributes: {property1: null, property2: null},
              tags: ['string']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/clients")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}")
              .asString();
  /v4/clients/merge/from/custom-ids/{sourceCustomIDs}/to/custom-id/{targetCustomID}:
    post:
      summary: Merge profiles by customId
      description: |
        Moves profile UUIDs to a single profile (which must already exist) and removes the profiles that were merged.  

        The event history of the source profiles is moved to the target profile.

        The attributes (data from the `attributes` object) that don't exist in the target profile are copied to the target profile. If an attribute already exists in the target profile, the value from the source profile is lost.

        The properties and tags of the source profiles are lost, even if they don't have a value in the target profile.

         <p style='color:red'><strong>WARNING:</strong> This operation is irreversible. Use it carefully.</p>
         <p style='color:red'><strong>WARNING:</strong> You should not try to merge more than 10-20 profiles at once.</p>

         For more details, see the [Developer Guide](https://hub.synerise.com/developers/api/clients/profiles/merging-profiles/).


        ---

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

        **API key permission required:** `API_MERGEBYCUSTOMID_CLIENT_UPDATE`
      operationId: MergeClientsByCustomId
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientCustomIds-apiv4"
        - $ref: "#/components/parameters/api-service-pathTargetCustomId-apiv4"
        - $ref: "#/components/parameters/api-service-acceptHeader-apiv4"
        - $ref: "#/components/parameters/api-service-contentTypeHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      responses:
        "200":
          description: Request completed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-inResponseClientDetails-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Source and/or target profile(s) not found.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/MergeClientsByCustomId
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api.synerise.com/v4/clients/merge/from/custom-ids/customIdExample,customIdExample2,customIdExample3,customIdExample4,customIdExample5/to/custom-id/customIdExample' \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("POST", "/v4/clients/merge/from/custom-ids/customIdExample,customIdExample2,customIdExample3,customIdExample4,customIdExample5/to/custom-id/customIdExample", headers=headers)

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

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

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

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

            xhr.open("POST", "https://api.synerise.com/v4/clients/merge/from/custom-ids/customIdExample,customIdExample2,customIdExample3,customIdExample4,customIdExample5/to/custom-id/customIdExample");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/clients/merge/from/custom-ids/customIdExample,customIdExample2,customIdExample3,customIdExample4,customIdExample5/to/custom-id/customIdExample",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/clients/merge/from/custom-ids/customIdExample,customIdExample2,customIdExample3,customIdExample4,customIdExample5/to/custom-id/customIdExample');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/clients/merge/from/custom-ids/customIdExample,customIdExample2,customIdExample3,customIdExample4,customIdExample5/to/custom-id/customIdExample")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/clients/merge/from/ids/{fromClientIds}/to/id/{toClientId}:
    post:
      summary: Merge profiles by clientId
      description: |
        Moves profile UUIDs to a single profile (which must already exist) and removes the profiles that were merged.  

        The event history of the source profiles is moved to the target profile.

        The attributes (data from the `attributes` object) that don't exist in the target profile are copied to the target profile. If an attribute already exists in the target profile, the value from the source profile is lost.

        The properties and tags of the source profiles are lost, even if they don't have a value in the target profile.

         <p style='color:red'><strong>WARNING:</strong> This operation is irreversible. Use it carefully.</p>
         <p style='color:red'><strong>WARNING:</strong> You should not try to merge more than 10-20 profiles at once.</p>

         For more details, see the [Developer Guide](https://hub.synerise.com/developers/api/clients/profiles/merging-profiles/).


        ---

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

        **API key permission required:** `API_MERGE_BY_ID_CLIENT_UPDATE`
      operationId: MergeClientsByClientId
      parameters:
        - $ref: "#/components/parameters/api-service-pathFromClientIds-apiv4"
        - $ref: "#/components/parameters/api-service-pathToClientId-apiv4"
        - $ref: "#/components/parameters/api-service-acceptHeader-apiv4"
        - $ref: "#/components/parameters/api-service-contentTypeHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      responses:
        "200":
          description: Request completed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-inResponseClientDetails-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Source and/or target profile(s) not found.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/MergeClientsByClientId
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api.synerise.com/v4/clients/merge/from/ids/434428563,33322211,232212342/to/id/434428563' \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("POST", "/v4/clients/merge/from/ids/434428563,33322211,232212342/to/id/434428563", headers=headers)

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

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

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

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

            xhr.open("POST", "https://api.synerise.com/v4/clients/merge/from/ids/434428563,33322211,232212342/to/id/434428563");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/clients/merge/from/ids/434428563,33322211,232212342/to/id/434428563",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/clients/merge/from/ids/434428563,33322211,232212342/to/id/434428563');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/clients/merge/from/ids/434428563,33322211,232212342/to/id/434428563")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/clients/batch:
    post:
      summary: Batch add or update profiles
      description: |2
         Enqueue a number of add/update operations in the Synerise application database. <br/><br/>If you don't have some information about a profile, don't insert a null-value parameter - omit the parameter entirely. Sending a null value <strong>deletes an attribute</strong> (if it's a custom attribute) or <strong>sets it to null/default value</strong> (if the attribute is Synerise-native).


        The body contains an array of objects to update. The objects are the same as in the *Create a Profile* and *Update a Profile* endpoints.

        <span style='color:red'><strong>IMPORTANT:</strong></span> The request body cannot contain more than 1000 items or exceed 1 MB in size.

        This is an asynchronous operation. After the request body is validated, the request is added to the queue (HTTP 202).

        ---

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

        **API key permission required:** `API_BATCH_CLIENT_CREATE`

        **User role permission required:** `client_management: create`
      operationId: BatchAddOrUpdateClients
      parameters:
        - $ref: "#/components/parameters/api-service-acceptHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: |
          
          Each profile must have at least one of the following identifiers:
          - `email`  
            If [non-unique emails](https://hub.synerise.com/docs/settings/configuration/non-unique-emails/) are enabled, email is NOT an identifier.
          - `phone`  
            Phone number is treated as an identifier only if no other identifier is provided. Then, if a profile with this phone number does not exist and non-unique emails are disabled, an anonymous profile is created.
          - `customId`
          - `uuid`
          - `clientId` (can be used only when updating an existing profile)
        content:
          application/json:
            schema:
              type: array
              minItems: 1
              maxItems: 1000
              items:
                type: object
                properties:
                  clientId:
                    type: integer
                    format: int64
                    description: |
                      This ID can be used only for updating an existing profile.


                      If a profile does not exist and `clientId` is the only provided identifier, the operation returns HTTP 202 and **a profile is not created**. If another identifier is provided, a profile is created with that identifier and a `clientId` generated by the system.
                allOf:
                  - $ref: "#/components/schemas/api-service-CreateClientRequestBody-apiv4"
        required: true
      responses:
        "202":
          description: "Request accepted. IMPORTANT: this does not mean that all profiles were created/updated successfully. The data is sent for further processing in other elements of the infrastructure."
        "207":
          description: Invalid data in some entries. Correct entries are sent for further processing, the invalid ones are rejected.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/api-service-Error-apiv4"
              example:
                - rejectedValue: de73b3490c4-bb8c0d8
                  field: list[0].uuid
                  status: 400
                  message: UUID must be well-formed value as per RFC 4122
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/BatchAddOrUpdateClients
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/clients/batch \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '[{"clientId":0,"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}]'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "[{\"clientId\":0,\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}]"

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

            conn.request("POST", "/v4/clients/batch", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              {
                "clientId": 0,
                "email": "string",
                "phone": "+48111222333",
                "customId": "string",
                "firstName": "string",
                "lastName": "string",
                "displayName": "string",
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "avatarUrl": "string",
                "birthDate": "1987-10-24",
                "company": "string",
                "city": "string",
                "address": "string",
                "zipCode": "string",
                "province": "string",
                "countryCode": "PL",
                "sex": "FEMALE",
                "agreements": {
                  "email": false,
                  "sms": false,
                  "push": false,
                  "webPush": false,
                  "bluetooth": false,
                  "rfid": false,
                  "wifi": false
                },
                "attributes": {
                  "property1": null,
                  "property2": null
                },
                "tags": [
                  "string"
                ]
              }
            ]);

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

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

            xhr.open("POST", "https://api.synerise.com/v4/clients/batch");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/clients/batch",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify([
              {
                clientId: 0,
                email: 'string',
                phone: '+48111222333',
                customId: 'string',
                firstName: 'string',
                lastName: 'string',
                displayName: 'string',
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                avatarUrl: 'string',
                birthDate: '1987-10-24',
                company: 'string',
                city: 'string',
                address: 'string',
                zipCode: 'string',
                province: 'string',
                countryCode: 'PL',
                sex: 'FEMALE',
                agreements: {
                  email: false,
                  sms: false,
                  push: false,
                  webPush: false,
                  bluetooth: false,
                  rfid: false,
                  wifi: false
                },
                attributes: {property1: null, property2: null},
                tags: ['string']
              }
            ]));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('[{"clientId":0,"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}]');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/clients/batch")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[{\"clientId\":0,\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}]")
              .asString();
  /v4/clients/tags:
    get:
      summary: Get all tags
      description: |
        
        Retrieve all tags that can be assigned to profiles.

        This endpoint is available from version 4.1.0

        ---

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

        **API key permission required:** `API_TAGS_CLIENT_READ`

        **User role permission required:** `client_tags: read`
      operationId: GetAllTags
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      responses:
        "200":
          description: A list of tags
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/api-service-Tag-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Tags
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Tags/operation/GetAllTags
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/clients/tags \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = {
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/clients/tags", headers=headers)

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/v4/clients/tags");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/clients/tags",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/clients/tags');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/clients/tags")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/clients/{clientId}:
    get:
      summary: Get profile data
      description: |
        Retrieve profile data by profile ID. If PII protection is enabled and your API key/user doesn't have the required permissions, this endpoint can only return test profiles; other profiles return error 404.

        ---

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

        **API key permission required:** `API_BY_ID_CLIENT_READ`

        **User role permission required:** `client_info: read`
      operationId: GetClientData
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientId-apiv4"
        - $ref: "#/components/parameters/api-service-contentTypeHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      responses:
        "200":
          description: Details of a single profile
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-inResponseClientDetails-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          $ref: "#/components/responses/api-service-404-pii"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/GetClientData
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/clients/434428563 \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = {
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/clients/434428563", headers=headers)

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/v4/clients/434428563");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/clients/434428563",
              "headers": {
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/clients/434428563');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/clients/434428563")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Update a profile (identify by ID)
      description: |
        Change the details of a profile in the Synerise application database. <br/><br/>Sending a null value <strong>deletes an attribute</strong> (if it's a custom attribute) or <strong>sets it to null/default value</strong> (if the attribute is Synerise-native).

        The `attributes` object can be used to add custom attributes of your choice. For example, `"hasDog":true`.

        The `tags` array contains custom tags of your choice.

        This is an asynchronous operation. After the request body is validated, the request is added to the queue (HTTP 202).

        ---

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

        **API key permission required:** `API_BY_ID_CLIENT_UPDATE`

        **User role permission required:** `client_info: update`
      operationId: UpdateAClient
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientId-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-CreateClientRequestBody-apiv4"
        required: true
      responses:
        "202":
          description: Accepted, queued for processing
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                error: Bad Request
                status: 400
                timestamp: 2019-03-21T08:37:34.526Z
                path: /clients/1234
                message: Some fields did not pass validation
                errors:
                  - code: 12053
                    field: uuid
                    message: UUID must be well-formed value as per RFC 4122
                    rejectedValue: "4321"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                timestamp: 2018-06-07T09:48:56.522+00:00
                status: 404
                error: Not Found
                message: Client 525446575 not found
                path: /clients/525446575
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/UpdateAClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/clients/434428563 \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}"

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

            conn.request("POST", "/v4/clients/434428563", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "string",
              "phone": "+48111222333",
              "customId": "string",
              "firstName": "string",
              "lastName": "string",
              "displayName": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "avatarUrl": "string",
              "birthDate": "1987-10-24",
              "company": "string",
              "city": "string",
              "address": "string",
              "zipCode": "string",
              "province": "string",
              "countryCode": "PL",
              "sex": "FEMALE",
              "agreements": {
                "email": false,
                "sms": false,
                "push": false,
                "webPush": false,
                "bluetooth": false,
                "rfid": false,
                "wifi": false
              },
              "attributes": {
                "property1": null,
                "property2": null
              },
              "tags": [
                "string"
              ]
            });

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

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

            xhr.open("POST", "https://api.synerise.com/v4/clients/434428563");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/clients/434428563",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({
              email: 'string',
              phone: '+48111222333',
              customId: 'string',
              firstName: 'string',
              lastName: 'string',
              displayName: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              avatarUrl: 'string',
              birthDate: '1987-10-24',
              company: 'string',
              city: 'string',
              address: 'string',
              zipCode: 'string',
              province: 'string',
              countryCode: 'PL',
              sex: 'FEMALE',
              agreements: {
                email: false,
                sms: false,
                push: false,
                webPush: false,
                bluetooth: false,
                rfid: false,
                wifi: false
              },
              attributes: {property1: null, property2: null},
              tags: ['string']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/clients/434428563")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}")
              .asString();
    delete:
      summary: Delete a profile
      description: |
        Delete a profile from the database.

        ---

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

        **API key permission required:** `API_BY_ID_CLIENT_DELETE`

        **User role permission required:** `client_info: delete`
      operationId: DeleteAClient
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientId-apiv4"
        - $ref: "#/components/parameters/api-service-acceptHeader-apiv4"
        - $ref: "#/components/parameters/api-service-contentTypeHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      responses:
        "202":
          description: Accepted
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                timestamp: 2018-06-07T09:48:56.522+00:00
                status: 404
                error: Not Found
                message: Client 525446575 not found
                path: /clients/525446575
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/DeleteAClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/v4/clients/434428563 \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("DELETE", "/v4/clients/434428563", headers=headers)

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

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

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

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

            xhr.open("DELETE", "https://api.synerise.com/v4/clients/434428563");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/clients/434428563",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/clients/434428563');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/v4/clients/434428563")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/clients/by-email/{clientEmail}:
    post:
      summary: Update a profile (identify by email)
      description: |
        Change the details of a profile in the Synerise application database. <br/><br/>Sending a null value <strong>deletes an attribute</strong> (if it's a custom attribute) or <strong>sets it to null/default value</strong> (if the attribute is Synerise-native).

        The `attributes` object can be used to add custom attributes of your choice. For example, `"hasDog":true`.

        The `tags` array contains custom tags of your choice.

        This is an asynchronous operation. After the request body is validated, the request is added to the queue (HTTP 202).

        ---

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

        **API key permission required:** `API_BY_EMAIL_CLIENT_UPDATE`

        **User role permission required:** `client_info: update`
      operationId: UpdateAClientByEmail
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientEmail-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-CreateClientRequestBody-apiv4"
        required: true
      responses:
        "202":
          description: Accepted, queued for processing
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                error: Bad Request
                status: 400
                timestamp: 2019-03-21T08:37:34.526Z
                path: /clients/by-email/client@synerise.com
                message: Some fields did not pass validation
                errors:
                  - code: 12053
                    field: uuid
                    message: UUID must be well-formed value as per RFC 4122
                    rejectedValue: "4321"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                timestamp: 2018-06-07T09:48:56.522+00:00
                status: 404
                error: Not Found
                message: "No client record found for email: client@synerise.com"
                path: /clients/by-email/client@synerise.com
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/UpdateAClientByEmail
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/clients/by-email/clientemail@synerise.com \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}"

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

            conn.request("POST", "/v4/clients/by-email/clientemail@synerise.com", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "string",
              "phone": "+48111222333",
              "customId": "string",
              "firstName": "string",
              "lastName": "string",
              "displayName": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "avatarUrl": "string",
              "birthDate": "1987-10-24",
              "company": "string",
              "city": "string",
              "address": "string",
              "zipCode": "string",
              "province": "string",
              "countryCode": "PL",
              "sex": "FEMALE",
              "agreements": {
                "email": false,
                "sms": false,
                "push": false,
                "webPush": false,
                "bluetooth": false,
                "rfid": false,
                "wifi": false
              },
              "attributes": {
                "property1": null,
                "property2": null
              },
              "tags": [
                "string"
              ]
            });

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

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

            xhr.open("POST", "https://api.synerise.com/v4/clients/by-email/clientemail@synerise.com");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/clients/by-email/clientemail@synerise.com",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({
              email: 'string',
              phone: '+48111222333',
              customId: 'string',
              firstName: 'string',
              lastName: 'string',
              displayName: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              avatarUrl: 'string',
              birthDate: '1987-10-24',
              company: 'string',
              city: 'string',
              address: 'string',
              zipCode: 'string',
              province: 'string',
              countryCode: 'PL',
              sex: 'FEMALE',
              agreements: {
                email: false,
                sms: false,
                push: false,
                webPush: false,
                bluetooth: false,
                rfid: false,
                wifi: false
              },
              attributes: {property1: null, property2: null},
              tags: ['string']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/clients/by-email/clientemail@synerise.com');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/clients/by-email/clientemail@synerise.com")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}")
              .asString();
  /v4/clients/by-customid/{customId}:
    post:
      summary: Update a profile (identify by customId)
      description: |
        Change the details of a profile in the Synerise application database. <br/><br/>Sending a null value <strong>deletes an attribute</strong> (if it's a custom attribute) or <strong>sets it to null/default value</strong> (if the attribute is Synerise-native).
         
        The `attributes` object can be used to add custom attributes of your choice. For example, `"hasDog":true`.

        The `tags` array contains custom tags of your choice.

        This is an asynchronous operation. After the request body is validated, the request is added to the queue (HTTP 202).

        ---

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

        **API key permission required:** `API_BY_CUSTOM_ID_CLIENT_UPDATE`

        **User role permission required:** `client_info: update`
      operationId: UpdateAClientByCustomId
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientCustomId-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-CreateClientRequestBody-apiv4"
        required: true
      responses:
        "202":
          description: Accepted, queued for processing
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                error: Bad Request
                status: 400
                timestamp: 2019-03-21T08:37:34.526Z
                path: /clients/by-customid/customId1234
                message: Some fields did not pass validation
                errors:
                  - code: 12053
                    field: uuid
                    message: UUID must be well-formed value as per RFC 4122
                    rejectedValue: "4321"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                timestamp: 2018-06-07T09:48:56.522+00:00
                status: 404
                error: Not Found
                message: "No client record found for customId: customId1234"
                path: /clients/by-customid/customId1234
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/UpdateAClientByCustomId
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/clients/by-customid/customIdExample \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}"

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

            conn.request("POST", "/v4/clients/by-customid/customIdExample", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "string",
              "phone": "+48111222333",
              "customId": "string",
              "firstName": "string",
              "lastName": "string",
              "displayName": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "avatarUrl": "string",
              "birthDate": "1987-10-24",
              "company": "string",
              "city": "string",
              "address": "string",
              "zipCode": "string",
              "province": "string",
              "countryCode": "PL",
              "sex": "FEMALE",
              "agreements": {
                "email": false,
                "sms": false,
                "push": false,
                "webPush": false,
                "bluetooth": false,
                "rfid": false,
                "wifi": false
              },
              "attributes": {
                "property1": null,
                "property2": null
              },
              "tags": [
                "string"
              ]
            });

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

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

            xhr.open("POST", "https://api.synerise.com/v4/clients/by-customid/customIdExample");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/clients/by-customid/customIdExample",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({
              email: 'string',
              phone: '+48111222333',
              customId: 'string',
              firstName: 'string',
              lastName: 'string',
              displayName: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              avatarUrl: 'string',
              birthDate: '1987-10-24',
              company: 'string',
              city: 'string',
              address: 'string',
              zipCode: 'string',
              province: 'string',
              countryCode: 'PL',
              sex: 'FEMALE',
              agreements: {
                email: false,
                sms: false,
                push: false,
                webPush: false,
                bluetooth: false,
                rfid: false,
                wifi: false
              },
              attributes: {property1: null, property2: null},
              tags: ['string']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/clients/by-customid/customIdExample');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/clients/by-customid/customIdExample")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}")
              .asString();
  /v4/clients/by-custom-id/{customId}:
    delete:
      summary: Delete a profile (identify by customId)
      description: |
        Delete a profile from the database.

        ---

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

        **API key permission required:** `API_BY_ID_CLIENT_DELETE`

        **User role permission required:** `client_info: delete`
      operationId: DeleteAClientByCustomId
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientCustomId-apiv4"
        - $ref: "#/components/parameters/api-service-contentTypeHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      responses:
        "202":
          description: Accepted
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                timestamp: 2018-06-07T09:48:56.522+00:00
                status: 404
                error: Not Found
                message: "No client record found for customId: customId1234"
                path: /clients/by-customid/customId1234
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/DeleteAClientByCustomId
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/v4/clients/by-custom-id/customIdExample \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = {
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("DELETE", "/v4/clients/by-custom-id/customIdExample", headers=headers)

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

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

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

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

            xhr.open("DELETE", "https://api.synerise.com/v4/clients/by-custom-id/customIdExample");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/clients/by-custom-id/customIdExample",
              "headers": {
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/clients/by-custom-id/customIdExample');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/v4/clients/by-custom-id/customIdExample")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/clients/{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/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/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();
  /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:
    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();
    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();
    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:
    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();
    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();
  /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}:
    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();
    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();
    delete:
      tags:
        - Catalogs
      summary: Delete single item by database ID
      description: |
        Delete a single item by ID.

        ---

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

        **API key permission required:** `CATALOGS_CATALOG_DELETE`

        **User role permission required:** `assets_catalogs: delete`
      operationId: deleteItem
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
        - $ref: "#/components/parameters/catalogs-itemDatabaseId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: boolean
                    description: "`true` if the operation was successful."
                  metaData:
                    $ref: "#/components/schemas/catalogs-responseMeta"
        "401":
          $ref: "#/components/responses/catalogs-401"
        "403":
          $ref: "#/components/responses/catalogs-403"
        "404":
          $ref: "#/components/responses/catalogs-404"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/deleteItem
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

            conn.request("DELETE", "/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D", headers=headers)

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

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

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

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

            xhr.open("DELETE", "https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D');
            $request->setMethod(HTTP_METH_DELETE);

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /catalogs/items:
    get:
      tags:
        - Catalogs
      summary: Get all items
      description: |
        Retrieve all items from all catalogs in the Workspace.

        ---

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

        **API key permission required:** `CATALOGS_CATALOG_READ`

        **User role permission required:** `assets_catalogs: read`
      operationId: getItemsByBusinessProfileid
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-queryOffset"
        - $ref: "#/components/parameters/catalogs-queryLimit"
      responses:
        "200":
          description: A list of items in the Workspace
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: Details of the items
                    items:
                      $ref: "#/components/schemas/catalogs-item"
                  metaData:
                    $ref: "#/components/schemas/catalogs-responseMeta"
        "401":
          $ref: "#/components/responses/catalogs-401"
        "403":
          $ref: "#/components/responses/catalogs-403"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/getItemsByBusinessProfileid
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/catalogs/items?offset=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

            conn.request("GET", "/catalogs/items?offset=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE", headers=headers)

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/catalogs/items?offset=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/catalogs/items?offset=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

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

            $request->setQueryData([
              'offset' => 'SOME_INTEGER_VALUE',
              'limit' => 'SOME_INTEGER_VALUE'
            ]);

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/catalogs/items?offset=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /catalogs/bags/{catalogId}/mappings:
    post:
      tags:
        - Catalogs
      summary: Add mapping
      description: |
        Add a new mapping. Mappings can be used to enrich events with data from catalogs.

        For example, you can map the product's SKU from the "product.buy" event to the column in the catalog that includes the SKU. Whenever someone purchases an item with that SKU, you can extract data from the catalog (for example, the product's brand and category) and show that additional in the event log in the Synerise GUI.

        ---

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

        **API key permission required:** `CATALOGS_MAPPING_CATALOG_CREATE`

        **User role permission required:** `assets_catalogs: create`
      operationId: addMapping
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/catalogs-eventData"
      responses:
        "200":
          description: Mapping data
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/catalogs-mapper"
                  metaData:
                    $ref: "#/components/schemas/catalogs-responseMeta"
        "400":
          $ref: "#/components/responses/catalogs-400"
        "401":
          $ref: "#/components/responses/catalogs-401"
        "403":
          $ref: "#/components/responses/catalogs-403"
        "404":
          $ref: "#/components/responses/catalogs-404"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/addMapping
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/mappings \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"action":"transaction.charge","paramKey":"sku"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"action\":\"transaction.charge\",\"paramKey\":\"sku\"}"

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

            conn.request("POST", "/catalogs/bags/%7BcatalogId%7D/mappings", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "action": "transaction.charge",
              "paramKey": "sku"
            });

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

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

            xhr.open("POST", "https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/mappings");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/catalogs/bags/%7BcatalogId%7D/mappings",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({action: 'transaction.charge', paramKey: 'sku'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/mappings');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"action":"transaction.charge","paramKey":"sku"}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/mappings")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"action\":\"transaction.charge\",\"paramKey\":\"sku\"}")
              .asString();
  /catalogs/mappings:
    get:
      tags:
        - Catalogs
      summary: Get all mappings
      description: |
        Retrieve all mappings from the Workspace.

        ---

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

        **API key permission required:** `CATALOGS_MAPPING_CATALOG_READ`

        **User role permission required:** `assets_catalogs: read`
      operationId: getMappingsByBP
      security:
        - JWT: []
      responses:
        "200":
          description: List of mappings
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: A list of mappings
                    items:
                      $ref: "#/components/schemas/catalogs-mapper"
                  metaData:
                    $ref: "#/components/schemas/catalogs-responseMeta"
        "401":
          $ref: "#/components/responses/catalogs-401"
        "403":
          $ref: "#/components/responses/catalogs-403"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/getMappingsByBP
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/catalogs/mappings \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

            conn.request("GET", "/catalogs/mappings", headers=headers)

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/catalogs/mappings");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/catalogs/mappings",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

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

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/catalogs/mappings")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /catalogs/mappings/{bpActionParamKey}:
    delete:
      tags:
        - Catalogs
      summary: Delete mapping
      description: |
        Delete a single mapping.

        ---

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

        **API key permission required:** `CATALOGS_MAPPING_CATALOG_DELETE`

        **User role permission required:** `assets_catalogs: delete`
      operationId: deleteMappingBykey
      security:
        - JWT: []
      parameters:
        - in: path
          name: bpActionParamKey
          description: The unique identifier of the mapping
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Deletion status
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: boolean
                    description: "`true` if successful"
                  metaData:
                    $ref: "#/components/schemas/catalogs-responseMeta"
        "401":
          $ref: "#/components/responses/catalogs-401"
        "403":
          $ref: "#/components/responses/catalogs-403"
        "404":
          $ref: "#/components/responses/catalogs-404"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/deleteMappingBykey
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/catalogs/mappings/%7BbpActionParamKey%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

            conn.request("DELETE", "/catalogs/mappings/%7BbpActionParamKey%7D", headers=headers)

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

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

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

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

            xhr.open("DELETE", "https://api.synerise.com/catalogs/mappings/%7BbpActionParamKey%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/catalogs/mappings/%7BbpActionParamKey%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/catalogs/mappings/%7BbpActionParamKey%7D');
            $request->setMethod(HTTP_METH_DELETE);

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/catalogs/mappings/%7BbpActionParamKey%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /catalogs/itemDetail:
    get:
      tags:
        - Catalogs
      summary: Get single item by unique key
      description: |
        Retrieve a single item from a catalog by using the value of the unique identifier (key) in the catalog. If you want to retrieve an item by its ID in the Synerise database, use [/bags/{catalogId}/items/{itemId}](#operation/getItem).

        ---

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

        **API key permission required:** `ITEMS_COLLECTOR_CATALOG_READ`

        **User role permission required:** `assets_catalogs: read`
      operationId: getItemDetailByKey
      security:
        - JWT: []
      parameters:
        - name: catalogName
          in: query
          required: true
          description: Name of the catalog
          schema:
            type: string
        - name: key
          in: query
          required: true
          description: |
            Value of the unique identifier of the item in the catalog. When you retrieve an item using [this endpoint](#operation/getItemsByBag), the identifier is in the `itemKey` field.

            ```
            {
                "creationDate": "2020-09-30T11:31:16.314Z",
                "id": 73753,
                "itemKey": "uniqueValue", // this is the value of the key
                "lastModified": null,
                "value": "{\"exampleKey\":\"uniqueValue\",\"exampleKey2\":\"exampleValue\"}",
                "bag": {
                    "author": "authorName",
                    "creationDate": "2020-09-30T10:52:31.264Z",
                    "id": 1053,
                    "lastModified": "2020-09-30T11:41:11.808Z",
                    "name": "sampleCatalog"
                }
            },
            ```
          schema:
            type: string
      responses:
        "200":
          description: A single item
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    description: The column values from this item's catalog row.
                    properties:
                      itemId:
                        type: string
                        description: Unique ID, equal to the `itemKey` used in the request to this endpoint.
                    additionalProperties:
                      description: Column values
                  metaData:
                    $ref: "#/components/schemas/catalogs-responseMeta"
        "401":
          $ref: "#/components/responses/catalogs-401"
        "403":
          $ref: "#/components/responses/catalogs-403"
        "404":
          $ref: "#/components/responses/catalogs-404"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/getItemDetailByKey
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/catalogs/itemDetail?catalogName=SOME_STRING_VALUE&key=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

            conn.request("GET", "/catalogs/itemDetail?catalogName=SOME_STRING_VALUE&key=SOME_STRING_VALUE", headers=headers)

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/catalogs/itemDetail?catalogName=SOME_STRING_VALUE&key=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/catalogs/itemDetail?catalogName=SOME_STRING_VALUE&key=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

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

            $request->setQueryData([
              'catalogName' => 'SOME_STRING_VALUE',
              'key' => 'SOME_STRING_VALUE'
            ]);

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/catalogs/itemDetail?catalogName=SOME_STRING_VALUE&key=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /catalogs/v2/bags/{catalogId}/items:
    delete:
      tags:
        - Catalogs
      summary: Delete all items from a catalog
      description: |
        Delete all the contents of a catalog.

        Information about the keys (columns) remains.


        ---

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

        **API key permission required:** `CATALOGS_CATALOG_DELETE`

        **User role permission required:** `assets_catalogs: delete`
      operationId: deleteBagsItemsV2
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
      responses:
        "200":
          description: Items deleted. The `metaData` object always shows a `totalCount` of 1, regardless of the number of deleted items.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: string
                    format: uuid
                    description: ID of the deletion job
                  metaData:
                    $ref: "#/components/schemas/catalogs-responseMeta"
        4xx:
          $ref: "#/components/responses/catalogs-400generic"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/deleteBagsItemsV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/items \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

            conn.request("DELETE", "/catalogs/v2/bags/%7BcatalogId%7D/items", headers=headers)

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

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

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

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

            xhr.open("DELETE", "https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/items");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/catalogs/v2/bags/%7BcatalogId%7D/items",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/items');
            $request->setMethod(HTTP_METH_DELETE);

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/items")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /catalogs/v2/bags/{catalogId}/items/batch:
    delete:
      tags:
        - Catalogs
      summary: Delete items by itemKeys
      description: |
        Delete items by itemKeys (unique identifier of an item in the catalog, for example a product's SKU). In the Synerise Portal, it's called the **Primary key**.

        ---

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

        **API key permission required:** `CATALOGS_CATALOG_DELETE`

        **User role permission required:** `assets_catalogs: delete`
      operationId: deleteItemsByItemKeys
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
      requestBody:
        description: Array of itemKeys
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
      responses:
        "204":
          description: No Content
        "401":
          $ref: "#/components/responses/catalogs-401"
        "403":
          $ref: "#/components/responses/catalogs-403"
        "404":
          $ref: "#/components/responses/catalogs-404"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/deleteItemsByItemKeys
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/items/batch \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '["string"]'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "[\"string\"]"

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

            conn.request("DELETE", "/catalogs/v2/bags/%7BcatalogId%7D/items/batch", payload, headers)

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

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

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

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

            xhr.open("DELETE", "https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/items/batch");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/catalogs/v2/bags/%7BcatalogId%7D/items/batch",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify(['string']));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/items/batch');
            $request->setMethod(HTTP_METH_DELETE);

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

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/items/batch")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[\"string\"]")
              .asString();
  /catalogs/v2/bags/{catalogId}/enable/filtering:
    patch:
      tags:
        - Catalogs
      summary: Enable filtering
      description: |
        Enable filtering for a catalog on selected fields

        ---

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

        **API key permission required:** `CATALOGS_CATALOG_UPDATE`

        **User role permission required:** `assets_catalogs: update`
      operationId: enableFilteringV2
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/catalogs-enableFilteringRequest"
      responses:
        "200":
          description: Upload status
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: string
                    format: uuid
                  metaData:
                    $ref: "#/components/schemas/catalogs-responseMeta"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/enableFilteringV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PATCH \
              --url https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/enable/filtering \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"fields":["string"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"fields\":[\"string\"]}"

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

            conn.request("PATCH", "/catalogs/v2/bags/%7BcatalogId%7D/enable/filtering", payload, headers)

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

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

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

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

            xhr.open("PATCH", "https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/enable/filtering");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "PATCH",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/catalogs/v2/bags/%7BcatalogId%7D/enable/filtering",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({fields: ['string']}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            HttpRequest::methodRegister('PATCH');
            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/enable/filtering');
            $request->setMethod(HttpRequest::HTTP_METH_PATCH);

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

            $request->setBody('{"fields":["string"]}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.patch("https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/enable/filtering")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"fields\":[\"string\"]}")
              .asString();
  /catalogs/v2/bags/{catalogId}/disable/filtering:
    patch:
      tags:
        - Catalogs
      summary: Disable filtering
      description: |
        Disable filtering for a catalog on selected fields

        ---

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

        **API key permission required:** `CATALOGS_CATALOG_UPDATE`

        **User role permission required:** `assets_catalogs: update`
      operationId: disableFilteringV2
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/catalogs-disableFilteringRequest"
      responses:
        "200":
          description: Number of rows changed
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: integer
                  metaData:
                    $ref: "#/components/schemas/catalogs-responseMeta"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/disableFilteringV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PATCH \
              --url https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/disable/filtering \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"removeFilters":true}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

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

            conn.request("PATCH", "/catalogs/v2/bags/%7BcatalogId%7D/disable/filtering", payload, headers)

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

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

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

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

            xhr.open("PATCH", "https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/disable/filtering");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "PATCH",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/catalogs/v2/bags/%7BcatalogId%7D/disable/filtering",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({removeFilters: true}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            HttpRequest::methodRegister('PATCH');
            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/disable/filtering');
            $request->setMethod(HttpRequest::HTTP_METH_PATCH);

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

            $request->setBody('{"removeFilters":true}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.patch("https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/disable/filtering")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"removeFilters\":true}")
              .asString();
  /catalogs/v1/async/bags/{catalogId}/item:
    post:
      tags:
        - Catalogs
      summary: Add or update item asynchronously
      description: |
        Add a single item asynchronously to the catalog. If the item already exists, it's entirely overwritten by the item you send.

        Asynchronous requests are processed according to the time they reach the service.  
        This means that requests to synchronous endpoints (for example, [`/bags/{catalogId}/items/{itemId}`](#operation/updateItem) may overwrite asynchronous operations which were sent earlier and queued due to high traffic.  
        This behavior also applies to requests from Automation and AI feed synchronization, which use the asynchronous mechanism.

        The request body can't exceed 256KB.


        ---

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

        **API key permissions required (at least one):** `CATALOGS_ITEM_BATCH_CREATE`, `CATALOGS_ITEM_BATCH_CATALOG_CREATE`

        **User role permission required:** `assets_catalogs: create`
      operationId: addItemAsync
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
      requestBody:
        description: JSON object with any number of key/value pairs
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/catalogs-addItem"
      responses:
        "204":
          description: Operation added to queue
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/addItemAsync
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/item \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"itemKey":"sku1357","value":{"itemCategory":"smartphone","itemColor":"blue"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}"

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

            conn.request("POST", "/catalogs/v1/async/bags/%7BcatalogId%7D/item", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "itemKey": "sku1357",
              "value": {
                "itemCategory": "smartphone",
                "itemColor": "blue"
              }
            });

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

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

            xhr.open("POST", "https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/item");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/catalogs/v1/async/bags/%7BcatalogId%7D/item",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({itemKey: 'sku1357', value: {itemCategory: 'smartphone', itemColor: 'blue'}}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/item');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"itemKey":"sku1357","value":{"itemCategory":"smartphone","itemColor":"blue"}}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/item")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}")
              .asString();
    patch:
      tags:
        - Catalogs
      summary: Add or update (partial) item asynchronously
      description: |
        Update a single item asynchronously to the catalog. If the item doesn't exist, it will be created.

        This endpoint allows you to perform partial updates - you can send only the properties that you want to add/modify, instead of sending the entire item.

        Asynchronous requests are processed according to the time they reach the service.  
        This means that requests to synchronous endpoints (for example, [`/bags/{catalogId}/items/{itemId}`](#operation/updateItem) may overwrite asynchronous operations which were sent earlier and queued due to high traffic.  
        This behavior also applies to requests from Automation and AI feed synchronization, which use the asynchronous mechanism.

        The request body can't exceed 256KB.


        ---

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

        **API key permissions required (at least one):** `CATALOGS_ITEM_BATCH_UPDATE`, `CATALOGS_ITEM_BATCH_CATALOG_UPDATE`

        **User role permission required:** `assets_catalogs: update`
      operationId: updateItemAsync
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
      requestBody:
        description: JSON object with any number of key/value pairs
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/catalogs-addItem"
      responses:
        "204":
          description: Operation added to queue
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/updateItemAsync
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PATCH \
              --url https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/item \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"itemKey":"sku1357","value":{"itemCategory":"smartphone","itemColor":"blue"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}"

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

            conn.request("PATCH", "/catalogs/v1/async/bags/%7BcatalogId%7D/item", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "itemKey": "sku1357",
              "value": {
                "itemCategory": "smartphone",
                "itemColor": "blue"
              }
            });

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

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

            xhr.open("PATCH", "https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/item");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "PATCH",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/catalogs/v1/async/bags/%7BcatalogId%7D/item",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({itemKey: 'sku1357', value: {itemCategory: 'smartphone', itemColor: 'blue'}}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            HttpRequest::methodRegister('PATCH');
            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/item');
            $request->setMethod(HttpRequest::HTTP_METH_PATCH);

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

            $request->setBody('{"itemKey":"sku1357","value":{"itemCategory":"smartphone","itemColor":"blue"}}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.patch("https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/item")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}")
              .asString();
  /catalogs/v1/async/bags/{catalogId}/items:
    post:
      tags:
        - Catalogs
      summary: Batch add or update items asynchronously
      description: |
        Add a number of items asynchronously at once. If an item already exists, it's entirely overwritten by the item you send.

        Asynchronous requests are processed according to the time they reach the service.  
        This means that requests to synchronous endpoints (for example, [`/bags/{catalogId}/items/{itemId}`](#operation/updateItem) may overwrite asynchronous operations which were sent earlier and queued due to high traffic.  
        This behavior also applies to requests from Automation and AI feed synchronization, which use the asynchronous mechanism.

        The request body can't exceed 256KB.


        ---

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

        **API key permissions required (at least one):** `CATALOGS_ITEM_BATCH_CREATE`, `CATALOGS_ITEM_BATCH_CATALOG_CREATE`

        **User role permission required:** `assets_catalogs: create`
      operationId: addItemsBatchAsync
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
      requestBody:
        description: JSON object with any number of key/value pairs
        required: true
        content:
          application/json:
            schema:
              type: array
              maxItems: 200
              items:
                $ref: "#/components/schemas/catalogs-addItem"
      responses:
        "204":
          description: Operation added to queue
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/addItemsBatchAsync
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/items \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '[{"itemKey":"sku1357","value":{"itemCategory":"smartphone","itemColor":"blue"}}]'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "[{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}]"

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

            conn.request("POST", "/catalogs/v1/async/bags/%7BcatalogId%7D/items", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              {
                "itemKey": "sku1357",
                "value": {
                  "itemCategory": "smartphone",
                  "itemColor": "blue"
                }
              }
            ]);

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

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

            xhr.open("POST", "https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/items");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/catalogs/v1/async/bags/%7BcatalogId%7D/items",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify([{itemKey: 'sku1357', value: {itemCategory: 'smartphone', itemColor: 'blue'}}]));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/items');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('[{"itemKey":"sku1357","value":{"itemCategory":"smartphone","itemColor":"blue"}}]');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/items")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}]")
              .asString();
    patch:
      tags:
        - Catalogs
      summary: Batch add or update (partial) items asynchronously
      description: |
        Update a number of items asynchronously at once. If an item doesn't exist, it will be created.

        This endpoint allows you to perform partial updates - you can send only the properties that you want to add/modify, instead of sending the entire item.

        Asynchronous requests are processed according to the time they reach the service.  
        This means that requests to synchronous endpoints (for example, [`/bags/{catalogId}/items/{itemId}`](#operation/updateItem) may overwrite asynchronous operations which were sent earlier and queued due to high traffic.  
        This behavior also applies to requests from Automation and AI feed synchronization, which use the asynchronous mechanism.

        The request body can't exceed 256KB.


        ---

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

        **API key permissions required (at least one):** `CATALOGS_ITEM_BATCH_UPDATE`, `CATALOGS_ITEM_BATCH_CATALOG_UPDATE`

        **User role permission required:** `assets_catalogs: update`
      operationId: updateItemsBatchAsync
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/catalogs-pathCatalogId"
      requestBody:
        description: JSON object with any number of key/value pairs
        required: true
        content:
          application/json:
            schema:
              type: array
              maxItems: 200
              items:
                $ref: "#/components/schemas/catalogs-addItem"
      responses:
        "204":
          description: Operation added to queue
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/updateItemsBatchAsync
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PATCH \
              --url https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/items \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '[{"itemKey":"sku1357","value":{"itemCategory":"smartphone","itemColor":"blue"}}]'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "[{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}]"

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

            conn.request("PATCH", "/catalogs/v1/async/bags/%7BcatalogId%7D/items", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              {
                "itemKey": "sku1357",
                "value": {
                  "itemCategory": "smartphone",
                  "itemColor": "blue"
                }
              }
            ]);

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

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

            xhr.open("PATCH", "https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/items");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "PATCH",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/catalogs/v1/async/bags/%7BcatalogId%7D/items",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify([{itemKey: 'sku1357', value: {itemCategory: 'smartphone', itemColor: 'blue'}}]));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            HttpRequest::methodRegister('PATCH');
            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/items');
            $request->setMethod(HttpRequest::HTTP_METH_PATCH);

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

            $request->setBody('[{"itemKey":"sku1357","value":{"itemCategory":"smartphone","itemColor":"blue"}}]');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.patch("https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/items")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}]")
              .asString();
  /crm/v1/clients/{clientId}/contacts:
    get:
      deprecated: true
      tags:
        - Profile management
      summary: Get Profile details
      description: |
        <span style="color:red">This method is deprecated. It will be disabled on August 30, 2026.</span>  

        You can use these methods instead:
          - [GET /v4/clients/{clientId}](#operation/GetClientData)
          - [GET /v4/clients/{identifierType}/{identifierValue}](#operation/FindAClient)

        Retrieve the details of a Profile.


        ---

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

        **API key permission required:** `CRM_DETAILS_CLIENT_READ`

        **User role permission required:** `client_info: read`
      operationId: getClient
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/crm-pathClientId"
      responses:
        "200":
          description: Profile details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/crm-ClientDetails"
        "404":
          $ref: "#/components/responses/crm-404-pii"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/getClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/crm/v1/clients/%7BclientId%7D/contacts \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

            conn.request("GET", "/crm/v1/clients/%7BclientId%7D/contacts", headers=headers)

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/crm/v1/clients/%7BclientId%7D/contacts");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/crm/v1/clients/%7BclientId%7D/contacts",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/crm/v1/clients/%7BclientId%7D/contacts');
            $request->setMethod(HTTP_METH_GET);

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/crm/v1/clients/%7BclientId%7D/contacts")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /crm/v1/contacts/{clientId}:
    put:
      deprecated: true
      tags:
        - Profile management
      summary: Update Profile
      description: |
        <span style="color:red">This method is deprecated. It will be disabled on August 16, 2026</span>  
        Use one of these endpoints instead:
          - [POST /v4/clients/{clientId}](#operation/UpdateAClient)
          - [POST /v4/clients/by-email/{clientEmail}](#operation/UpdateAClientByEmail)
          - [POST /v4/clients/by-customid/{customId}](#operation/UpdateAClientByCustomId)

        Sending a null value **deletes** an attribute (if it's a custom attribute) or **sets it to null/default value** (if the attribute is Synerise-native)


        ---

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

        **API key permission required:** `CRM_CLIENT_UPDATE`

        **User role permission required:** `client_management: update`
      operationId: updateClient
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/crm-pathClientId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/crm-CustomerCommon"
        required: true
      responses:
        "200":
          description: Profile details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/crm-ClientDetails"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/updateClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/crm/v1/contacts/%7BclientId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string","firstname":"string","lastName":"string","custom_identify":"string","company":"string","phone":"string","address":"string","birthdate":"2019-08-24","city":"string","zipCode":"string","province":"string","country_id":"string","countryCode":"PL","avatarUrl":"string","sex":"0","tags":["string"],"additionalProperties":null}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\",\"firstname\":\"string\",\"lastName\":\"string\",\"custom_identify\":\"string\",\"company\":\"string\",\"phone\":\"string\",\"address\":\"string\",\"birthdate\":\"2019-08-24\",\"city\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"country_id\":\"string\",\"countryCode\":\"PL\",\"avatarUrl\":\"string\",\"sex\":\"0\",\"tags\":[\"string\"],\"additionalProperties\":null}"

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

            conn.request("PUT", "/crm/v1/contacts/%7BclientId%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "email": "string",
              "firstname": "string",
              "lastName": "string",
              "custom_identify": "string",
              "company": "string",
              "phone": "string",
              "address": "string",
              "birthdate": "2019-08-24",
              "city": "string",
              "zipCode": "string",
              "province": "string",
              "country_id": "string",
              "countryCode": "PL",
              "avatarUrl": "string",
              "sex": "0",
              "tags": [
                "string"
              ],
              "additionalProperties": null
            });

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

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

            xhr.open("PUT", "https://api.synerise.com/crm/v1/contacts/%7BclientId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/crm/v1/contacts/%7BclientId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              email: 'string',
              firstname: 'string',
              lastName: 'string',
              custom_identify: 'string',
              company: 'string',
              phone: 'string',
              address: 'string',
              birthdate: '2019-08-24',
              city: 'string',
              zipCode: 'string',
              province: 'string',
              country_id: 'string',
              countryCode: 'PL',
              avatarUrl: 'string',
              sex: '0',
              tags: ['string'],
              additionalProperties: null
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/crm/v1/contacts/%7BclientId%7D');
            $request->setMethod(HTTP_METH_PUT);

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

            $request->setBody('{"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string","firstname":"string","lastName":"string","custom_identify":"string","company":"string","phone":"string","address":"string","birthdate":"2019-08-24","city":"string","zipCode":"string","province":"string","country_id":"string","countryCode":"PL","avatarUrl":"string","sex":"0","tags":["string"],"additionalProperties":null}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.put("https://api.synerise.com/crm/v1/contacts/%7BclientId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\",\"firstname\":\"string\",\"lastName\":\"string\",\"custom_identify\":\"string\",\"company\":\"string\",\"phone\":\"string\",\"address\":\"string\",\"birthdate\":\"2019-08-24\",\"city\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"country_id\":\"string\",\"countryCode\":\"PL\",\"avatarUrl\":\"string\",\"sex\":\"0\",\"tags\":[\"string\"],\"additionalProperties\":null}")
              .asString();
  /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();
  /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();
  /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}:
    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();
    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();
  /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();
components:
  securitySchemes:
    JWT:
      type: http
      scheme: bearer
      description: |-
        JWT Bearer token. The header looks like this: `Bearer {JWT}`

        Remember to include the space between 'Bearer' and the token.

        Generate a token via the **Authorization** endpoints.
    TrackerKey:
      type: apiKey
      name: token
      in: query
      description: Authorization by tracker key sent as a query parameter. This is the same key as used in the website tracking code.
  schemas:
    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-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-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-SourceIp:
      type: string
      description: IP of the device which sent the event
    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-ClientId:
      type: number
      description: Profile's ID
    activities-api-ClientUuid:
      type: string
      description: Profile's UUID
    activities-api-UniqueInt:
      type: integer
      description: Unique identifier of the event
      example: 1245924049
    activities-api-EventUUID:
      type: string
      description: UUID of the event
      example: 482af443-7f6f-4b80-b4ac-a7db5a2f543a
    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-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-userAgent:
      type: object
      description: User Agent details
      properties:
        system:
          type: string
          description: Operating System
        browser:
          description: Browser
          type: string
    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-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-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-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-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-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-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-UniqueStr:
      type: string
      description: Unique identifier of the event
      example: "1245924049"
    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-MappingId:
      type: number
      description: ID of the mapping
    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-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-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-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-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-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-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"
    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-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-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-IdentifierValue:
      type: string
      description: Value of the identifier selected in `identifierType`
    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-calculatedAnalytic:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/analytics-analyticId"
        name:
          $ref: "#/components/schemas/analytics-analyticName"
        result:
          description: Result of the analysis
          oneOf:
            - $ref: "#/components/schemas/analytics-successResult"
            - $ref: "#/components/schemas/analytics-failureResult"
      required:
        - id
        - name
        - result
    analytics-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-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-analyticName:
      type: string
      description: Name of the analysis
      example: Nice people who read the documentation
    analytics-analyticId:
      type: string
      format: uuid
      description: UUID of the analysis
      example: 5370bf3c-2dfa-4e89-98ff-07100cffee6c
    analytics-identifierValue:
      type: string
      description: Value of the selected identifier. Note that IDs must also be sent as strings.
    analytics-meta:
      type: object
      description: Pagination metadata
      properties:
        links:
          type: array
          description: Links to the neighboring pages and the first page
          items:
            $ref: "#/components/schemas/analytics-link"
        limit:
          type: integer
          format: int32
          description: Limit of items per page
        count:
          type: integer
          description: Currently unused
    analytics-link:
      type: object
      properties:
        url:
          type: string
          description: URL of the page, used for navigation
        rel:
          type: string
          description: The type of relation to the current page. `first` is always the first page.
          enum:
            - first
            - prev
            - next
      required:
        - rel
        - url
    analytics-ExpressionListItem:
      allOf:
        - type: object
          properties:
            action:
              $ref: "#/components/schemas/analytics-Action"
              nullable: true
            type:
              $ref: "#/components/schemas/analytics-ExpressionType"
          required:
            - action
            - type
        - $ref: "#/components/schemas/analytics-ListAnalyticsItemCommon"
    analytics-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-variables:
      type: array
      description: Dynamic keys used in this analysis
      items:
        type: object
        properties:
          name:
            type: string
            description: The name of the dynamic key
            example: event.params.PARAMNAME
          value:
            type: string
            description: The default value to use if the parameter referenced by `name` doesn't exist.
    analytics-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-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-createdAt:
      type: string
      format: date-time
      description: Creation time
    analytics-usedAt:
      type: string
      format: date-time
      description: The date and time when the item was last used
      nullable: true
    analytics-updatedAt:
      type: string
      format: date-time
      description: Last update time
    analytics-author:
      type: object
      description: Data of the author of the analysis
      properties:
        id:
          $ref: "#/components/schemas/analytics-authorId"
        name:
          type: string
          description: Name of the author
        iconUrl:
          type: string
          description: URL of the author's avatar icon
      required:
        - id
        - name
    analytics-authorId:
      type: integer
      format: int64
      description: Unique ID of the original creator. `1` means the resource was created by a request with workspace authorization.
    analytics-name:
      type: string
      description: Name of the resource
    analytics-id:
      type: string
      format: uuid
      description: Unique ID of the resource
    analytics-ExpressionType:
      type: string
      enum:
        - EVENT
        - CLIENT
    analytics-Action:
      type: object
      description: The analyzed event
      required:
        - name
      properties:
        id:
          $ref: "#/components/schemas/analytics-ActionId"
        name:
          $ref: "#/components/schemas/analytics-ActionName"
    analytics-ActionName:
      type: string
      description: Action name of the event.
      example: page.visit
    analytics-ActionId:
      type: integer
      format: int64
      deprecated: true
      nullable: true
      description: Deprecated parameter. DO NOT use. Has no effect in create/update requests.
    analytics-expressionCreateRequestBody:
      type: object
      properties:
        isVisibleForClientProfile:
          $ref: "#/components/schemas/analytics-isVisibleForClientProfile"
        analysis:
          description: Details of an expression analysis
          oneOf:
            - $ref: "#/components/schemas/analytics-EventExpressionEntity"
            - $ref: "#/components/schemas/analytics-ClientExpressionEntity"
      required:
        - isVisibleForClientProfile
        - analysis
    analytics-ClientExpressionEntity:
      type: object
      title: Profile expression
      description: Details of a profile expression. In the Synerise Portal, they are called _attribute_ expressions.
      properties:
        type:
          type: string
          enum:
            - CLIENT
          description: This type of expression can be used to analyze profile attributes.
        name:
          $ref: "#/components/schemas/analytics-name"
        description:
          $ref: "#/components/schemas/analytics-description"
        expression:
          $ref: "#/components/schemas/analytics-ClientExpressionContentEntity"
      required:
        - expression
        - name
        - type
        - description
    analytics-ClientExpressionContentEntity:
      description: Structure of the expression. This is a recursive schema - functions can contain more functions.
      oneOf:
        - type: object
          title: Value
          properties:
            type:
              type: string
              enum:
                - VALUE
            title:
              type: string
              description: Title of the value
            value:
              oneOf:
                - $ref: "#/components/schemas/analytics-ClientParameter"
                - $ref: "#/components/schemas/analytics-ConstantValue"
                - $ref: "#/components/schemas/analytics-VariableValue"
          required:
            - title
            - type
            - value
        - type: object
          title: Single-argument function
          example:
            type: FUNCTION
            function: LN
            arg:
              type: VALUE
              title: title
              value:
                type: CONSTANT
                constant: 10
          properties:
            type:
              type: string
              enum:
                - FUNCTION
            function:
              $ref: "#/components/schemas/analytics-UnaryFunctionType"
            arg:
              $ref: "#/components/schemas/analytics-ClientExpressionContentEntity"
        - type: object
          title: Two-argument function
          properties:
            type:
              type: string
              enum:
                - FUNCTION
            function:
              $ref: "#/components/schemas/analytics-BinaryFunctionType"
            arg1:
              $ref: "#/components/schemas/analytics-ClientExpressionContentEntity"
            arg2:
              $ref: "#/components/schemas/analytics-ClientExpressionContentEntity"
        - type: object
          title: IF function
          properties:
            type:
              type: string
              enum:
                - FUNCTION
            function:
              $ref: "#/components/schemas/analytics-TernaryFunctionType"
            arg1:
              $ref: "#/components/schemas/analytics-ClientExpressionContentEntity"
            arg2:
              $ref: "#/components/schemas/analytics-ClientExpressionContentEntity"
            arg3:
              $ref: "#/components/schemas/analytics-ClientExpressionContentEntity"
        - type: object
          title: Current time function
          example:
            type: FUNCTION
            function: NOW
          properties:
            type:
              type: string
              enum:
                - FUNCTION
            function:
              $ref: "#/components/schemas/analytics-NullaryFunctionType"
    analytics-NullaryFunctionType:
      type: string
      description: Returns the current time in ISO format, with the time zone of the workspace. For example `2025-02-06T14:09:56.321+01:00`
      enum:
        - NOW
    analytics-TernaryFunctionType:
      type: string
      description: |
        
        The IF function takes three arguments:

        * arg1 is the condition (VALUE-type arguments are considered true)

        * arg2 is the value returned if the condition is true

        * arg3 is the value returned if the condition is false
      enum:
        - IF
    analytics-BinaryFunctionType:
      type: string
      description: |
        
        The type of mathematical or logical operation.

        * MULTIPLY, DIVIDE, SUM, SUB - mathematical operations, (SUB - subtraction)

        * IF_NULL - returns the value of arg2 if the value of arg1 is null

        * MAX - returns the higher argument value

        * MIN - returns the lower argument value

        * MOD - modulo operation

        * EQUALS - returns `1` if the argument values are equal, `0` otherwise

        * NOT_EQUALS - returns `0` if the argument values are equal, `1` otherwise

        * GREATER - returns `1` if the value of arg1 is higher than the value of arg2, `0` otherwise

        * GREATER_OR_EQUALS - returns `1` if the value of arg1 is higher than or equal to the value of arg2, `0` otherwise

        * LESS - returns `1` if the value of arg1 is lower than the value of arg2, `0` otherwise

        * LESS_OR_EQUALS - returns `1` if the value of arg1 is lower than or equal to the value of arg2, `0` otherwise

        * CONCAT - concatenates the values and returns them as a string (even if both values are numerical)

        * REGEXP - arg1 is the string to transform (can be calculated from a function). arg2 is a regular expression that defines the transformation (which can also be calculated from a function, otherwise use the "constant" value type). For example, if arg1 is "123", and arg2 is "2.", the result is "23".
      enum:
        - DIVIDE
        - IF_NULL
        - MAX
        - MIN
        - MOD
        - MULTIPLY
        - SUB
        - SUM
        - GREATER
        - GREATER_OR_EQUALS
        - LESS
        - LESS_OR_EQUAL
        - NOT_EQUAL
        - EQUALS
        - ADD_YEARS
        - CONCAT
        - REGEXP
    analytics-UnaryFunctionType:
      type: string
      description: |
        The type of function.


        * ABS - absolute value

        * CEIL - ceiling function

        * FLOOR - floor function

        * EXP - exponential function

        * LN - natural logarithm

        * ROUND - rounds down if `fraction < x.5` and up if `fraction >= x.5`

        * TO_NUMBER and TO_STRING - return the argument value in a given format

        * TO_MONEY - returns a numerical value with an accuracy of two decimal places

        * DAY_OF_* - returns a numerical value. The argument must be a date (yyyy-mm-dd) or the "now" function

        * HOUR/WEEK/MONTH/YEAR - returns a part of date/time. The argument must be a date (ISO 8601) or the "now" function.

        * BRACKET - allows you to group elements, like in mathematics. The most deeply-nested brackets are processed first.
      enum:
        - LN
        - ABS
        - CEIL
        - EXP
        - FLOOR
        - ROUND
        - TO_NUMBER
        - TO_STRING
        - DAY_OF_MONTH
        - DAY_OF_WEEK
        - DAY_OF_YEAR
        - HOUR
        - MONTH
        - WEEK
        - YEAR
        - TO_MONEY
        - TO_TIMESTAMP
        - TO_DATE
        - BRACKET
    analytics-VariableValue:
      type: object
      title: Dynamic value
      properties:
        type:
          type: string
          enum:
            - VARIABLE
          description: |
            This type is called a Dynamic Key in the Synerise Portal. It can be used to let other analytic components, such as dashboards, insert a value.

            The variable value can't:
              - be longer than 21000 characters if it's a string
              - be larger than 65000 items if it's an array. Strings in the array can't be longer than 21000 characters.
        name:
          type: string
          description: The name of the dynamic key
        defaultValue:
          type: string
          maxLength: 21000
          description: The default value to use
      required:
        - type
        - name
        - defaultValue
    analytics-ConstantValue:
      type: object
      title: Static value
      properties:
        type:
          type: string
          enum:
            - CONSTANT
        constant:
          description: |
            The value can't:
              - be longer than 21000 characters if it's a string
              - be larger than 65000 items if it's an array. Strings in the array can't be longer than 21000 characters.
          oneOf:
            - type: string
              maxLength: 21000
            - type: number
            - type: boolean
            - type: array
              maxItems: 65000
              items:
                type: string
                maxLength: 21000
      required:
        - type
        - constant
    analytics-ClientParameter:
      type: object
      title: Profile attribute
      properties:
        type:
          type: string
          enum:
            - CLIENT
        attribute:
          $ref: "#/components/schemas/analytics-ProfileAttribute"
      required:
        - type
        - attribute
    analytics-ProfileAttribute:
      description: The profile attribute to access
      oneOf:
        - type: object
          title: Segmentation/expression/aggregate
          properties:
            type:
              type: string
              enum:
                - SEGMENTATION
                - EXPRESSION
                - AGGREGATE
            id:
              type: string
              format: uuid
              description: UUID of the referenced analysis
          required:
            - type
            - id
        - type: object
          title: Special
          properties:
            type:
              type: string
              enum:
                - SPECIAL
            special:
              type: string
              enum:
                - CLIENT_ID
              description: The name of the special parameter
          required:
            - type
            - special
        - type: object
          title: Parameter
          properties:
            type:
              type: string
              enum:
                - PARAM
            param:
              type: string
              description: The name of the profile parameter
          required:
            - type
            - param
        - type: object
          title: Tag
          properties:
            type:
              type: string
              enum:
                - TAG
            tag:
              type: string
              description: The name of the tag
          required:
            - type
            - tag
    analytics-description:
      type: string
      description: Description of the resource
    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.
      oneOf:
        - type: object
          title: Value
          properties:
            type:
              type: string
              enum:
                - VALUE
            title:
              type: string
              description: Title of the value
            value:
              oneOf:
                - $ref: "#/components/schemas/analytics-EventParameter"
                - $ref: "#/components/schemas/analytics-ClientParameter"
                - $ref: "#/components/schemas/analytics-ConstantValue"
                - $ref: "#/components/schemas/analytics-VariableValue"
          required:
            - title
            - type
            - value
        - type: object
          title: Single-argument function
          example:
            type: FUNCTION
            function: LN
            arg:
              type: VALUE
              title: title
              value:
                type: CONSTANT
                constant: 10
          properties:
            type:
              type: string
              enum:
                - FUNCTION
            function:
              $ref: "#/components/schemas/analytics-UnaryFunctionType"
            arg:
              $ref: "#/components/schemas/analytics-EventExpressionContentEntity"
        - type: object
          title: Two-argument function
          properties:
            type:
              type: string
              enum:
                - FUNCTION
            function:
              $ref: "#/components/schemas/analytics-BinaryFunctionType"
            arg1:
              $ref: "#/components/schemas/analytics-EventExpressionContentEntity"
            arg2:
              $ref: "#/components/schemas/analytics-EventExpressionContentEntity"
        - type: object
          title: IF function
          properties:
            type:
              type: string
              enum:
                - FUNCTION
            function:
              $ref: "#/components/schemas/analytics-TernaryFunctionType"
            arg1:
              $ref: "#/components/schemas/analytics-EventExpressionContentEntity"
            arg2:
              $ref: "#/components/schemas/analytics-EventExpressionContentEntity"
            arg3:
              $ref: "#/components/schemas/analytics-EventExpressionContentEntity"
        - type: object
          title: Current time function
          example:
            type: FUNCTION
            function: NOW
          properties:
            type:
              type: string
              enum:
                - FUNCTION
            function:
              $ref: "#/components/schemas/analytics-NullaryFunctionType"
    analytics-EventParameter:
      type: object
      title: Event parameter
      properties:
        type:
          type: string
          enum:
            - EVENT
        attribute:
          $ref: "#/components/schemas/analytics-EventAttribute"
      required:
        - type
        - attribute
    analytics-EventAttribute:
      description: Definition of an event attribute to access.
      oneOf:
        - $ref: "#/components/schemas/analytics-ParameterEventAttribute"
        - $ref: "#/components/schemas/analytics-RunningAggregateEventAttribute"
        - $ref: "#/components/schemas/analytics-ExpressionEventAttribute"
        - $ref: "#/components/schemas/analytics-SpecialEventAttribute"
    analytics-SpecialEventAttribute:
      type: object
      title: Special property
      properties:
        type:
          type: string
          enum:
            - SPECIAL
          description: This type lets you access special properties of an event.
        special:
          $ref: "#/components/schemas/analytics-SpecialTypeAttribute"
      required:
        - type
        - special
    analytics-SpecialTypeAttribute:
      type: string
      description: The type of special attribute you want to use
      enum:
        - TIMESTAMP
    analytics-ExpressionEventAttribute:
      type: object
      title: Expression
      properties:
        type:
          type: string
          enum:
            - EXPRESSION
          description: This type refers to expressions. You must provide the ID of the expression.
        id:
          type: string
          format: uuid
          description: ID of the expression
      required:
        - type
        - id
    analytics-RunningAggregateEventAttribute:
      type: object
      title: Event aggregate
      properties:
        type:
          type: string
          enum:
            - RUNNING_AGGREGATE
          description: This type refers to event aggregates. You must provide the ID of the aggregate.
        id:
          type: string
          format: uuid
          description: ID of the event aggregate
      required:
        - type
        - id
    analytics-ParameterEventAttribute:
      type: object
      title: Event parameter
      properties:
        type:
          enum:
            - PARAM
          description: This `type` refers to parameters in an event.
        param:
          type: string
          description: Name of the parameter
        id:
          type: integer
          description: Only present in responses. ID of this attribute in the database.
      required:
        - type
        - param
    analytics-isVisibleForClientProfile:
      type: boolean
      description: When set to `true`, information about this analysis is shown on a profile's card.
    analytics-Expression:
      allOf:
        - type: object
          properties:
            analysis:
              description: Details of the analysis
              oneOf:
                - $ref: "#/components/schemas/analytics-EventExpressionEntity"
                - $ref: "#/components/schemas/analytics-ClientExpressionEntity"
            analyticVersion:
              $ref: "#/components/schemas/analytics-analyticVersion"
            isVisibleForClientProfile:
              $ref: "#/components/schemas/analytics-isVisibleForClientProfile"
        - $ref: "#/components/schemas/analytics-AnalysisGetCommon"
      required:
        - analysis
        - analyticVersion
        - isVisibleForClientProfile
    analytics-AnalysisGetCommon:
      type: object
      description: Common elements retrieved in details of all analyses
      properties:
        id:
          $ref: "#/components/schemas/analytics-id"
        businessProfileId:
          $ref: "#/components/schemas/analytics-businessProfileId"
        name:
          $ref: "#/components/schemas/analytics-name"
        description:
          $ref: "#/components/schemas/analytics-description"
        author:
          $ref: "#/components/schemas/analytics-authorId"
        modifier:
          $ref: "#/components/schemas/analytics-modifierId"
        updatedAt:
          $ref: "#/components/schemas/analytics-updatedAt"
        createdAt:
          $ref: "#/components/schemas/analytics-createdAt"
        usedAt:
          $ref: "#/components/schemas/analytics-usedAt"
        isPredefinedAnalytic:
          $ref: "#/components/schemas/analytics-isPredefinedAnalytic"
        isDynamicAnalytic:
          $ref: "#/components/schemas/analytics-isDynamicAnalytic"
        isDeleted:
          $ref: "#/components/schemas/analytics-isDeleted"
        namespace:
          $ref: "#/components/schemas/analytics-namespace"
        directoryId:
          $ref: "#/components/schemas/analytics-directoryId"
      required:
        - author
        - businessProfileId
        - createdAt
        - description
        - directoryId
        - id
        - isDeleted
        - isDynamicAnalytic
        - isPredefinedAnalytic
        - modifier
        - name
        - namespace
        - updatedAt
        - usedAt
    analytics-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-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-businessProfileId:
      type: integer
      format: int32
      description: ID of the workspace (formerly business profile)
      example: 48
    analytics-analyticVersion:
      type: string
      format: uuid
      description: Unique ID of this version of the resource
    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-ExpressionPreviewRequestWithClient:
      type: object
      properties:
        identifierValue:
          $ref: "#/components/schemas/analytics-identifierValue"
        expression:
          $ref: "#/components/schemas/analytics-ClientExpressionEntity"
      required:
        - expression
        - identifierValue
    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-HistogramMetadata:
      type: object
      description: Time constraints and aggregation details
      properties:
        period:
          $ref: "#/components/schemas/analytics-TrendAggregateDataBy"
        dateFilter:
          $ref: "#/components/schemas/analytics-dateFilter"
      required:
        - aggregateDataBy
        - dateFilter
    analytics-dateFilter:
      description: |
        Definition of a date filter. Only data that meets the result of the filter will be included in the analysis. For no filter, leave this object empty.

        An absolute date filter lets you define static dates and times that always apply to the analysis.

        A relative date filter lets you create a date filter that goes back a certain time from the moment of calculating the analysis.
      oneOf:
        - $ref: "#/components/schemas/analytics-absoluteDateFilter"
        - $ref: "#/components/schemas/analytics-relativeDateFilter"
    analytics-relativeDateFilter:
      type: object
      title: Relative
      properties:
        type:
          type: string
          enum:
            - RELATIVE
          description: |
            Relative filters allow you to create a filter that depends on when the analysis is calculated. 

            - `duration` is the length of time that the filter covers.
            - `offset` is the time that the filter goes back to set the beginning of the duration.
        duration:
          $ref: "#/components/schemas/analytics-period"
        offset:
          $ref: "#/components/schemas/analytics-period"
        filter:
          $ref: "#/components/schemas/analytics-customDateFilter"
      required:
        - duration
        - offset
        - type
    analytics-customDateFilter:
      description: This object allows you to define a pattern for a more detailed time filter. These patterns are applied within the constraints of the `dateFilter` object that contains them, regardless of its type relative or absolute).
      oneOf:
        - $ref: "#/components/schemas/analytics-customDailyDateFilter"
        - $ref: "#/components/schemas/analytics-customWeeklyDateFilter"
        - $ref: "#/components/schemas/analytics-customMonthlyDateFilter"
    analytics-customMonthlyDateFilter:
      type: object
      title: Monthly
      properties:
        type:
          type: string
          enum:
            - MONTHLY
          description: Monthly filters allow you to build rules for days of the month and/or weeks, including rules for different days of the week.
        nestingType:
          type: string
          enum:
            - IN_PLACE
        rules:
          $ref: "#/components/schemas/analytics-dateRule"
      required:
        - nestingType
        - rules
        - type
    analytics-dateRule:
      description: A set of rules. Within a monthly filter, you can include a mixture of rules for days of the month and days of the week.
      oneOf:
        - $ref: "#/components/schemas/analytics-weekDateRule"
        - $ref: "#/components/schemas/analytics-monthDateRule"
    analytics-monthDateRule:
      type: object
      title: Days of the month
      properties:
        type:
          type: string
          enum:
            - MONTH
        days:
          type: array
          description: Days of the month included in the pattern.
          items:
            $ref: "#/components/schemas/analytics-dayOf"
        inverted:
          type: boolean
          default: false
          description: |
            When set to `true`, days are counted from the end of the month.

            For example, if `inverted` is true and `day` is set to 1, the rule applies to the last day of each month. This lets you take into account the varying length of months.  

            **NOTE:** Remember that this `inverted` field is not the same as the `inverted` field of each object in the `days` array.
      required:
        - days
        - type
    analytics-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-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-dayOfMode:
      type: string
      enum:
        - Range
        - Hour
    analytics-datePickerDayTo:
      type: string
      description: Upper boundary of the pattern's timeframe, in HH:MM:SS format.
    analytics-datePickerDayFrom:
      type: string
      description: Lower boundary of the pattern's timeframe, in HH:MM:SS format.
    analytics-weekDateRule:
      type: object
      title: Days of the week
      properties:
        type:
          type: string
          enum:
            - WEEK
        weeks:
          type: array
          description: Weeks included in the pattern
          items:
            $ref: "#/components/schemas/analytics-weekOfMonth"
        inverted:
          type: boolean
          default: false
          description: |
            When set to `true`, weeks are counted from the end of the month.

            For example, if `inverted` is true and `week` is set to 1, the rule applies to the last week of each month. This lets you take into account the varying length of months.

            **NOTE:** Remember that this `inverted` field is not the same as the `inverted` field of each object in the `days` array of each week..
      required:
        - type
        - weeks
    analytics-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-customWeeklyDateFilter:
      type: object
      title: Weekly
      properties:
        type:
          type: string
          enum:
            - WEEKLY
          description: Weekly filters let you define separate rules for each day of the week.
        nestingType:
          type: string
          enum:
            - IN_PLACE
        days:
          type: array
          description: An array of rules for different days of the week.
          items:
            $ref: "#/components/schemas/analytics-dayOf"
      required:
        - days
        - nestingType
        - type
    analytics-customDailyDateFilter:
      type: object
      title: Daily
      properties:
        type:
          type: string
          enum:
            - DAILY
          description: Daily filters limit the data scope to a range of hours every day.
        nestingType:
          type: string
          enum:
            - IN_PLACE
        from:
          $ref: "#/components/schemas/analytics-datePickerDayFrom"
        to:
          $ref: "#/components/schemas/analytics-datePickerDayTo"
        inverted:
          $ref: "#/components/schemas/analytics-datePickerInverted"
      required:
        - nestingType
        - type
        - from
        - to
    analytics-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-timeValue:
      type: integer
      description: The number of time units
      format: int64
    analytics-timePeriod:
      type: string
      description: The unit of time
      enum:
        - YEARS
        - MONTHS
        - WEEKS
        - DAYS
        - HOURS
        - MINUTES
        - SECONDS
        - UNKNOWN
    analytics-absoluteDateFilter:
      type: object
      title: Absolute
      properties:
        type:
          type: string
          enum:
            - ABSOLUTE
          description: Absolute filters have the same start and end regardless of when the analysis is calculated.
        from:
          type: string
          format: date-time
          description: The lower boundary of the date filter.
        to:
          type: string
          format: date-time
          description: The upper boundary of the date filter. Must be later than `from`.
        filter:
          $ref: "#/components/schemas/analytics-customDateFilter"
      required:
        - type
    analytics-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-HistogramTimeDistributionItem:
      type: object
      properties:
        aggregateTimeDescription:
          type: string
          description: Time when this interval ended
        values:
          type: array
          description: The result of the aggregate
          items:
            $ref: "#/components/schemas/analytics-HistogramTimeDistributionChartItemValue"
      required:
        - aggregateTimeDescription
        - values
    analytics-HistogramTimeDistributionChartItemValue:
      type: object
      properties:
        metricId:
          type: string
          format: uuid
        value:
          type: number
          format: double
      required:
        - metricId
        - value
    analytics-AggregateHistogramRequest:
      type: object
      properties:
        variables:
          type: array
          description: A list of variable values to use in this calculation
          items:
            $ref: "#/components/schemas/analytics-Variable"
        dateFilter:
          $ref: "#/components/schemas/analytics-dateFilter"
        aggregateDataBy:
          $ref: "#/components/schemas/analytics-TrendAggregateDataBy"
      required:
        - aggregateDataBy
        - dateFilter
        - variables
    analytics-Variable:
      type: object
      properties:
        name:
          type: string
          description: The name of the variable (dynamic key) which will receive this value for the current calculation.
        value:
          oneOf:
            - $ref: "#/components/schemas/analytics-stringType"
            - $ref: "#/components/schemas/analytics-numberType"
            - $ref: "#/components/schemas/analytics-booleanType"
            - $ref: "#/components/schemas/analytics-stringArray"
            - $ref: "#/components/schemas/analytics-numberArray"
            - $ref: "#/components/schemas/analytics-dateFilter"
      required:
        - name
        - value
    analytics-numberArray:
      type: array
      items:
        type: integer
    analytics-stringArray:
      type: array
      items:
        type: string
    analytics-booleanType:
      type: boolean
    analytics-numberType:
      type: integer
    analytics-stringType:
      type: string
    analytics-AggregateTypedCalculationResponse:
      type: object
      properties:
        aggregateId:
          type: string
          format: uuid
        aggregateuuid:
          type: string
          format: uuid
        clientId:
          type: number
          format: int64
        title:
          type: string
        result:
          type: object
        variables:
          type: array
          items:
            $ref: "#/components/schemas/analytics-Variable"
        dateFilter:
          $ref: "#/components/schemas/analytics-dateFilter"
        analyticVersion:
          type: string
          format: uuid
    analytics-PreviewAggregateRequest:
      type: object
      properties:
        aggregate:
          allOf:
            - type: object
              description: Structure of the analysis. For previews, the `oldId` parameter can have any value.
              properties:
                oldId:
                  $ref: "#/components/schemas/analytics-oldId"
              required:
                - oldId
            - $ref: "#/components/schemas/analytics-ClientAggregate"
        identifierValue:
          $ref: "#/components/schemas/analytics-identifierValue"
      required:
        - aggregate
        - identifierValue
    analytics-ClientAggregate:
      allOf:
        - type: object
          title: Profile aggregate
          description: Profile aggregate definition
          properties:
            aggregateType:
              type: string
              description: Type of the aggregate. `AGGREGATE` is a profile aggregate.
              enum:
                - AGGREGATE
          required:
            - aggregateType
        - $ref: "#/components/schemas/analytics-AggregateCommon"
    analytics-AggregateCommon:
      type: object
      required:
        - actionId
        - attribute
        - dateFilter
        - type
        - name
        - description
      properties:
        name:
          $ref: "#/components/schemas/analytics-name"
        description:
          $ref: "#/components/schemas/analytics-description"
        action:
          $ref: "#/components/schemas/analytics-Action"
        attribute:
          $ref: "#/components/schemas/analytics-AggregateAttribute"
        type:
          $ref: "#/components/schemas/analytics-AggregateExpressionType"
        level:
          $ref: "#/components/schemas/analytics-QuantileLevel"
        dateFilter:
          $ref: "#/components/schemas/analytics-dateFilter"
        size:
          $ref: "#/components/schemas/analytics-AggregateSize"
        unique:
          $ref: "#/components/schemas/analytics-AggregateUnique"
        expressions:
          type: array
          $ref: "#/components/schemas/analytics-AggregateExpressions"
    analytics-AggregateExpressions:
      type: array
      minLength: 0
      description: An array of conditions that the analyzed event must meet
      items:
        $ref: "#/components/schemas/analytics-EventExpression"
    analytics-EventExpression:
      type: object
      description: The `attribute` object is an event attribute that must exist in the analyzed event. The `constraint` object is a condition that the attribute must meet.
      properties:
        attribute:
          $ref: "#/components/schemas/analytics-EventAttribute"
        constraint:
          $ref: "#/components/schemas/analytics-EventConstraint"
    analytics-EventConstraint:
      description: |
        This object defines the logic to apply to the `attribute`, and the values to compare it against (if required). 

        **The analytics engine doesn't check if the data types match - you need to ensure that your data types are consistent in the data you send to the database**.
      oneOf:
        - $ref: "#/components/schemas/analytics-BoolConstraintEventConstraint"
        - $ref: "#/components/schemas/analytics-StringZeroConstraintEventConstraint"
        - $ref: "#/components/schemas/analytics-StringOneConstraintEventConstraint"
        - $ref: "#/components/schemas/analytics-NumberOneConstraintEventConstraint"
        - $ref: "#/components/schemas/analytics-NumberTwoConstraintEventConstraint"
        - $ref: "#/components/schemas/analytics-StringArrayConstraintEventConstraint"
        - $ref: "#/components/schemas/analytics-StringArrayOneConstraintEventConstraint"
        - $ref: "#/components/schemas/analytics-NullConstraintEventConstraint"
        - $ref: "#/components/schemas/analytics-DateZeroConstraintEventConstraint"
        - $ref: "#/components/schemas/analytics-DateOneConstraintEventConstraint"
        - $ref: "#/components/schemas/analytics-DateTwoConstraintEventConstraint"
        - $ref: "#/components/schemas/analytics-DateFilterEventConstraint"
    analytics-DateFilterEventConstraint:
      type: object
      title: Date filter
      properties:
        type:
          type: string
          enum:
            - DATE_FILTER
        logic:
          type: string
          enum:
            - DATE_FILTER
          description: Checks if the date from `attribute` matches a date filter.
        value:
          $ref: "#/components/schemas/analytics-dateFilter"
      required:
        - type
        - logic
        - value
    analytics-DateTwoConstraintEventConstraint:
      type: object
      title: Date range
      properties:
        type:
          type: string
          enum:
            - DATE_TWO
        logic:
          type: string
          description: Checks if the date from `attribute` is between the dates from `value1` and `value2`.
          enum:
            - BETWEEN
        value1:
          $ref: "#/components/schemas/analytics-EventValue"
        value2:
          $ref: "#/components/schemas/analytics-EventValue"
      required:
        - type
        - logic
        - value1
        - value2
    analytics-EventValue:
      description: The value to test `attribute` against.
      oneOf:
        - $ref: "#/components/schemas/analytics-ConstantValue"
        - $ref: "#/components/schemas/analytics-VariableValue"
        - $ref: "#/components/schemas/analytics-ClientParameter"
        - $ref: "#/components/schemas/analytics-EventParameter"
    analytics-DateOneConstraintEventConstraint:
      type: object
      title: Date
      properties:
        type:
          type: string
          enum:
            - DATE_ONE
        logic:
          type: string
          description: Checks how the date from `attribute` compares to the one in `value`. For example, MORE returns true if `attribute` is the later date.
          enum:
            - LESS
            - MORE
            - LESS_OR_EQUAL
            - MORE_OR_EQUAL
        value:
          $ref: "#/components/schemas/analytics-EventValue"
      required:
        - type
        - logic
        - value
    analytics-DateZeroConstraintEventConstraint:
      type: object
      title: Current date
      properties:
        type:
          type: string
          enum:
            - DATE_ZERO
          description: Compare a date from `attribute` to the current date
        logic:
          type: string
          enum:
            - MATCHES_CURRENT_DAY
            - MATCHES_CURRENT_HOUR
            - MATCHES_CURRENT_MONTH
            - MATCHES_CURRENT_YEAR
          description: Logic to apply to the date from `attribute`
      required:
        - type
        - logic
    analytics-NullConstraintEventConstraint:
      type: object
      title: Check if null
      properties:
        type:
          type: string
          enum:
            - "NULL"
        logic:
          type: string
          description: Checks if the attribute is or isn't null. Empty strings, `0`, and negative numbers are NOT null. String `"null"` is NOT null.
          enum:
            - IS_NULL
            - IS_NOT_NULL
      required:
        - type
        - logic
    analytics-StringArrayOneConstraintEventConstraint:
      type: object
      title: Other string array tests
      properties:
        type:
          type: string
          enum:
            - ARRAY_STRING_ONE_DEPRECATED
          description: "`value` should be an array"
        logic:
          type: string
          description: |
            - CONTAIN/NOT_CONTAIN test if any item in the array contains/doesn't contain the value from `attribute`
            - EQUAL/NOT_EQUAL test if any item in the array is/isn't identical to the value from `attribute`
            - STARTS_WITH/ENDS_WITH test if any item in the array starts/ends with the value from `attribute`
            - REGEXP tests if any item in the array matches the regular expression from `attribute`
          enum:
            - CONTAIN
            - NOT_CONTAIN
            - EQUAL
            - NOT_EQUAL
            - STARTS_WITH
            - REGEXP
            - ENDS_WITH
        value:
          $ref: "#/components/schemas/analytics-EventValue"
      required:
        - type
        - logic
        - value
    analytics-StringArrayConstraintEventConstraint:
      type: object
      title: Check if string in array
      properties:
        type:
          type: string
          enum:
            - STRING_ARRAY
          description: "`value` needs to return an array of strings"
        logic:
          type: string
          description: You can check if the value from `attribute` is in the array defined in `value`
          enum:
            - IN
            - NOT_IN
        value:
          $ref: "#/components/schemas/analytics-EventValue"
      required:
        - type
        - logic
        - value
    analytics-NumberTwoConstraintEventConstraint:
      type: object
      title: Two numbers
      properties:
        type:
          type: string
          enum:
            - NUMBER_TWO
          description: Checks if the `attribute` is between two numbers, defined in `value1` and `value2`.
        logic:
          type: string
          enum:
            - BETWEEN
        value1:
          $ref: "#/components/schemas/analytics-EventValue"
        value2:
          $ref: "#/components/schemas/analytics-EventValue"
      required:
        - type
        - logic
        - value1
        - value2
    analytics-NumberOneConstraintEventConstraint:
      type: object
      title: Number
      properties:
        type:
          type: string
          enum:
            - NUMBER_ONE
          description: This type is used to test values that are a single number
        logic:
          type: string
          description: Logic of the test. For example, if the logic is `EQUAL` and the `value` returns 15, the expression checks if the `attribute` (sibling object to `constraint`) is 15.
          enum:
            - EQUAL
            - NOT_EQUAL
            - LESS
            - MORE
            - MORE_OR_EQUAL
            - LESS_OR_EQUAL
        value:
          $ref: "#/components/schemas/analytics-EventValue"
      required:
        - type
        - logic
        - value
    analytics-StringOneConstraintEventConstraint:
      type: object
      title: String
      properties:
        type:
          type: string
          enum:
            - STRING_ONE
          description: This type is used to test values that are a single string.
        logic:
          type: string
          description: Logic of the test. For example, if the logic is `CONTAIN` and the `value` returns "foo", the expression checks if the `attribute` (sibling object to `constraint`) contains the string "foo".
          enum:
            - CONTAIN
            - NOT_CONTAIN
            - EQUAL
            - NOT_EQUAL
            - STARTS_WITH
            - REGEXP
            - ENDS_WITH
        value:
          $ref: "#/components/schemas/analytics-EventValue"
      required:
        - type
        - logic
        - value
    analytics-StringZeroConstraintEventConstraint:
      type: object
      title: Check empty
      properties:
        type:
          type: string
          enum:
            - STRING_ZERO
        logic:
          type: string
          description: Checks if a string is empty (zero-length). Null value is considered empty. A string of whitespace characters is NOT empty.
          enum:
            - IS_EMPTY
            - IS_NOT_EMPTY
      required:
        - type
        - logic
    analytics-BoolConstraintEventConstraint:
      type: object
      title: Boolean
      properties:
        type:
          type: string
          enum:
            - BOOL
        logic:
          type: string
          description: Boolean logic. Empty (zero-length) strings, `0`, and `"0"` are considered false. Null values are false.
          enum:
            - IS_TRUE
            - IS_FALSE
      required:
        - type
        - logic
    analytics-AggregateUnique:
      type: boolean
      default: false
      description: Only applies when `type` is *_MULTI. When set to `true`, only unique occurrences of an event parameter are included in the results.
    analytics-AggregateSize:
      type: integer
      description: Only applies and is required when `type` is *_MULTI. Defines how many results to return.
    analytics-QuantileLevel:
      type: number
      minimum: 0.01
      maximum: 1
      description: Only applies when `type` is `QUANTILE`. This is the percentile whose value will be the result of the analysis. For example, `0.35` is the 35th percentile.
    analytics-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-AggregateAttribute:
      allOf:
        - type: object
          description: The event attribute, special property, or aggregate result analyzed by this aggregate.
        - oneOf:
            - $ref: "#/components/schemas/analytics-ParameterEventAttribute"
            - $ref: "#/components/schemas/analytics-RunningAggregateEventAttribute"
            - $ref: "#/components/schemas/analytics-ExpressionEventAttribute"
            - $ref: "#/components/schemas/analytics-SpecialEventAttribute"
            - $ref: "#/components/schemas/analytics-EmptyEventAttribute"
    analytics-EmptyEventAttribute:
      type: object
      title: No attribute
      properties:
        type:
          type: string
          enum:
            - EMPTY
          description: Can be used for analyses whose result isn't based on an attribute, such as `EXISTS`. **Can't be used with `constraint`**.
      required:
        - type
    analytics-oldId:
      type: integer
      description: A unique numeric ID required for backwards compatibility. Cannot be changed.
    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-analyticAggregateResponse:
      type: object
      properties:
        meta:
          $ref: "#/components/schemas/analytics-meta"
        data:
          type: array
          description: Array of aggregates
          items:
            $ref: "#/components/schemas/analytics-AggregateListItem"
      required:
        - data
        - meta
    analytics-AggregateListItem:
      allOf:
        - type: object
          properties:
            aggregateType:
              $ref: "#/components/schemas/analytics-AggregateType"
        - $ref: "#/components/schemas/analytics-ListAnalyticsItemCommon"
      required:
        - aggregateType
    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"
        previewDefaultObjectId:
          $ref: "#/components/schemas/analytics-previewDefaultObjectId"
      required:
        - analysis
        - isVisibleForClientProfile
    analytics-previewDefaultObjectId:
      type: number
      format: int64
      description: The ID of the default profile for generating a preview of the results.
    analytics-AggregateAnalysis:
      description: Definition of the aggregate
      required:
        - aggregateType
      oneOf:
        - $ref: "#/components/schemas/analytics-RunningAggregate"
        - $ref: "#/components/schemas/analytics-ClientAggregate"
    analytics-RunningAggregate:
      allOf:
        - type: object
          title: Event aggregate
          properties:
            aggregateType:
              type: string
              description: |
                Type of the aggregate. `RUNNING_AGGREGATE` is an event aggregate.

                Event aggregates take into account events that occurred before the event that is the subject of the aggregate. If `excludeCurrent` is `false`, the data from that event is included too.

                `timeWindow` is a sliding time window anchored to the timestamp of the event currently being evaluated: only elements from events whose timestamp falls within `[currentEvent.timestamp - timeWindow, currentEvent.timestamp]` contribute to the result. It is required when `type` is `LAST_TIME`, `FIRST_TIME`, `LAST_MULTI_TIME`, or `FIRST_MULTI_TIME`, and ignored for all other aggregate types.
              enum:
                - RUNNING_AGGREGATE
            excludeCurrent:
              type: boolean
              description: When `false`, data from the event that is the subject of the analysis is analyzed in addition to data of the events that occurred before it.
            timeWindow:
              $ref: "#/components/schemas/analytics-period"
          required:
            - aggregateType
            - excludeCurrent
        - $ref: "#/components/schemas/analytics-AggregateCommon"
    analytics-Aggregate:
      allOf:
        - type: object
          properties:
            oldId:
              $ref: "#/components/schemas/analytics-oldId"
            analysis:
              allOf:
                - type: object
                  properties:
                    id:
                      $ref: "#/components/schemas/analytics-id"
                    uuid:
                      $ref: "#/components/schemas/analytics-uuid"
                    oldId:
                      $ref: "#/components/schemas/analytics-oldId"
                - $ref: "#/components/schemas/analytics-AggregateAnalysis"
            isVisibleForClientProfile:
              $ref: "#/components/schemas/analytics-isVisibleForClientProfile"
            aggregateType:
              $ref: "#/components/schemas/analytics-AggregateType"
            previewDefaultObjectId:
              $ref: "#/components/schemas/analytics-previewDefaultObjectId"
            analyticVersion:
              $ref: "#/components/schemas/analytics-analyticVersion"
        - $ref: "#/components/schemas/analytics-AnalysisGetCommon"
      required:
        - oldId
        - analysis
        - aggregateType
        - isVisibleForClientProfile
        - analyticVersion
    analytics-uuid:
      type: string
      format: uuid
      description: Unique ID of the resource
    analytics-AggregateUpdateRequest:
      type: object
      description: Definition of the aggregate
      properties:
        analysis:
          allOf:
            - type: object
              description: Structure of the analysis
              properties:
                oldId:
                  $ref: "#/components/schemas/analytics-oldId"
              required:
                - oldId
            - $ref: "#/components/schemas/analytics-AggregateAnalysis"
        isVisibleForClientProfile:
          $ref: "#/components/schemas/analytics-isVisibleForClientProfile"
        previewDefaultObjectId:
          $ref: "#/components/schemas/analytics-previewDefaultObjectId"
      required:
        - analysis
        - isVisibleForClientProfile
    api-service-HTTP400-apiv4:
      type: object
      properties:
        error:
          type: string
          description: Summary of the error
        status:
          type: integer
          format: int32
          description: Status code
        timestamp:
          type: string
          description: Time when the message was sent
        path:
          type: string
          description: URL of the requested resource
        message:
          type: string
          description: Description of the problem
        errors:
          type: array
          description: Additional details of the errors, if applicable
          items:
            $ref: "#/components/schemas/api-service-Error-apiv4"
    api-service-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-CreateatransactionRequest-apiv4:
      required:
        - client
        - orderId
        - paymentInfo
        - products
        - revenue
        - value
        - source
      type: object
      properties:
        client:
          $ref: "#/components/schemas/api-service-Client-apiv4"
        discountAmount:
          description: How much the total cost decreased
          type: object
          nullable: true
          properties:
            amount:
              type: number
              description: The discount amount
              minimum: 0
            currency:
              $ref: "#/components/schemas/api-service-Currency-apiv4"
        metadata:
          $ref: "#/components/schemas/api-service-TransactionMeta-apiv4"
        orderId:
          $ref: "#/components/schemas/api-service-OrderId-apiv4"
        paymentInfo:
          $ref: "#/components/schemas/api-service-PaymentInfo-apiv4"
        products:
          type: array
          items:
            $ref: "#/components/schemas/api-service-Product-apiv4"
          description: |
            A list of items in the transaction.

            Each item creates a `product.buy` event. The UUID of that event is generated from a combination of:
              - the UUID of the `transaction.charge` event created by the transaction
              - the position of the item in this array. This has an effect on updating transaction events. 

            This means that when you update a transaction (a transaction can only be updated if it has an `eventSalt` and the same timestamp as the original), you must keep the original order of items in the array. Otherwise, you may accidentally overwrite a `product.buy` event with another item's event. The system does NOT recognize the item by SKU in this case.

            **Example**:
              1. You create a transaction with items A, B and C (in that order).
              2. You update the transaction and the items are now A, B, D, and C (in that order).
              3. Because item D took the position of C in the event, it has the same UUID as C had earlier. The event of D overwrites the event of C, and C is generated as a new event.

            Additionally, because events can't be deleted from the database, cancelled items remain as events in a Profile's history. You can use a custom free-form property to tag items as cancelled. This way, you can keep cancelled items in `products` when updating a transaction without breaking the order of items. You can also use the property to filter cancelled items out in Analytics.
        recordedAt:
          $ref: "#/components/schemas/api-service-Time-apiv4"
        revenue:
          required:
            - amount
            - currency
          type: object
          description: Transaction revenue (amount after taxation). This field is not calculated automatically by the backend, you must provide the value by summing up the results of `finalUnitPrice * quantity` from all items in the `products` array.
          properties:
            amount:
              type: number
              minimum: 0
              description: The total amount
              example: 64.25
            currency:
              $ref: "#/components/schemas/api-service-Currency-apiv4"
        value:
          required:
            - amount
            - currency
          type: object
          description: If you want to display the price before taxation, use this object. If you only want to display the price after taxation, set the values to the same as in `revenue`.
          properties:
            amount:
              type: number
              minimum: 0
              description: The total amount
              example: 112.25
            currency:
              $ref: "#/components/schemas/api-service-Currency-apiv4"
        source:
          $ref: "#/components/schemas/api-service-eventSource-apiv4"
        eventSalt:
          $ref: "#/components/schemas/api-service-EventSalt-apiv4"
    api-service-EventSalt-apiv4:
      type: string
      example: 972346context.action2019-02-07T09:53:56.999+00:00
      description: |
        When an event has an `eventSalt`, it can be overwritten by sending another event. The event's UUID stays the same.

        `eventSalt` must be unique in a workspace. An example of creating a salt is by generating a UUID or concatenating the profile ID, event's name, and timestamp, including milliseconds. This creates a value whose possibility of being duplicated is practically zero.

        To overwrite an event with another one, the new event MUST:
        - have the same `eventSalt` as the original event
        - have the same date and time as the original event (If the date and time don't match the original event, event salt doesn't have any effect.)
        - belong to the same `clientId` as the original event
        - have the same action (event name) as the original event

        ------
        **IMPORTANT**:  
        - DO NOT send the same `eventSalt` to different profiles!
        - DO NOT send the same `eventSalt` with a different action!
        - Pay attention to timezones - more details in the description of the `time` property (in v4/transactions events, it's called `recordedAt`).
        - If you send a future time in an event, it is rejected and the current time is assigned automatically. This means it's impossible to use event salt with future times.
        - An event without an `eventSalt` can't be overwritten. The parameter cannot be added to an event at a later time.
        - The parameter can't be retrieved later. You must keep track of the values that you send.  
        - In Automations that use the overwritten event as a trigger, the **automation is triggered if the new event is sent more than 72 hours after the original**. This is because the event UUID stays the same, and Automation treats events with the same UUID within 72 hours as duplicates that were sent due to an error.
    api-service-eventSource-apiv4:
      type: string
      enum:
        - WEB_DESKTOP
        - WEB_MOBILE
        - MOBILE_APP
        - POS
        - MOBILE
        - DESKTOP
      description: |
        Source of the event. 
      example: MOBILE
    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-Product-apiv4:
      required:
        - finalUnitPrice
        - quantity
        - sku
      type: object
      additionalProperties:
        description: Additional, free-form properties of the item
      properties:
        finalUnitPrice:
          description: Total final price of the item per unit, including tax and discounts
          required:
            - amount
            - currency
          type: object
          properties:
            amount:
              type: number
              minimum: 0
              description: The price of the items
              example: 3.25
            currency:
              $ref: "#/components/schemas/api-service-Currency-apiv4"
        name:
          type: string
          example: Soft drink
          description: Name of the item
        sku:
          $ref: "#/components/schemas/api-service-ItemSku-apiv4"
        categories:
          type: array
          description: A list of the item's categories
          items:
            type: string
        image:
          type: string
          description: URL of the item's image
        url:
          type: string
          description: URL of the item's page
        netUnitPrice:
          required:
            - amount
            - currency
          type: object
          description: Price before taxation (before or after discounts, depending on your implementation and discount type)
          properties:
            amount:
              type: number
              minimum: 0
              description: The amount of money
              example: 3.25
            currency:
              $ref: "#/components/schemas/api-service-Currency-apiv4"
        tax:
          type: number
          format: float
          description: Tax as a percentage
        quantity:
          type: number
          example: 2.5
          description: The number or amount of purchased items
        regularPrice:
          description: Regular price of the item after taxation, before discounts
          required:
            - amount
            - currency
          type: object
          properties:
            amount:
              type: number
              minimum: 0
              description: The amount of money
              example: 3.25
            currency:
              $ref: "#/components/schemas/api-service-Currency-apiv4"
        discountPrice:
          description: Discount as an amount. For example, if the regular price is 500, and the final price is 450, the discount amount is 50.
          type: object
          properties:
            amount:
              type: number
              minimum: 0
              description: The amount of money
              example: 15.5
            currency:
              $ref: "#/components/schemas/api-service-Currency-apiv4"
        discountPercent:
          type: number
          format: float
          description: Discount as a percentage
    api-service-ItemSku-apiv4:
      type: string
      example: "189784563455"
      description: SKU of the item
    api-service-Currency-apiv4:
      type: string
      description: The currency of the transaction in ISO 4217
      example: USD
    api-service-PaymentInfo-apiv4:
      description: Payment details
      required:
        - method
      type: object
      properties:
        method:
          description: Payment method
          type: string
          example: CASH
    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-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-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-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-Client-apiv4:
      type: object
      description: |
        You must provide at least one of those profile identifiers.

        **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/).
      properties:
        customId:
          $ref: "#/components/schemas/api-service-inBodyClientCustomId-apiv4"
        id:
          $ref: "#/components/schemas/api-service-ClientId-apiv4"
        uuid:
          $ref: "#/components/schemas/api-service-inBodyClientUuid-apiv4"
        email:
          $ref: "#/components/schemas/api-service-inBodyClientEmail-apiv4"
    api-service-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-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-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-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-CreateClientRequestBody-apiv4:
      type: object
      properties:
        email:
          $ref: "#/components/schemas/api-service-inBodyClientEmail-apiv4"
        phone:
          $ref: "#/components/schemas/api-service-inBodyClientPhone-apiv4"
        customId:
          $ref: "#/components/schemas/api-service-inBodyClientCustomId-apiv4"
        firstName:
          $ref: "#/components/schemas/api-service-inBodyClientFirstName-apiv4"
        lastName:
          $ref: "#/components/schemas/api-service-inBodyClientLastName-apiv4"
        displayName:
          $ref: "#/components/schemas/api-service-inBodyClientDisplayName-apiv4"
        uuid:
          $ref: "#/components/schemas/api-service-inBodyClientUuid-apiv4"
        avatarUrl:
          $ref: "#/components/schemas/api-service-inBodyClientAvatarUrl-apiv4"
        birthDate:
          $ref: "#/components/schemas/api-service-inBodyClientBirthDate-apiv4"
        company:
          $ref: "#/components/schemas/api-service-inBodyClientCompany-apiv4"
        city:
          $ref: "#/components/schemas/api-service-inBodyClientCity-apiv4"
        address:
          $ref: "#/components/schemas/api-service-inBodyClientAddress-apiv4"
        zipCode:
          $ref: "#/components/schemas/api-service-inBodyClientZipCode-apiv4"
        province:
          $ref: "#/components/schemas/api-service-inBodyClientProvince-apiv4"
        countryCode:
          $ref: "#/components/schemas/api-service-inBodyClientCountryCode-apiv4"
        sex:
          $ref: "#/components/schemas/api-service-inBodyClientSex-apiv4"
        agreements:
          $ref: "#/components/schemas/api-service-Agreements-apiv4"
        attributes:
          $ref: "#/components/schemas/api-service-Attributes-apiv4-apiv4"
        tags:
          $ref: "#/components/schemas/api-service-Tags-apiv4"
    api-service-Tags-apiv4:
      type: array
      description: |
        Tags can be used to group profiles.

        Tag names (strings):
        - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
        - can't include the "null" control character (`\u0000`)
      items:
        type: string
        description: |
          Tag names (strings):
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
          - can't include the "null" control character (`\u0000`)
    api-service-Attributes-apiv4-apiv4:
      type: object
      description: |
        This object contains custom attributes that can have any name (except for reserved attributes, see warning below) and data type, as required by your integration.

        The attribute names can't include any characters that match the pattern (ECMA flavor): `/[\r\n\u2028\u2029\u00AD\u0000\uFE00-\uFE0F]/`

        String values:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
          - can't include the "null" control character (`\u0000`)

        If you want to send a date/time attribute for use in analytics, take the following into account:
        - The date/time should be formatted according to ISO 8601.
        - The time zone of the workspace affects dates/times in the attributes that DON'T have a defined timezone. Example:
            - `2023-10-09T12:00:00` doesn't have a timezone indicator and will be considered as a time in the workspace's time zone.
            - `2023-10-09T12:00:00+02:00` has a timezone indicator (`+02:00`), so the timezone of the workspace doesn't affect it.
            - `2023-10-09T12:00:00Z` is a time in the UTC time zone (denoted by the `Z` at the end), so the timezone of the workspace doesn't affect it.

        <strong><span style="color:red">WARNING<span></strong>: Some attributes cannot be sent in this object and will be ignored. Some of these are reserved for system use, and others must be sent as properties of the profile in the root object of the request body instead of inside the `attributes` object.

        <details><summary><span style="background:red;color:white">Click to expand the list of reserved attributes</span></summary>
        <code>email</code><br><code>id</code><br><code>clientId</code><br><code>phone</code><br><code>customId</code><br><code>uuid</code><br><code>firstName</code><br><code>lastName</code><br>
        <code>displayName</code><br><code>company</code><br><code>address</code><br><code>city</code><br><code>province</code><br><code>zipCode</code><br><code>countryCode</code><br>
        <code>birthDate</code><br><code>sex</code><br><code>avatarUrl</code><br><code>anonymous</code><br><code>agreements</code><br><code>tags</code><br><code>businessProfileId</code><br>
        <code>time</code><br><code>ip</code><br><code>source</code><br><code>newsletter_agreement</code><br><code>custom_identify</code><br><code>firstname</code><br>
        <code>lastname</code><br><code>created</code><br><code>updated</code><br><code>last_activity_date</code><br><code>birthdate</code><br><code>external_avatar_url</code><br>
        <code>displayname</code><br><code>receive_smses</code><br><code>receive_push_messages</code><br><code>receive_webpush_messages</code><br>
        <code>receive_btooth_messages</code><br><code>receive_rfid_messages</code><br><code>receive_wifi_messages</code><br>
        <code>zipCode</code><br><code>anonymous_type</code><br><code>country_id</code><br><code>geo_loc_country</code><br><code>geo_loc_isp</code><br>
        <code>geo_loc_lat</code><br><code>geo_loc_lon</code><br><code>club_card_id</code><br><code>type</code><br><code>confirmed</code><br><code>facebookId</code><br><code>deletedAt</code><br><code>deleted_unique</code><br><code>status</code><br><code>recognized</code><br><code>previous_clients</code><br><code>testProfile</code><br>
        <code>apikey</code><br><code>apiKey</code><br><code>ApiKey</code><br><code>Apikey</code><br><code>tracker</code><br><code>snr_sdk_version</code><br><code>eventCreateTime</code><br><code>correlationId</code>
        </details>
      additionalProperties:
        description: |
          The attribute names can't include any characters that match the pattern (ECMA flavor): `/[\r\n\u2028\u2029\u00AD\u0000\uFE00-\uFE0F]/`

          String values:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
          - can't include the "null" control character (`\u0000`)
    api-service-Agreements-apiv4:
      description: |-
        This object contains the marketing agreements of the Profile.

        You can also pass the values as strings (`"true"`;`"True"`/`"false"`;`"False"`) or integers (`1` for true and `0` for false).
      type: object
      properties:
        email:
          type: boolean
          description: Permission to receive marketing information by e-mail. This field has no effect if [email is not a unique identifier](https://hub.synerise.com/docs/settings/configuration/non-unique-emails/).
          default: false
        sms:
          type: boolean
          description: Permission to receive marketing information by SMS
          default: false
        push:
          type: boolean
          description: Permission to receive push notifications
          default: false
        webPush:
          type: boolean
          description: Permission to receive webpush notifications
          default: false
        bluetooth:
          type: boolean
          deprecated: true
          description: This field is ignored when sent.
          default: false
        rfid:
          type: boolean
          deprecated: true
          description: This field is ignored when sent.
          default: false
        wifi:
          type: boolean
          deprecated: true
          description: This field is ignored when sent.
          default: false
    api-service-inBodyClientSex-apiv4:
      type: string
      description: Profile's sex
      enum:
        - FEMALE
        - MALE
        - NOT_SPECIFIED
        - OTHER
    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-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-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-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-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-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-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-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-inResponseClientDetails-apiv4:
      type: object
      properties:
        clientId:
          $ref: "#/components/schemas/api-service-ClientId-apiv4"
        email:
          $ref: "#/components/schemas/api-service-inBodyClientEmail-apiv4"
        phone:
          $ref: "#/components/schemas/api-service-inBodyClientPhone-apiv4"
        customId:
          $ref: "#/components/schemas/api-service-inBodyClientCustomId-apiv4"
        uuid:
          $ref: "#/components/schemas/api-service-inBodyClientUuid-apiv4"
        firstName:
          $ref: "#/components/schemas/api-service-inBodyClientFirstName-apiv4"
        lastName:
          $ref: "#/components/schemas/api-service-inBodyClientLastName-apiv4"
        displayName:
          $ref: "#/components/schemas/api-service-inBodyClientDisplayName-apiv4"
        company:
          $ref: "#/components/schemas/api-service-inBodyClientCompany-apiv4"
        address:
          $ref: "#/components/schemas/api-service-inBodyClientAddress-apiv4"
        city:
          $ref: "#/components/schemas/api-service-inBodyClientCity-apiv4"
        province:
          $ref: "#/components/schemas/api-service-inBodyClientProvince-apiv4"
        zipCode:
          $ref: "#/components/schemas/api-service-inBodyClientZipCode-apiv4"
        countryCode:
          $ref: "#/components/schemas/api-service-inBodyClientCountryCode-apiv4"
        birthDate:
          $ref: "#/components/schemas/api-service-inBodyClientBirthDate-apiv4"
        sex:
          $ref: "#/components/schemas/api-service-inBodyClientSex-apiv4"
        avatarUrl:
          $ref: "#/components/schemas/api-service-inBodyClientAvatarUrl-apiv4"
        anonymous:
          description: Information if the profile is anonymous
          type: boolean
          example: false
        agreements:
          $ref: "#/components/schemas/api-service-Agreements-apiv4"
        attributes:
          $ref: "#/components/schemas/api-service-Attributes-apiv4-apiv4"
        tags:
          $ref: "#/components/schemas/api-service-Tags-apiv4"
        previousClients:
          $ref: "#/components/schemas/api-service-PreviousClients-apiv4"
        lastActivityDate:
          deprecated: true
          type: string
          example: 2019-03-19T14:05:39Z
          description: "**Don't use** the values from this field. The last activity calculation mechanism is disabled and the value is always the profile's creation date. The field will be removed in a future release."
    api-service-PreviousClients-apiv4:
      type: array
      description: |
        - When retrieving profile data, this field is always empty.
        - In the response after a profile merge, the format depends on the merge type.  
              This field only provides information about the last merge. If a profile in the last merge was the result of another merge in the past, the data of the previous merge isn't included.
      items:
        oneOf:
          - type: integer
            title: Merged by ID
            description: IDs of the profiles which were merged into the target profile
          - type: object
            title: Merged by customId
            description: Profiles which were merged into the target profile
            properties:
              customId:
                type: string
                description: customId of a profile merged into the target profile
    api-service-Tag-apiv4:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/api-service-TagId-apiv4"
        name:
          $ref: "#/components/schemas/api-service-TagName-apiv4"
        color:
          $ref: "#/components/schemas/api-service-TagColor-apiv4"
    api-service-TagColor-apiv4:
      description: Display color of the tag; hexadecimal value
      type: string
      example: "#0768ff"
    api-service-TagName-apiv4:
      description: Name of the tag
      type: string
      example: nice tag
    api-service-TagId-apiv4:
      description: ID of the tag
      type: integer
      format: int32
      example: 645
    api-service-inResponseClientDetailsArray-apiv4:
      type: array
      items:
        $ref: "#/components/schemas/api-service-inResponseClientDetails-apiv4"
    api-service-TagResponse-apiv4:
      type: object
      properties:
        businessProfileId:
          type: integer
          description: ID of the Workspace where the tag was created
          example: 100005
        id:
          $ref: "#/components/schemas/api-service-TagId-apiv4"
        name:
          $ref: "#/components/schemas/api-service-TagName-apiv4"
        color:
          $ref: "#/components/schemas/api-service-TagColor-apiv4"
    api-service-TagCreate-apiv4:
      type: object
      required:
        - name
      properties:
        name:
          $ref: "#/components/schemas/api-service-TagName-apiv4"
        color:
          $ref: "#/components/schemas/api-service-TagColor-apiv4"
    api-service-TagUpdate-apiv4:
      type: object
      properties:
        color:
          $ref: "#/components/schemas/api-service-TagColor-apiv4"
    api-service-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-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-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-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-ClientApplicationStartedEventParams-apiv4:
      type: object
      description: |
        Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

        Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

        <span style="color:red"><strong>WARNING:</strong></span>
        - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
        - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
        <code>modifiedBy</code><br>
        <code>apiKey</code><br>
        <code>eventUUID</code><br>
        <code>ip</code><br>
        <code>time</code><br>
        <code>businessProfileId</code>
      required:
        - applicationName
        - version
      properties:
        applicationName:
          $ref: "#/components/schemas/api-service-ApplicationName-apiv4"
        version:
          $ref: "#/components/schemas/api-service-Version-apiv4"
      additionalProperties: true
    api-service-Version-apiv4:
      type: string
      description: Version of the application which sends the event
    api-service-ApplicationName-apiv4:
      type: string
      description: Name of the application which sends the event
    api-service-EventBase-apiv4:
      type: object
      required:
        - label
        - client
      properties:
        label:
          $ref: "#/components/schemas/api-service-eventLabel-apiv4"
        client:
          $ref: "#/components/schemas/api-service-Client-apiv4"
        time:
          $ref: "#/components/schemas/api-service-Time-apiv4"
        eventSalt:
          $ref: "#/components/schemas/api-service-EventSalt-apiv4"
    api-service-DefaultParamSource-apiv4:
      type: object
      description: |
        Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

        If you want to send a date/time param for use in analytics, take the following into account:
        - The date/time should be formatted according to ISO 8601.
        - The time zone of the workspace affects dates/times in the params that DON'T have a defined timezone. Example:
            - `2023-10-09T12:00:00` doesn't have a timezone indicator and will be considered as a time in the workspace's time zone.
            - `2023-10-09T12:00:00+02:00` has a timezone indicator (`+02:00`), so the timezone of the workspace doesn't affect it.
            - `2023-10-09T12:00:00Z` is a time in the UTC time zone (denoted by the `Z` at the end), so the timezone of the workspace doesn't affect it.

        Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

        <span style="color:red"><strong>WARNING:</strong></span>
        - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
        - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
        <code>modifiedBy</code><br>
        <code>apiKey</code><br>
        <code>eventUUID</code><br>
        <code>ip</code><br>
        <code>time</code><br>
        <code>businessProfileId</code>
      additionalProperties: true
    api-service-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-Quantity-apiv4:
      description: The amount of goods
      type: number
    api-service-Producer-apiv4:
      type: string
      description: Manufacturer of the item
    api-service-ItemUrlAddress-apiv4:
      type: string
      description: URL address of the item page
    api-service-FinalUnitPrice-apiv4:
      description: Final price per unit. This value must be multiplied by `quantity` and added to `revenue`.
      required:
        - amount
        - currency
      type: object
      properties:
        amount:
          type: number
          minimum: 0
          description: The price of the items
          example: 3.25
        currency:
          $ref: "#/components/schemas/api-service-Currency-apiv4"
    api-service-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-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-Offline-apiv4:
      type: boolean
      description: Set to `true` if the event occurred outside a website, for example in a cash register
    api-service-ItemCategories-apiv4:
      type: array
      items:
        type: string
      description: If an item belongs to more than one category, include the categories in an array
    api-service-ItemCategory-apiv4:
      type: string
      description: Item category
      example: Beverages
    api-service-ItemName-apiv4:
      type: string
      description: Item name
      example: Soft drink
    api-service-CampaignHash-apiv4:
      type: string
      description: If the event results from a recommendation, this is the from the `x-Correlation-Id` header of AI Recommendations download
      example: 21e0d4b0-bd4e-497b-817b-4fr660284918
    api-service-FromRecommendation-apiv4:
      type: boolean
      description: Set to `true` if the event is triggered by an element from a recommendation.
    api-service-Products-apiv4:
      type: array
      items:
        $ref: "#/components/schemas/api-service-Product-apiv4"
      description: A list of items in the transaction
    api-service-Revenue-apiv4:
      required:
        - amount
        - currency
      type: object
      description: Transaction revenue (`net + taxes - discounts`). This field is not calculated automatically by the backend, you must provide the value by summing up the results of `finalUnitPrice * quantity` from all items in the `products` array.
      properties:
        amount:
          type: number
          minimum: 0
          description: The total amount
          example: 64.25
        currency:
          $ref: "#/components/schemas/api-service-Currency-apiv4"
    api-service-Value-apiv4:
      required:
        - amount
        - currency
      type: object
      description: If you want to display the price without tax, use this object. If you only want to display the total price of the transaction, set the values to the same as in `revenue`.
      properties:
        amount:
          type: number
          minimum: 0
          description: The total amount
          example: 112.25
        currency:
          $ref: "#/components/schemas/api-service-Currency-apiv4"
    api-service-DiscountCode-apiv4:
      description: Discount code
      type: string
    api-service-DiscountPercent-apiv4:
      description: Discount as a percentage
      type: number
      format: float
    api-service-DiscountAmount-apiv4:
      description: How much the total cost decreased
      type: object
      nullable: true
      properties:
        amount:
          type: number
          description: The discount amount
          minimum: 0
        currency:
          $ref: "#/components/schemas/api-service-Currency-apiv4"
    api-service-OrderStatus-apiv4:
      description: Status of the order
      type: string
    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-inBodyResourceUrl-apiv4:
      type: string
      description: URL address of the resource
    api-service-EventAction-apiv4:
      type: string
      example: context.action
      pattern: ^[a-zA-Z0-9\.\-_]{2,64}$
      description: |
        For custom events, enter your own action name. For pre-defined events, omit this field.<br>The action name can be up to 32 characters long and must match the following regular expression (ECMA flavor): `^[a-zA-Z0-9\\.\\-_]{2,64}$`
    api-service-EventType-apiv4:
      type: string
      description: |
        The type of event. If custom event, use `custom`.

        If other type, use the value that corresponds to the single event's endpoint.(for example, "content shared" events, which use the `/v4/events/shared` endpoint when sent as single events, have the type set to `shared`).
    api-service-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-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-Item-apiv4:
      type: string
      description: itemId (also called `sku`, `productId`, and `retailer_part_no` in other APIs and SDKs) of the item
    api-service-SearchType-apiv4:
      type: string
      description: Type of the search
      enum:
        - full-text-search
        - autocomplete
        - listing
        - visual
    api-service-ItemPosition-apiv4:
      type: integer
      description: Position of the clicked item in the result list (count starts with 1)
    api-service-CorrelationId-apiv4:
      type: string
      description: |
        `correlationId` of the request which this event relates to, for example a recommendation or search request (the parameter is included in the response to that request).
    api-service-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-CampaignId-apiv4:
      type: string
      description: ID of the campaign related to the event
    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-RecommendationItems-apiv4:
      type: array
      description: An array of items included in the recommendation. The items are identified by their `itemId` (also called `sku`, `productId`, and `retailer_part_no` in other APIs and SDKs)
      minItems: 0
      items:
        $ref: "#/components/schemas/api-service-Item-apiv4"
    api-service-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-Suggestion-apiv4:
      type: string
      description: Suggestion name
    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-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-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"
    catalogs-ErrorResponse:
      type: object
      properties:
        status:
          type: integer
          description: Status code
        error:
          type: string
          description: Error summary
        message:
          type: string
          description: Error message
        timestamp:
          type: string
          description: Time when the error occurred
    catalogs-responseMeta:
      type: object
      description: This object holds the metadata of the response.
      properties:
        totalCount:
          type: integer
          description: The total number of matching values (key-value pairs; array items; objects) in the database
        requestTime:
          type: string
          description: The processing time of the request
          example: 0.11 [s]
    catalogs-bag:
      type: object
      description: This object holds the details of the catalog.
      properties:
        id:
          type: integer
          description: Catalog ID
        name:
          type: string
          description: Catalog name
        businessProfileId:
          type: integer
          description: ID of the Business Profile that contains this catalog
        createdBy:
          $ref: "#/components/schemas/catalogs-Author"
        creationDate:
          format: date-time
          type: string
          description: Creation date
        modifiedBy:
          $ref: "#/components/schemas/catalogs-Author"
        lastModified:
          type: string
          format: date-time
          description: Last modification date
        primaryKey:
          $ref: "#/components/schemas/catalogs-primaryKey"
        mappings:
          type: array
          items:
            $ref: "#/components/schemas/catalogs-mappingResponse"
        beforeFiltering:
          type: boolean
        fields:
          type: array
          items:
            type: string
    catalogs-mappingResponse:
      type: object
      required:
        - bpActionParamKey
        - bagId
        - itemId
        - action
        - paramKey
        - enrichmentFields
      properties:
        bpActionParamKey:
          type: string
        bagId:
          type: integer
          format: int64
        itemId:
          type: integer
          format: int64
        action:
          type: string
        paramKey:
          type: string
        enrichmentFields:
          type: array
          items:
            type: string
    catalogs-primaryKey:
      type: object
      required:
        - name
      properties:
        name:
          type: string
        description:
          type: string
    catalogs-Author:
      type: object
      description: Data of user
      properties:
        id:
          type: integer
          description: Id of the user
        name:
          type: string
          description: Name of the user
        iconUrl:
          type: string
          description: URL of the user's avatar icon
    catalogs-addBag:
      type: object
      properties:
        name:
          type: string
          description: Catalog name
    catalogs-deleteResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: ID of the catalog
        result:
          type: boolean
          description: "`true` if the catalog was deleted successfully"
    catalogs-item:
      type: object
      description: Details of the item
      properties:
        bag:
          type: object
          description: Metadata of the catalog that includes the entry
          properties:
            id:
              type: integer
              format: int64
              description: Catalog ID
            name:
              type: string
              description: Catalog name
            businessProfileId:
              type: integer
              description: ID of the Business Profile that contains this catalog
            author:
              type: string
              description: ID of the catalog's creator
            lastModified:
              type: string
              format: date-time
              description: Last modification date
            creationDate:
              format: date-time
              type: string
              description: Creation date
            primaryKey:
              $ref: "#/components/schemas/catalogs-primaryKey"
            mappings:
              type: array
              items:
                $ref: "#/components/schemas/catalogs-mappingResponse"
        itemKey:
          type: string
          description: They unique value of the item key (for example, an SKU) that was used to upload this entry. This is the `key` query parameter used in [this endpoint](#operation/getItemByKey).
        id:
          type: integer
          format: int64
          description: ID of the entry. This is the `itemId` used in [this endpoint](#operation/getItem).
        value:
          type: string
          description: Contents of the entry
          example: '{"Name":"John","Surname":"Doe"}'
        creationDate:
          type: string
          description: Creation date of the entry
        lastModified:
          type: string
          description: Last modified date of the entry
    catalogs-addItem:
      type: object
      required:
        - itemKey
        - value
      properties:
        itemKey:
          $ref: "#/components/schemas/catalogs-itemKey"
        value:
          type: object
          description: Properties of the item. Can be an empty object.
          additionalProperties:
            type: string
            description: Key:value data
          example:
            itemCategory: smartphone
            itemColor: blue
    catalogs-itemKey:
      type: string
      description: |
        The value of the unique key of the item.

        Slashes (`/`) are not allowed in the value.

        In the Synerise Portal, this value is saved under **Primary key**.
      example: sku1357
    catalogs-enrichmentUpdateRequest:
      type: object
      properties:
        action:
          type: string
        paramKey:
          type: string
        enrichmentFields:
          type: array
          items:
            type: string
    catalogs-mapper:
      type: object
      description: Details of the mapping
      properties:
        bpActionParamKey:
          type: string
          description: The unique identifier of this mapping
        bagId:
          type: integer
          description: The catalog associated with this mapping
        action:
          type: string
          description: The `action` field of the event
          example: transaction.charge
        paramKey:
          type: string
          description: The parameter in the event that corresponds to the catalog column with the unique identifiers
          example: sku
        enrichmentFields:
          type: array
          items:
            type: string
          description: enrichment fields
    catalogs-eventData:
      type: object
      properties:
        action:
          type: string
          description: The `action` field of the event
          example: transaction.charge
        paramKey:
          type: string
          description: The parameter in the event that corresponds to the catalog column with the unique identifiers
          example: sku
    catalogs-enableFilteringRequest:
      type: object
      properties:
        fields:
          type: array
          items:
            type: string
    catalogs-disableFilteringRequest:
      type: object
      properties:
        removeFilters:
          type: boolean
    crm-ClientDetails:
      type: object
      properties:
        base:
          type: object
          description: The details of a Profile
          additionalProperties:
            description: The name of a parameter
            type: object
            properties:
              label:
                type: string
                description: A name for the parameter (can be a default parameter created by Synerise or a custom one)
              value:
                description: The value of the parameter
        tags:
          type: array
          description: The Profile's tags
          items:
            type: string
    crm-CustomerCommon:
      type: object
      properties:
        uuid:
          type: string
          description: |
            UUID of the Profile

            **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
        email:
          type: string
          description: |
            Profile's e-mail address

            **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/).
        firstname:
          type: string
          description: Profile's first name
        lastName:
          type: string
          description: Profile's last name
        custom_identify:
          type: string
          description: |
            A custom ID for the Profile

            **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/).
        company:
          type: string
          description: Profile's company
        phone:
          type: string
          description: |
            Profile's phone number

            **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/).
        address:
          type: string
          description: Profile's street address
        birthdate:
          type: string
          format: date
          description: Profile's date of birth. Must be a past date.
        city:
          type: string
          description: Profile's city of residence
        zipCode:
          type: string
          description: Profile's zip code
        province:
          type: string
          description: Profile's province of residence
        country_id:
          type: string
          description: ID of the Profile's country of residence
        countryCode:
          type: string
          description: Code of Profile's country of residence
          example: PL
        avatarUrl:
          type: string
          nullable: true
          description: URL of the Profile's avatar picture
        sex:
          type: string
          description: |
            Profile's sex.

            - 0: undefined
            - 1: female
            - 2: male
            - 3: other
          enum:
            - "0"
            - "1"
            - "2"
            - "3"
        tags:
          type: array
          description: Custom tags. They can be used, for example, to group Profiles.
          items:
            type: string
        additionalProperties:
          description: |
            Additional attributes, including custom attributes.

            The following attributes are reserved for system use and can't be modified:
            <details><summary>Click to expand the list of reserved attributes</summary>
            <code>email</code><br><code>clientId</code><br><code>phone</code><br><code>customId</code><br><code>uuid</code><br><code>firstName</code><br><code>lastName</code><br><code>displayName</code><br><code>company</code><br><code>address</code><br><code>city</code><br><code>province</code><br><code>zipCode</code><br><code>countryCode</code><br><code>birthDate</code><br><code>sex</code><br><code>avatarUrl</code><br><code>anonymous</code><br><code>agreements</code><br><code>tags</code><br><code>businessProfileId</code><br><code>time</code><br><code>ip</code><br><code>source</code><br><code>newsletter_agreement</code><br><code>custom_identify</code><br><code>firstname</code><br><code>lastname</code><br><code>created</code><br><code>updated</code><br><code>last_activity_date</code><br><code>birthdate</code><br><code>external_avatar_url</code><br><code>displayname</code><br><code>receive_smses</code><br><code>receive_push_messages</code><br><code>receive_webpush_messages</code><br><code>receive_btooth_messages</code><br><code>receive_rfid_messages</code><br><code>receive_wifi_messages</code><br><code>confirmation_hash</code><br><code>ownerId</code><br><code>zipCode</code><br><code>anonymous_type</code><br><code>country_id</code><br><code>geo_loc_city</code><br><code>geo_loc_country</code><br><code>geo_loc_as</code><br><code>geo_loc_country_code</code><br><code>geo_loc_isp</code><br><code>geo_loc_lat</code><br><code>geo_loc_lon</code><br><code>geo_loc_org</code><br><code>geo_loc_query</code><br><code>geo_loc_region</code><br><code>geo_loc_region_name</code><br><code>geo_loc_status</code><br><code>geo_loc_timezone</code><br><code>geo_loc_zip</code><br><code>club_card_id</code><br><code>type</code><br><code>confirmed</code><br><code>facebookId</code><br><code>status</code>
            </details>
    morph-HttpErrorDetails:
      type: object
      required:
        - error
        - status
      properties:
        error:
          type: string
          description: Summary of the error
        status:
          type: integer
          format: int32
          description: Status code
        timestamp:
          type: string
          description: Time when the error occurred
        message:
          type: string
          description: Description of the problem. If an error code is included, check the [API Error Reference](https://developers.synerise.com/errors.html) for details.
    morph-ExportResponse:
      type: object
      required:
        - taskId
        - columnOrder
        - estimatedCount
      properties:
        taskId:
          type: string
          format: uuid
          description: ID of the submitted task. Save this ID to be able to retrieve the data.
        columnOrder:
          type: array
          description: Fields included in the export
          items:
            type: string
            description: Name of an exported attribute/tag/analysis
        estimatedCount:
          type: number
          description: Estimated number of profiles in the exported segment
    morph-NewProfileExport:
      type: object
      required:
        - name
        - fields
        - agreementFilter
        - segmentationHash
        - excludedIds
      properties:
        name:
          type: string
          description: Name of the export, visible at [https://app.synerise.com/assets/](https://app.synerise.com/assets/exports)
        fields:
          type: array
          example:
            - id
            - attr1
            - attr2
          minItems: 1
          items:
            type: string
          description: |
            Profile attributes to export.

            **The first attribute in this array MUST BE `id`**
        agreementFilter:
          type: string
          enum:
            - NONE
            - EMAIL
            - WEB_PUSH
            - PUSH
            - SMS
            - RECOGNIZED
            - ANONYMOUS
          description: You can filter the profiles by their marketing agreement. `NONE` means no filter.
        segmentationHash:
          type: string
          format: uuid
          description: UUID of the segmentation which defines the profiles to export. The segmentation conditions are checked at the time of sending the "create and run export" request.
        tags:
          type: array
          description: Profile tags to check for an exported profile. In the results, the tag name is the key and the value is "true" (string) if the tag is assigned to a given profile, otherwise it's "false".
          items:
            type: string
        expressions:
          type: array
          description: UUIDs of expressions to check for an exported profile. In the results, the name of the expression is the key and the value is the result of the expression.
          items:
            type: string
            format: uuid
        aggregates:
          type: array
          description: UUIDs of aggregates to check for an exported profile. In the results, the name of the aggregate is the key and the value is the result of the aggregate.
          items:
            type: string
            format: uuid
        segmentations:
          type: array
          description: UUIDs of segmentations to check for an exported profile. In the results, the name of the segmentation is the key and the value is "true" (string) if the profile belongs to the segmentation, otherwise it's "false".
          items:
            type: string
            format: uuid
        excludedIds:
          type: array
          minItems: 0
          items:
            type: number
          description: List of clientIds to exclude from the exported data
    morph-JobStatus:
      type: string
      description: High-level status of the job. If a given type of job doesn't exist in a workflow (for example, `transformData` in a workflow without any Data Transformation nodes), the status is `Pending`.
      enum:
        - Pending
        - InProgress
        - Finished
        - Failed
        - Warning
      example: Pending
    notes-service-NoteResponse:
      type: object
      description: The content and metadata of the note
      properties:
        body:
          type: string
          description: Text of the note
          example: <h1>NOTE 1</h1>\n<p>Some text</p>\n<ul>\n<li>1</li>\n<li>2</li>\n<li>3</li>\n</ul>\n<blockquote>Lorem ipsum in quote</blockquote>\n<p><strong>Lorem ipsum in bold</strong></p>\n
        created:
          type: string
          format: date-time
          description: Creation time
          example: 2019-08-01T08:03:31.556Z
        createdBy:
          type: string
          description: ID of the Synerise User who created the note
          example: example@example.com
        id:
          type: string
          description: UUID of the note
          example: 69b0e925-086a-4964-b8dc-4c9e58213cf5
        subject:
          type: string
          description: The title of the note
          example: Note 1
        updated:
          type: string
          format: date-time
          description: Last update time
          example: 2019-08-01T08:03:38.556Z
        updatedBy:
          type: string
          description: ID of the last user who updated the note
          example: example@example.com
        userId:
          type: integer
          format: int64
          description: Numerical ID of the last user who updated the note
          example: 11405
    notes-service-NoteRequest:
      type: object
      description: The content of the note
      properties:
        subject:
          type: string
          description: The title of the note
          example: Note 1
        body:
          type: string
          description: Text of the note
          example: <h1>NOTE 1</h1>\n<p>Some text</p>\n<ul>\n<li>1</li>\n<li>2</li>\n<li>3</li>\n</ul>\n<blockquote>Lorem ipsum in quote</blockquote>\n<p><strong>Lorem ipsum in bold</strong></p>\n
    sauth-4xx-base:
      type: object
      properties:
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
        errors:
          type: array
          description: An array of detailed error messages, if applicable
          items:
            type: object
            properties:
              code:
                type: integer
                description: Error code
              field:
                type: string
                description: Name of the field that did not pass validation
              message:
                type: string
                description: Details of the problem
              rejectedValue:
                description: The value that did not pass validation
                anyOf:
                  - type: string
                  - type: number
                  - type: integer
                  - type: boolean
                  - type: array
                    items: {}
                  - type: object
        status:
          type: integer
          format: int32
          description: Status code
        timestamp:
          type: string
          description: Time when the message was sent
        path:
          type: string
          description: URL of the requested resource
        traceId:
          type: string
          description: ID for debugging
    sauth-ClientLogoutRequest:
      type: object
      properties:
        action:
          type: string
          enum:
            - LOGOUT
            - LOGOUT_WITH_SESSION_CLEARING
    tags-collector-DirectoryDto-collector:
      type: object
      description: Information about the directory where the tag is assigned. Can be `null`.
      properties:
        createdAt:
          $ref: "#/components/schemas/tags-collector-CreatedAt-collector"
        hash:
          type: string
          description: HashID of the directory
        name:
          $ref: "#/components/schemas/tags-collector-DirectoryName-collector"
        params:
          $ref: "#/components/schemas/tags-collector-DirectoryParams-collector"
        type:
          $ref: "#/components/schemas/tags-collector-DirectoryTypeDto-collector"
    tags-collector-DirectoryTypeDto-collector:
      type: object
      description: Details of the directory type
      properties:
        createdAt:
          $ref: "#/components/schemas/tags-collector-CreatedAt-collector"
        hash:
          $ref: "#/components/schemas/tags-collector-DirectoryTypeHash-collector"
        name:
          $ref: "#/components/schemas/tags-collector-DirectoryTypeName-collector"
    tags-collector-DirectoryTypeName-collector:
      type: string
      description: Name of the directory type
    tags-collector-DirectoryTypeHash-collector:
      type: string
      description: HashID of the directory type
    tags-collector-CreatedAt-collector:
      type: string
      format: date-time
      description: Creation time
    tags-collector-DirectoryParams-collector:
      type: object
      description: Free-form parameters
      additionalProperties:
        anyOf:
          - type: string
          - type: number
          - type: boolean
    tags-collector-DirectoryName-collector:
      type: string
      description: Name of the directory
    tags-collector-DirectoryCreateRequest-collector:
      type: object
      required:
        - name
      properties:
        name:
          $ref: "#/components/schemas/tags-collector-DirectoryName-collector"
        params:
          $ref: "#/components/schemas/tags-collector-DirectoryParams-collector"
        type:
          $ref: "#/components/schemas/tags-collector-DirectoryTypeHash-collector"
    tags-collector-DirectoryTypeCreateRequest-collector:
      type: object
      required:
        - name
      properties:
        name:
          $ref: "#/components/schemas/tags-collector-DirectoryTypeName-collector"
    tags-collector-DirectoryUpdateRequest-collector:
      type: object
      properties:
        name:
          $ref: "#/components/schemas/tags-collector-DirectoryName-collector"
        params:
          $ref: "#/components/schemas/tags-collector-DirectoryParams-collector"
    tags-collector-TagDto-collector:
      type: object
      properties:
        authorId:
          $ref: "#/components/schemas/tags-collector-UserId-collector"
        color:
          $ref: "#/components/schemas/tags-collector-TagColor-collector"
        createdAt:
          $ref: "#/components/schemas/tags-collector-CreatedAt-collector"
        description:
          $ref: "#/components/schemas/tags-collector-TagDescription-collector"
        directory:
          $ref: "#/components/schemas/tags-collector-DirectoryDto-collector"
        hash:
          type: string
          description: Hash ID of the tag
        icon:
          $ref: "#/components/schemas/tags-collector-TagIcon-collector"
        priority:
          $ref: "#/components/schemas/tags-collector-TagPriority-collector"
        value:
          $ref: "#/components/schemas/tags-collector-TagValue-collector"
    tags-collector-TagValue-collector:
      type: string
      description: Name of the tag
    tags-collector-TagPriority-collector:
      type: integer
      description: Tag priority. Lower values mean higher priority.
      default: 0
    tags-collector-TagIcon-collector:
      type: string
      description: URL of the tag's icon
      nullable: true
    tags-collector-TagDescription-collector:
      type: string
      description: Description of the tag
    tags-collector-TagColor-collector:
      type: string
      description: Hex code of the tag color
      nullable: true
    tags-collector-UserId-collector:
      type: integer
      description: ID of the user who created the tag
    tags-collector-DirectoryTypeUpdateRequest-collector:
      type: object
      properties:
        directoryTypeHash:
          type: string
          description: HashID of the directory type
    tags-collector-PaginationResponse_PaginatedTagDto_:
      type: object
      properties:
        data:
          type: array
          description: A list of tags on the retrieved page
          items:
            $ref: "#/components/schemas/tags-collector-PaginatedTagDto-collector"
        pagination:
          $ref: "#/components/schemas/tags-collector-PaginationInfo-collector"
    tags-collector-PaginationInfo-collector:
      type: object
      description: Pagination details
      properties:
        limit:
          type: integer
          format: int32
          description: Limit of items per page
          default: 10
        page:
          type: integer
          format: int32
          description: Current page number
          default: 0
        pages:
          type: integer
          format: int32
          description: Total number of pages
        total:
          type: integer
          format: int64
          description: Total number of items on all pages
    tags-collector-PaginatedTagDto-collector:
      type: object
      properties:
        authorId:
          $ref: "#/components/schemas/tags-collector-UserId-collector"
        color:
          $ref: "#/components/schemas/tags-collector-TagColor-collector"
        createdAt:
          $ref: "#/components/schemas/tags-collector-CreatedAt-collector"
        description:
          type: string
          description: Description of the tag
        directory:
          $ref: "#/components/schemas/tags-collector-PaginatedDirectoryDto-collector"
        hash:
          $ref: "#/components/schemas/tags-collector-TagHash-collector"
        icon:
          $ref: "#/components/schemas/tags-collector-TagIcon-collector"
        priority:
          $ref: "#/components/schemas/tags-collector-TagPriority-collector"
        value:
          $ref: "#/components/schemas/tags-collector-TagValue-collector"
    tags-collector-TagHash-collector:
      type: string
      description: HashID of a tag
    tags-collector-PaginatedDirectoryDto-collector:
      type: object
      description: Details of the directory where the tag is assigned
      properties:
        createdAt:
          $ref: "#/components/schemas/tags-collector-CreatedAt-collector"
        hash:
          type: string
          description: Hash ID of the directory
        name:
          $ref: "#/components/schemas/tags-collector-DirectoryName-collector"
        type:
          $ref: "#/components/schemas/tags-collector-DirectoryTypeDto-collector"
    tags-collector-TagCreateRequest-collector:
      type: object
      required:
        - value
        - priority
      properties:
        color:
          $ref: "#/components/schemas/tags-collector-TagColor-collector"
        description:
          $ref: "#/components/schemas/tags-collector-TagDescription-collector"
        directory:
          $ref: "#/components/schemas/tags-collector-TagDirectory-collector"
        icon:
          $ref: "#/components/schemas/tags-collector-TagIcon-collector"
        priority:
          $ref: "#/components/schemas/tags-collector-TagPriority-collector"
        value:
          $ref: "#/components/schemas/tags-collector-TagValue-collector"
    tags-collector-TagDirectory-collector:
      type: string
      description: Hash ID of the directory where the tag is assigned
      nullable: true
    tags-collector-TagUpdateRequest-collector:
      type: object
      properties:
        color:
          $ref: "#/components/schemas/tags-collector-TagColor-collector"
        description:
          $ref: "#/components/schemas/tags-collector-TagDescription-collector"
        directory:
          $ref: "#/components/schemas/tags-collector-TagDirectory-collector"
        icon:
          $ref: "#/components/schemas/tags-collector-TagIcon-collector"
        priority:
          $ref: "#/components/schemas/tags-collector-TagPriority-collector"
        value:
          $ref: "#/components/schemas/tags-collector-TagValue-collector"
  parameters:
    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-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-queryLimit:
      in: query
      name: limit
      description: The maximum number of events to retrieve
      required: false
      schema:
        type: number
        minimum: 1
        maximum: 1000
    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-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-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-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
    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-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-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-pathIdentifierType:
      in: path
      name: identifierType
      description: Profile identifier type
      required: true
      schema:
        type: string
        enum:
          - id
          - uuid
          - email
          - custom_identify
    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-expressionIdAsPathParam:
      name: expressionId
      in: path
      description: Expression ID
      required: true
      style: simple
      explode: false
      schema:
        type: string
        format: uuid
    analytics-ids:
      name: ids
      in: query
      description: Comma-separated list of IDs (in UUID format) to filter results through
      required: false
      style: form
      explode: false
      schema:
        type: string
    analytics-directoryId:
      name: directoryId
      description: Unique ID of the directory to retrieve analyses from
      in: query
      required: false
      schema:
        type: string
        format: uuid
    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-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-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-clientIdAsPathParameter:
      name: clientId
      in: path
      description: Client ID
      required: true
      style: simple
      explode: false
      schema:
        type: integer
        format: int64
    analytics-aggregateIdAsPathParam:
      name: aggregateId
      in: path
      description: Aggregate ID
      required: true
      style: simple
      explode: false
      schema:
        type: string
        format: uuid
    analytics-aggregateType:
      name: aggregateType
      in: query
      description: Filter by aggregate type
      required: false
      schema:
        type: string
        enum:
          - AGGREGATE
          - RUNNING_AGGREGATE
    api-service-apiVersionHeader-apiv4:
      name: Api-Version
      in: header
      required: true
      style: simple
      explode: false
      schema:
        type: string
        enum:
          - "4.4"
    api-service-contentTypeHeader-apiv4:
      name: Content-Type
      in: header
      required: true
      style: simple
      explode: false
      schema:
        type: string
        enum:
          - application/json
    api-service-acceptHeader-apiv4:
      name: Accept
      in: header
      required: true
      style: simple
      explode: false
      schema:
        type: string
        enum:
          - application/json
    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-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-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-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-pathTagId-apiv4:
      name: tagID
      in: path
      description: ID of the tag
      required: true
      schema:
        type: integer
        example: 645
    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
    catalogs-queryDelimiter:
      in: query
      name: delimiter
      description: "The delimiter to use in csv. You can use `;` or `,`. Default: `,`"
      required: false
      schema:
        type: string
    catalogs-pathCatalogId:
      in: path
      name: catalogId
      description: ID of the catalog
      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-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-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-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-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
    crm-pathClientId:
      name: clientId
      in: path
      description: |
        Profile ID

        **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
    notes-service-profileId:
      in: path
      name: clientId
      required: true
      description: Profile ID
      schema:
        type: integer
        format: int64
    sauth-pathClientId:
      name: clientID
      in: path
      description: The ID of the Profile
      required: true
      schema:
        type: string
        example: "434428563"
    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
  responses:
    activities-api-EventResponse:
      description: Events
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/activities-api-PaginatedEvents"
    analytics-genericError:
      description: See error message for details
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/analytics-Error"
    api-service-415-apiv4:
      description: Unsupported Media Type
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/api-service-HTTP400-apiv4"
          example:
            timestamp: 2018-06-07T07:27:23.136+00:00
            status: 415
            error: Unsupported Media Type
            message: Content type 'application/xml' not supported
            path: /path_of_the_endpoint
    api-service-404-pii:
      description: Profile not found or access blocked by PII protection settings
      content:
        application/json:
          schema:
            type: string
            description: Description of the problem. If the access is blocked by insufficient PII permissions, the message is the same as when the profile doesn't exist.
            example: Client 5005535044 not found
    api-service-403-apiv4:
      description: Forbidden; insufficient permissions (when PII protection is enabled, PII permissions are required in addition to the permissions listed in the method description)
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/api-service-HTTP400-apiv4"
          example:
            timestamp: 2018-06-07T07:29:27.489+00:00
            status: 403
            error: Forbidden
            message: Forbidden
            path: /path_of_the_endpoint
    api-service-401-apiv4:
      description: "Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc."
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/api-service-HTTP400-apiv4"
          example:
            error: Bad Request
            status: 400
            timestamp: 2020-10-29T13:08:16.235Z
            path: /exampleEndpoint
            message: Some fields did not pass validation
            errors:
              - code: 120
                field: exampleField
                message: "120"
                rejectedValue: exampleValue
    api-service-400-apiv4:
      description: "Bad request: input data missing or malformed"
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/api-service-HTTP400-apiv4"
          example:
            timestamp: 2018-06-07T07:28:26.078+00:00
            status: 400
            error: Bad Request
            message: Version header content is invalid
            path: /path_of_the_endpoint
    catalogs-404:
      description: Entity not found
      content:
        text/plain:
          schema:
            type: string
    catalogs-403:
      description: "Forbidden: insufficient permissions; wrong consumer scope"
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/catalogs-ErrorResponse"
    catalogs-401:
      description: "Unauthorized: token missing/expired/invalid; invalid API key; etc."
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/catalogs-ErrorResponse"
    catalogs-400:
      description: Invalid or insufficient data
      content:
        text/plain:
          schema:
            type: string
    catalogs-400generic:
      description: A problem occurred. See the error message for details.
      content:
        application/json:
          schema:
            type: object
            properties:
              timestamp:
                type: string
                description: Time when the error occurred
              errorCode:
                type: string
                description: Error code. See [API error code reference](https://developers.synerise.com/errors.html).
              httpStatus:
                type: integer
                description: HTTP code of the error
              message:
                type: string
                description: A summary of the problem
              traceId:
                type: string
                nullable: true
                description: Trace ID for troubleshooting, if applicable
    crm-404-pii:
      description: Resource not found or access blocked by PII protection settings
      content:
        text/plain:
          schema:
            type: string
            description: Description of the problem
    morph-BadRequest:
      description: Invalid request
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/morph-HttpErrorDetails"
          example:
            error: Bad Request
            status: 400
            timestamp: 2021-01-04T16:15:51.703Z
            message: Message describing issue with provided request
    sauth-403-forbidden:
      description: Insufficient permissions or wrong JWT scope (for example, profile token where a workspace token was required)
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/sauth-4xx-base"
    sauth-401-unauthorized:
      description: JWT missing, expired, or invalid
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/sauth-4xx-base"
