openapi: 3.0.0
info:
  title: Loyalty and Engagement - 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: Promotions
  - name: Vouchers
  - name: Handbills
  - name: Screen views
  - name: Promotions points
  - name: Promotion settings
  - name: Promotion locks
  - name: Screen views (legacy)
x-tagGroups:
  - name: Loyalty and Engagement
    tags:
      - Promotions
      - Vouchers
      - Handbills
      - Screen views
      - Promotions points
      - Promotion settings
      - Promotion locks
      - Screen views (legacy)
paths:
  /v4/promotions/promotion/get-for-client:
    get:
      tags:
        - Promotions
      summary: Get a Profile's promotions as Profile
      description: |
        A Profile can retrieve a list of all its promotions, assigned or activated. By default, only non-expired promotions are retrieved.

        **IMPORTANT**: 
        - As a result of this request, the `targetSegments` of all the matching promotions are checked. If this results in checking more than 30 unique segments, any segments above this limit may be ignored.
        - The endpoint is limited to 25000 requests per minute (per workspace).


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>
      operationId: GetAClientsPromotions
      parameters:
        - $ref: "#/components/parameters/promotions-queryPromotionSort"
        - $ref: "#/components/parameters/promotions-queryPromotionStatus"
        - $ref: "#/components/parameters/promotions-queryPromotionPresentOnly"
        - $ref: "#/components/parameters/promotions-queryPromotionDisplayableOnly"
        - $ref: "#/components/parameters/promotions-queryTagNames"
        - $ref: "#/components/parameters/promotions-queryLimit"
        - $ref: "#/components/parameters/promotions-queryPage"
        - $ref: "#/components/parameters/promotions-queryIncludeMeta"
        - $ref: "#/components/parameters/promotions-queryCheckGlobalActivationLimits"
        - $ref: "#/components/parameters/promotions-queryIncludeVouchers"
        - $ref: "#/components/parameters/promotions-queryStoreIds"
      responses:
        "200":
          description: An array of promotions
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/promotions-promotionClientDataResponse"
                    description: An array of promotions
                  meta:
                    $ref: "#/components/schemas/promotions-responseMeta"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/GetAClientsPromotions
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/promotions/promotion/get-for-client?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

            conn.request("GET", "/v4/promotions/promotion/get-for-client?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=SOME_STRING_VALUE", headers=headers)

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/v4/promotions/promotion/get-for-client?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/promotion/get-for-client?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/get-for-client');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'sort' => 'requireRedeemedPoints,desc',
              'status' => 'SOME_ARRAY_VALUE',
              'presentOnly' => 'true',
              'displayableOnly' => 'true',
              'tagNames' => 'SOME_ARRAY_VALUE',
              'limit' => '100',
              'page' => '4',
              'includeMeta' => 'false',
              'checkGlobalActivationLimits' => 'true',
              'includeVouchers' => 'false',
              'storeIds' => 'SOME_STRING_VALUE'
            ]);

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/promotions/promotion/get-for-client?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/promotion/duplicate:
    post:
      tags:
        - Promotions
      summary: Duplicate existing promotion
      description: |
        You can duplicate an existing promotion.

        ---

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

        **API key permission required:** `PROMOTIONS_DUPLICATE_PROMOTIONS_CREATE`

        **User role permission required:** `campaigns_promotions: create`
      operationId: duplicatePromotion
      requestBody:
        required: true
        description: Provide only one of the parameters.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-duplicatePromotionRequest"
      responses:
        "200":
          description: Promotion duplicated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-promotionDataResponse"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          description: Promotion not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Promotion not found
        "500":
          description: Internal Server Error
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/duplicatePromotion
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/promotion/duplicate \
              --header 'content-type: application/json' \
              --data '{"uuid":"string","code":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"uuid\":\"string\",\"code\":\"string\"}"

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

            conn.request("POST", "/v4/promotions/promotion/duplicate", payload, headers)

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

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

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

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

            xhr.open("POST", "https://api.synerise.com/v4/promotions/promotion/duplicate");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/promotion/duplicate",
              "headers": {
                "content-type": "application/json"
              }
            };

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

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

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

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

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

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

            $request->setBody('{"uuid":"string","code":"string"}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/promotions/promotion/duplicate")
              .header("content-type", "application/json")
              .body("{\"uuid\":\"string\",\"code\":\"string\"}")
              .asString();
  /v4/promotions/promotion/activate:
    post:
      tags:
        - Promotions
      summary: Activate a promotion
      description: |
        A Profile can change the status of a promotion from `assigned` to `active`, the promotion can now be applied to a purchase.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>
      operationId: ActivateAPromotion
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-promotionActivation"
        required: true
      responses:
        "200":
          description: Promotion activated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-promotionClientDataResponse"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          $ref: "#/components/responses/promotions-Promotion404"
        "409":
          $ref: "#/components/responses/promotions-WaitingForProfileLockReleaseError"
        "412":
          $ref: "#/components/responses/promotions-PromotionActivate412"
        "422":
          $ref: "#/components/responses/promotions-PromotionActivate422"
        "423":
          $ref: "#/components/responses/promotions-ProfilePromotionsBlockedError"
        "500":
          $ref: "#/components/responses/promotions-500"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/ActivateAPromotion
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/promotion/activate \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"key":"code","value":"7893467834GG","pointsToUse":100}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}"

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

            conn.request("POST", "/v4/promotions/promotion/activate", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "key": "code",
              "value": "7893467834GG",
              "pointsToUse": 100
            });

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

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

            xhr.open("POST", "https://api.synerise.com/v4/promotions/promotion/activate");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

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

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

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

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

            req.write(JSON.stringify({key: 'code', value: '7893467834GG', pointsToUse: 100}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"key":"code","value":"7893467834GG","pointsToUse":100}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/promotions/promotion/activate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}")
              .asString();
  /v4/promotions/promotion/batch-activate:
    post:
      tags:
        - Promotions
      summary: Batch activate promotions
      description: |
        A Profile can change the status of a number of promotions from `assigned` to `active`, the promotion can now be applied to a purchase.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>
      operationId: BatchActivate
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/promotions-promotionActivation"
        required: true
      responses:
        "200":
          description: Promotions activated
          content:
            application/json:
              schema:
                type: object
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          $ref: "#/components/responses/promotions-Promotion404"
        "409":
          $ref: "#/components/responses/promotions-WaitingForProfileLockReleaseError"
        "412":
          $ref: "#/components/responses/promotions-PromotionActivate412"
        "423":
          $ref: "#/components/responses/promotions-ProfilePromotionsBlockedError"
        "500":
          $ref: "#/components/responses/promotions-500"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/BatchActivate
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/promotion/batch-activate \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '[{"key":"code","value":"7893467834GG","pointsToUse":100}]'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]"

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

            conn.request("POST", "/v4/promotions/promotion/batch-activate", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              {
                "key": "code",
                "value": "7893467834GG",
                "pointsToUse": 100
              }
            ]);

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

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

            xhr.open("POST", "https://api.synerise.com/v4/promotions/promotion/batch-activate");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

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

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

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

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

            req.write(JSON.stringify([{key: 'code', value: '7893467834GG', pointsToUse: 100}]));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('[{"key":"code","value":"7893467834GG","pointsToUse":100}]');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/promotions/promotion/batch-activate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]")
              .asString();
  /v4/promotions/promotion/deactivate:
    post:
      tags:
        - Promotions
      summary: Deactivate a promotion
      description: |
        A Profile can change the status of an activated promotion back to `assigned`.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>
      operationId: DeactivateAPromotion
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-promotionActivation"
        required: true
      responses:
        "200":
          description: Promotion deactivated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-promotionClientDataResponse"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-PromotionDeactivationForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Promotion for profile not found
        "429":
          $ref: "#/components/responses/promotions-WaitingForProfileLockReleaseError"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/DeactivateAPromotion
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/promotion/deactivate \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"key":"code","value":"7893467834GG","pointsToUse":100}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}"

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

            conn.request("POST", "/v4/promotions/promotion/deactivate", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "key": "code",
              "value": "7893467834GG",
              "pointsToUse": 100
            });

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

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

            xhr.open("POST", "https://api.synerise.com/v4/promotions/promotion/deactivate");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

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

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

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

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

            req.write(JSON.stringify({key: 'code', value: '7893467834GG', pointsToUse: 100}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"key":"code","value":"7893467834GG","pointsToUse":100}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/promotions/promotion/deactivate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}")
              .asString();
  /v4/promotions/promotion/batch-deactivate:
    post:
      tags:
        - Promotions
      summary: Batch deactivate promotions
      description: |
        A Profile can change the status of a number of activated promotions back to `assigned`.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>
      operationId: BatchDeactivate
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/promotions-promotionActivation"
        required: true
      responses:
        "200":
          description: Promotions deactivated
          content:
            application/json:
              schema:
                type: object
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Promotions for profile not found
        "429":
          $ref: "#/components/responses/promotions-WaitingForProfileLockReleaseError"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/BatchDeactivate
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/promotion/batch-deactivate \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '[{"key":"code","value":"7893467834GG","pointsToUse":100}]'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]"

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

            conn.request("POST", "/v4/promotions/promotion/batch-deactivate", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              {
                "key": "code",
                "value": "7893467834GG",
                "pointsToUse": 100
              }
            ]);

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

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

            xhr.open("POST", "https://api.synerise.com/v4/promotions/promotion/batch-deactivate");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

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

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

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

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

            req.write(JSON.stringify([{key: 'code', value: '7893467834GG', pointsToUse: 100}]));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('[{"key":"code","value":"7893467834GG","pointsToUse":100}]');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/promotions/promotion/batch-deactivate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]")
              .asString();
  /v4/promotions/promotion/deactivate-all-for-client/{identifierType}/{identifierValue}:
    post:
      tags:
        - Promotions
      summary: Deactivate all promotions for a Profile as Workspace
      description: |
        You can deactivate all promotions assigned to a Profile.

        ---

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

        **API key permission required:** `PROMOTIONS_DEACTIVATE_PROMOTIONS_UPDATE`

        **User role permission required:** `campaigns_promotions: update`
      operationId: deactivateAllPromotions
      parameters:
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
        - $ref: "#/components/parameters/promotions-queryReturnCodes"
        - $ref: "#/components/parameters/promotions-queryLockPoints"
        - $ref: "#/components/parameters/promotions-queryExcludeTag"
      responses:
        "200":
          description: All promotions deactivated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Profile not found
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/deactivateAllPromotions
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api.synerise.com/v4/promotions/promotion/deactivate-all-for-client/email/%7BidentifierValue%7D?returnCodes=true&lockPoints=true&excludeTags=SOME_ARRAY_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            conn.request("POST", "/v4/promotions/promotion/deactivate-all-for-client/email/%7BidentifierValue%7D?returnCodes=true&lockPoints=true&excludeTags=SOME_ARRAY_VALUE")

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

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

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

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

            xhr.open("POST", "https://api.synerise.com/v4/promotions/promotion/deactivate-all-for-client/email/%7BidentifierValue%7D?returnCodes=true&lockPoints=true&excludeTags=SOME_ARRAY_VALUE");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/promotion/deactivate-all-for-client/email/%7BidentifierValue%7D?returnCodes=true&lockPoints=true&excludeTags=SOME_ARRAY_VALUE",
              "headers": {}
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/deactivate-all-for-client/email/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setQueryData([
              'returnCodes' => 'true',
              'lockPoints' => 'true',
              'excludeTags' => 'SOME_ARRAY_VALUE'
            ]);

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/promotions/promotion/deactivate-all-for-client/email/%7BidentifierValue%7D?returnCodes=true&lockPoints=true&excludeTags=SOME_ARRAY_VALUE")
              .asString();
  /v4/promotions/promotion/redeem:
    post:
      tags:
        - Promotions
      summary: Redeem a promotion
      description: |
        You can redeem a promotion and loyalty points.

        ---

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

        **API key permission required:** `PROMOTIONS_REDEEM_PROMOTIONS_CREATE`

        **User role permission required:** `campaigns_promotions: create`
      operationId: RedeemAPromotion
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-RedeemPromotionsRequest"
        required: true
      responses:
        "201":
          description: Promotion redeemed successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Promotion redeemed successfully
        "209":
          description: Promotion is already redeemed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Promotion is already redeemed
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          description: Not found error
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: "#/components/schemas/promotions-ProfileNotFoundErrorV1"
                  - $ref: "#/components/schemas/promotions-PromotionNotFoundErrorV1"
        "409":
          $ref: "#/components/responses/promotions-WaitingForProfileLockReleaseError"
        "412":
          description: Unprocessable redemption
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: "#/components/schemas/promotions-PromotionNotActivatedErrorV1"
                  - $ref: "#/components/schemas/promotions-PromotionRedeemLimitExceededErrorV1"
                  - $ref: "#/components/schemas/promotions-PromotionAlreadyRedeemedErrorV1"
        "423":
          $ref: "#/components/responses/promotions-ProfilePromotionsBlockedError"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/RedeemAPromotion
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/promotion/redeem \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"code":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9","clientKey":"clientId","clientKeyValue":"434428563"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"code\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\",\"clientKey\":\"clientId\",\"clientKeyValue\":\"434428563\"}"

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

            conn.request("POST", "/v4/promotions/promotion/redeem", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "code": "75d9090f-06ac-46a2-a0ce-4b8eb287efb9",
              "clientKey": "clientId",
              "clientKeyValue": "434428563"
            });

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

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

            xhr.open("POST", "https://api.synerise.com/v4/promotions/promotion/redeem");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

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

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

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

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

            req.write(JSON.stringify({
              code: '75d9090f-06ac-46a2-a0ce-4b8eb287efb9',
              clientKey: 'clientId',
              clientKeyValue: '434428563'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"code":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9","clientKey":"clientId","clientKeyValue":"434428563"}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/promotions/promotion/redeem")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"code\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\",\"clientKey\":\"clientId\",\"clientKeyValue\":\"434428563\"}")
              .asString();
  /v4/promotions/promotion/batch-redeem:
    post:
      tags:
        - Promotions
      summary: Batch redeem promotions
      description: |
        You can redeem up to 100 promotions and loyalty points relevant to them.

        ---

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

        **API key permission required:** `PROMOTIONS_BATCH_REDEEM_PROMOTIONS_CREATE`

        **User role permission required:** `campaigns_promotions: create`
      operationId: BatchRedeemPromotions
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/promotions-RedeemPromotionsRequest"
        required: true
      responses:
        "201":
          description: Promotion redeemed successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Promotion redeemed successfully
        "209":
          description: Promotion is already redeemed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Promotion is already redeemed
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          description: Not found error
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: "#/components/schemas/promotions-ProfileNotFoundErrorV1"
                  - $ref: "#/components/schemas/promotions-PromotionNotFoundErrorV1"
        "409":
          $ref: "#/components/responses/promotions-WaitingForProfileLockReleaseError"
        "412":
          description: Unprocessable redemption
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: "#/components/schemas/promotions-PromotionNotActivatedErrorV1"
                  - $ref: "#/components/schemas/promotions-PromotionRedeemLimitExceededErrorV1"
                  - $ref: "#/components/schemas/promotions-PromotionAlreadyRedeemedErrorV1"
        "423":
          $ref: "#/components/responses/promotions-ProfilePromotionsBlockedError"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/BatchRedeemPromotions
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/promotion/batch-redeem \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '[{"code":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9","clientKey":"clientId","clientKeyValue":"434428563"}]'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "[{\"code\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\",\"clientKey\":\"clientId\",\"clientKeyValue\":\"434428563\"}]"

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

            conn.request("POST", "/v4/promotions/promotion/batch-redeem", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              {
                "code": "75d9090f-06ac-46a2-a0ce-4b8eb287efb9",
                "clientKey": "clientId",
                "clientKeyValue": "434428563"
              }
            ]);

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

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

            xhr.open("POST", "https://api.synerise.com/v4/promotions/promotion/batch-redeem");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

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

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

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

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

            req.write(JSON.stringify([
              {
                code: '75d9090f-06ac-46a2-a0ce-4b8eb287efb9',
                clientKey: 'clientId',
                clientKeyValue: '434428563'
              }
            ]));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('[{"code":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9","clientKey":"clientId","clientKeyValue":"434428563"}]');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/promotions/promotion/batch-redeem")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[{\"code\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\",\"clientKey\":\"clientId\",\"clientKeyValue\":\"434428563\"}]")
              .asString();
  /v4/promotions/v2/promotion/get-for-client/{identifierType}/{identifierValue}:
    get:
      tags:
        - Promotions
      summary: Get a Profile's promotions as Workspace (v2)
      description: |
        A Workspace can retrieve a list of a profile's promotions. By default, only non-expired promotions are retrieved.

        **IMPORTANT**: 
        - As a result of this request, the `targetSegments` of all the matching promotions are checked. If this results in checking more than 30 unique segments, any segments above this limit may be ignored.
        - The endpoint is limited to 25000 requests per minute (per workspace).


        ---

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

        **API key permission required:** `PROMOTIONS_LIST_PROMOTIONS_READ`

        **User role permission required:** `campaigns_promotions: read`
      operationId: GetAllClientPromotionsV2
      parameters:
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
        - $ref: "#/components/parameters/promotions-queryPromotionSort"
        - $ref: "#/components/parameters/promotions-queryPromotionStatus"
        - $ref: "#/components/parameters/promotions-queryPromotionPresentOnly"
        - $ref: "#/components/parameters/promotions-queryPromotionDisplayableOnly"
        - $ref: "#/components/parameters/promotions-queryTagNames"
        - $ref: "#/components/parameters/promotions-queryLimit"
        - $ref: "#/components/parameters/promotions-queryPage"
        - $ref: "#/components/parameters/promotions-queryIncludeMeta"
        - $ref: "#/components/parameters/promotions-queryPromotionFields"
        - $ref: "#/components/parameters/promotions-queryPromotionUuids"
        - $ref: "#/components/parameters/promotions-queryCheckGlobalActivationLimits"
        - $ref: "#/components/parameters/promotions-queryIncludeVouchers"
        - $ref: "#/components/parameters/promotions-queryStoreIds"
      responses:
        "200":
          description: An array of promotions
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/promotions-promotionClientDataResponse"
                    description: An array of promotions
                  meta:
                    $ref: "#/components/schemas/promotions-responseMeta"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          $ref: "#/components/responses/promotions-ClientNotFoundError"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/GetAllClientPromotionsV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

            conn.request("GET", "/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=SOME_STRING_VALUE", headers=headers)

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'sort' => 'requireRedeemedPoints,desc',
              'status' => 'SOME_ARRAY_VALUE',
              'presentOnly' => 'true',
              'displayableOnly' => 'true',
              'tagNames' => 'SOME_ARRAY_VALUE',
              'limit' => '100',
              'page' => '4',
              'includeMeta' => 'false',
              'fields' => 'uuid,requireRedeemedPoints,requireRedeemedPoints,possibleRedeems,status,currentRedeemedQuantity,lastingAt',
              'promotionUuids' => 'fc1ee5bf-ad97-47a8-a474-e1b6e755ff38,aabaed4e-4ee7-44d5-b079-445a017ec6fe',
              'checkGlobalActivationLimits' => 'true',
              'includeVouchers' => 'false',
              'storeIds' => 'SOME_STRING_VALUE'
            ]);

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/promotion/get-item-for-client/{identifierType}/{identifierValue}:
    get:
      tags:
        - Promotions
      summary: View promotion details as Profile
      description: |
        A Profile can view all the details of an assigned or activated promotion.

        ---

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

        **User role permission required:** `campaigns_promotions: read`
      operationId: ViewPromotionDetailsAsClient
      parameters:
        - $ref: "#/components/parameters/promotions-pathPromoIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
        - $ref: "#/components/parameters/promotions-queryLastingOnly"
      responses:
        "200":
          description: Details of a promotion
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/promotions-promotionClientDataResponse"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Object not found
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/ViewPromotionDetailsAsClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/promotions/promotion/get-item-for-client/%7BidentifierType%7D/%7BidentifierValue%7D?lastingOnly=true' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

            conn.request("GET", "/v4/promotions/promotion/get-item-for-client/%7BidentifierType%7D/%7BidentifierValue%7D?lastingOnly=true", headers=headers)

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/v4/promotions/promotion/get-item-for-client/%7BidentifierType%7D/%7BidentifierValue%7D?lastingOnly=true");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/promotion/get-item-for-client/%7BidentifierType%7D/%7BidentifierValue%7D?lastingOnly=true",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/get-item-for-client/%7BidentifierType%7D/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'lastingOnly' => 'true'
            ]);

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/promotions/promotion/get-item-for-client/%7BidentifierType%7D/%7BidentifierValue%7D?lastingOnly=true")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/promotion/get-item-for-client-no-data/{identifierType}/{identifierValue}:
    get:
      tags:
        - Promotions
      summary: View promotion details as Profile
      description: |
        A Profile can view all the details of an assigned or activated promotion.

        ---

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

        **User role permission required:** `campaigns_promotions: read`
      operationId: ViewPromotionDetailsAsClientNoData
      parameters:
        - $ref: "#/components/parameters/promotions-pathPromoIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
      responses:
        "200":
          description: Details of a promotion
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/promotions-promotionClientDataResponse"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Object not found
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/ViewPromotionDetailsAsClientNoData
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/promotions/promotion/get-item-for-client-no-data/%7BidentifierType%7D/%7BidentifierValue%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

            conn.request("GET", "/v4/promotions/promotion/get-item-for-client-no-data/%7BidentifierType%7D/%7BidentifierValue%7D", headers=headers)

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/v4/promotions/promotion/get-item-for-client-no-data/%7BidentifierType%7D/%7BidentifierValue%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/promotion/get-item-for-client-no-data/%7BidentifierType%7D/%7BidentifierValue%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/get-item-for-client-no-data/%7BidentifierType%7D/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_GET);

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/promotions/promotion/get-item-for-client-no-data/%7BidentifierType%7D/%7BidentifierValue%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/promotion/list:
    get:
      tags:
        - Promotions
      summary: View Workspace promotions
      description: |
        You can retrieve a list of all promotions defined in your Workspaces. It includes configured promotions, ready to be used or already in use.

        ---

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

        **API key permission required:** `PROMOTIONS_LIST_PROMOTIONS_READ`

        **User role permission required:** `campaigns_promotions: read`
      operationId: ViewBusinessProfilePromotions
      parameters:
        - $ref: "#/components/parameters/promotions-queryLimit"
        - $ref: "#/components/parameters/promotions-queryPage"
        - $ref: "#/components/parameters/promotions-queryStoreCatalog"
        - $ref: "#/components/parameters/promotions-queryStoreIds"
        - $ref: "#/components/parameters/promotions-queryIncludeMeta"
        - $ref: "#/components/parameters/promotions-queryOrderFieldName"
        - $ref: "#/components/parameters/promotions-queryOrder"
        - $ref: "#/components/parameters/promotions-queryQuery"
        - $ref: "#/components/parameters/promotions-queryPromotionUuids"
        - $ref: "#/components/parameters/promotions-queryTargetByType"
      responses:
        "200":
          description: An array of promotions
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/promotions-promotionDataResponse"
                    description: An array of promotions
                  meta:
                    $ref: "#/components/schemas/promotions-responseMeta"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/ViewBusinessProfilePromotions
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/promotions/promotion/list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&targetByType=%5BSEGMENT%5D%3DACTIVE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

            conn.request("GET", "/v4/promotions/promotion/list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&targetByType=%5BSEGMENT%5D%3DACTIVE", headers=headers)

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/v4/promotions/promotion/list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&targetByType=%5BSEGMENT%5D%3DACTIVE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/promotion/list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&targetByType=%5BSEGMENT%5D%3DACTIVE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

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

            $request->setQueryData([
              'limit' => '100',
              'page' => '4',
              'storeCatalog' => 'SOME_STRING_VALUE',
              'storeIds' => 'SOME_STRING_VALUE',
              'includeMeta' => 'false',
              'orderFieldName' => 'SOME_STRING_VALUE',
              'order' => 'SOME_STRING_VALUE',
              'query' => 'SOME_STRING_VALUE',
              'promotionUuids' => 'fc1ee5bf-ad97-47a8-a474-e1b6e755ff38,aabaed4e-4ee7-44d5-b079-445a017ec6fe',
              'targetByType' => '[SEGMENT]=ACTIVE'
            ]);

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/promotions/promotion/list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&targetByType=%5BSEGMENT%5D%3DACTIVE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/promotion/diff-list:
    get:
      tags:
        - Promotions
      summary: View recently updated promotions
      description: |
        You can retrieve a list of promotions that were updated. You can filter, sort, and paginate the results.

        ---

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

        **API key permission required:** `PROMOTIONS_DIFF_LIST_PROMOTIONS_READ`

        **User role permission required:** `campaigns_promotions: read`
      operationId: ViewBusinessProfilePromotionsDiff
      parameters:
        - $ref: "#/components/parameters/promotions-queryLimit"
        - $ref: "#/components/parameters/promotions-queryPage"
        - $ref: "#/components/parameters/promotions-queryStoreCatalog"
        - $ref: "#/components/parameters/promotions-queryStoreIds"
        - $ref: "#/components/parameters/promotions-queryTarget"
        - $ref: "#/components/parameters/promotions-queryIncludeMeta"
        - $ref: "#/components/parameters/promotions-queryPromotionPresentOnly"
        - $ref: "#/components/parameters/promotions-queryVisibilityStatus"
        - in: query
          name: upsertTimestamp
          description: Defines the date since which the differences are shown. If not defined, defaults to infinity.
          schema:
            type: string
            format: date-time
        - $ref: "#/components/parameters/promotions-queryOrderFieldName"
        - $ref: "#/components/parameters/promotions-queryOrder"
        - $ref: "#/components/parameters/promotions-queryQuery"
      responses:
        "200":
          description: An array of promotions. If a promotion was deleted, the `deletedAt` field is included
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/promotions-promotionDataResponse"
                    description: An array of promotions
                  meta:
                    $ref: "#/components/schemas/promotions-responseMeta"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/ViewBusinessProfilePromotionsDiff
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/promotions/promotion/diff-list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&target=SOME_ARRAY_VALUE&includeMeta=false&presentOnly=true&visibilityStatus=SOME_ARRAY_VALUE&upsertTimestamp=SOME_STRING_VALUE&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

            conn.request("GET", "/v4/promotions/promotion/diff-list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&target=SOME_ARRAY_VALUE&includeMeta=false&presentOnly=true&visibilityStatus=SOME_ARRAY_VALUE&upsertTimestamp=SOME_STRING_VALUE&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE", headers=headers)

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/v4/promotions/promotion/diff-list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&target=SOME_ARRAY_VALUE&includeMeta=false&presentOnly=true&visibilityStatus=SOME_ARRAY_VALUE&upsertTimestamp=SOME_STRING_VALUE&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/promotion/diff-list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&target=SOME_ARRAY_VALUE&includeMeta=false&presentOnly=true&visibilityStatus=SOME_ARRAY_VALUE&upsertTimestamp=SOME_STRING_VALUE&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/diff-list');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'limit' => '100',
              'page' => '4',
              'storeCatalog' => 'SOME_STRING_VALUE',
              'storeIds' => 'SOME_STRING_VALUE',
              'target' => 'SOME_ARRAY_VALUE',
              'includeMeta' => 'false',
              'presentOnly' => 'true',
              'visibilityStatus' => 'SOME_ARRAY_VALUE',
              'upsertTimestamp' => 'SOME_STRING_VALUE',
              'orderFieldName' => 'SOME_STRING_VALUE',
              'order' => 'SOME_STRING_VALUE',
              'query' => 'SOME_STRING_VALUE'
            ]);

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/promotions/promotion/diff-list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&target=SOME_ARRAY_VALUE&includeMeta=false&presentOnly=true&visibilityStatus=SOME_ARRAY_VALUE&upsertTimestamp=SOME_STRING_VALUE&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/promotion/get-for-client/{identifierType}/{identifierValue}:
    get:
      tags:
        - Promotions
      summary: Get a Profile's promotions as Workspace
      description: |
        A Workspace can retrieve a list of all promotions assigned to a Profile.

        **IMPORTANT**: 
        - As a result of this request, the `targetSegments` of all the matching promotions are checked. If this results in checking more than 30 unique segments, any segments above this limit may be ignored.
        - The endpoint does not support redemption limits per client for Multi-buy promotions (promotions with redeemQuantityPerActivation greater than 1). For redemption limits, please use [/v2/promotion/get-for-client/{identifierType}/{identifierValue}](#operation/GetAllClientPromotionsV2).
        - The endpoint is limited to 25000 requests per minute (per workspace).


        ---

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

        **API key permission required:** `PROMOTIONS_LIST_PROMOTIONS_READ`

        **User role permission required:** `campaigns_promotions: read`
      operationId: GetAllClientPromotions
      parameters:
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
        - $ref: "#/components/parameters/promotions-queryPromotionSort"
        - name: status
          in: query
          description: Filter by promotion status. If not provided, defaults to ACTIVE. If status is not provided and no promotions are active, the response is an empty array.
          required: false
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              enum:
                - ACTIVE
                - ASSIGNED
                - REDEEMED
              default: ACTIVE
        - $ref: "#/components/parameters/promotions-queryTagNames"
        - $ref: "#/components/parameters/promotions-queryTarget"
        - $ref: "#/components/parameters/promotions-queryPromotionType"
        - $ref: "#/components/parameters/promotions-queryPromotionPresentOnly"
        - $ref: "#/components/parameters/promotions-queryLastingOnly"
        - $ref: "#/components/parameters/promotions-queryPromotionDisplayableOnly"
        - $ref: "#/components/parameters/promotions-queryLimit"
        - $ref: "#/components/parameters/promotions-queryPage"
        - $ref: "#/components/parameters/promotions-queryIncludeMeta"
        - $ref: "#/components/parameters/promotions-queryIncludeVouchers"
        - $ref: "#/components/parameters/promotions-queryStoreIds"
      responses:
        "200":
          description: An array of promotions
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/promotions-promotionClientDataResponse"
                    description: An array of promotions
                  meta:
                    $ref: "#/components/schemas/promotions-responseMeta"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/GetAllClientPromotions
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&displayableOnly=true&limit=100&page=4&includeMeta=false&includeVouchers=false&storeIds=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

            conn.request("GET", "/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&displayableOnly=true&limit=100&page=4&includeMeta=false&includeVouchers=false&storeIds=SOME_STRING_VALUE", headers=headers)

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&displayableOnly=true&limit=100&page=4&includeMeta=false&includeVouchers=false&storeIds=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&displayableOnly=true&limit=100&page=4&includeMeta=false&includeVouchers=false&storeIds=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'sort' => 'requireRedeemedPoints,desc',
              'status' => 'SOME_ARRAY_VALUE',
              'tagNames' => 'SOME_ARRAY_VALUE',
              'target' => 'SOME_ARRAY_VALUE',
              'type' => 'SOME_ARRAY_VALUE',
              'presentOnly' => 'true',
              'lastingOnly' => 'true',
              'displayableOnly' => 'true',
              'limit' => '100',
              'page' => '4',
              'includeMeta' => 'false',
              'includeVouchers' => 'false',
              'storeIds' => 'SOME_STRING_VALUE'
            ]);

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&displayableOnly=true&limit=100&page=4&includeMeta=false&includeVouchers=false&storeIds=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/promotion/get-for-client-possible-to-redeem/{identifierType}/{identifierValue}:
    get:
      tags:
        - Promotions
      summary: Get redeemable promotions of a Profile
      description: |
        Retrieve all redeemable promotions related to a Profile.

        **IMPORTANT**: 
        - As a result of this request, the `targetSegments` of all the matching promotions are checked. If this results in checking more than 30 unique segments, any segments above this limit may be ignored.
        - The endpoint is limited to 25000 requests per minute (per workspace).

        ---

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

        **API key permission required:** `PROMOTIONS_REDEEM_PROMOTIONS_READ`

        **User role permission required:** `campaigns_promotions: read`
      operationId: GetRedeemablePromotions
      parameters:
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
        - $ref: "#/components/parameters/promotions-queryPromotionSort"
        - $ref: "#/components/parameters/promotions-queryPromotionPresentOnly"
        - $ref: "#/components/parameters/promotions-queryLastingOnly"
        - $ref: "#/components/parameters/promotions-queryPromotionDisplayableOnly"
        - $ref: "#/components/parameters/promotions-queryPromotionStatus"
        - $ref: "#/components/parameters/promotions-queryPromotionType"
        - $ref: "#/components/parameters/promotions-queryStatusByType"
        - $ref: "#/components/parameters/promotions-queryTargetByType"
        - $ref: "#/components/parameters/promotions-queryIncludeMeta"
        - $ref: "#/components/parameters/promotions-queryPage"
        - $ref: "#/components/parameters/promotions-queryLimit"
        - $ref: "#/components/parameters/promotions-queryTarget"
        - $ref: "#/components/parameters/promotions-queryStoreIds"
      responses:
        "200":
          description: An array of promotions
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/promotions-promotionClientPossibleToRedeemResponse"
                  meta:
                    $ref: "#/components/schemas/promotions-responseMeta"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/GetRedeemablePromotions
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/promotions/promotion/get-for-client-possible-to-redeem/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&presentOnly=true&lastingOnly=true&displayableOnly=true&status=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&statusByType=%5BCUSTOM%5D%3DACTIVE&targetByType=%5BSEGMENT%5D%3DACTIVE&includeMeta=false&page=4&limit=100&target=SOME_ARRAY_VALUE&storeIds=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

            conn.request("GET", "/v4/promotions/promotion/get-for-client-possible-to-redeem/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&presentOnly=true&lastingOnly=true&displayableOnly=true&status=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&statusByType=%5BCUSTOM%5D%3DACTIVE&targetByType=%5BSEGMENT%5D%3DACTIVE&includeMeta=false&page=4&limit=100&target=SOME_ARRAY_VALUE&storeIds=SOME_STRING_VALUE", headers=headers)

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/v4/promotions/promotion/get-for-client-possible-to-redeem/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&presentOnly=true&lastingOnly=true&displayableOnly=true&status=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&statusByType=%5BCUSTOM%5D%3DACTIVE&targetByType=%5BSEGMENT%5D%3DACTIVE&includeMeta=false&page=4&limit=100&target=SOME_ARRAY_VALUE&storeIds=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/promotion/get-for-client-possible-to-redeem/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&presentOnly=true&lastingOnly=true&displayableOnly=true&status=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&statusByType=%5BCUSTOM%5D%3DACTIVE&targetByType=%5BSEGMENT%5D%3DACTIVE&includeMeta=false&page=4&limit=100&target=SOME_ARRAY_VALUE&storeIds=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/get-for-client-possible-to-redeem/email/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'sort' => 'requireRedeemedPoints,desc',
              'presentOnly' => 'true',
              'lastingOnly' => 'true',
              'displayableOnly' => 'true',
              'status' => 'SOME_ARRAY_VALUE',
              'type' => 'SOME_ARRAY_VALUE',
              'statusByType' => '[CUSTOM]=ACTIVE',
              'targetByType' => '[SEGMENT]=ACTIVE',
              'includeMeta' => 'false',
              'page' => '4',
              'limit' => '100',
              'target' => 'SOME_ARRAY_VALUE',
              'storeIds' => 'SOME_STRING_VALUE'
            ]);

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/promotions/promotion/get-for-client-possible-to-redeem/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&presentOnly=true&lastingOnly=true&displayableOnly=true&status=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&statusByType=%5BCUSTOM%5D%3DACTIVE&targetByType=%5BSEGMENT%5D%3DACTIVE&includeMeta=false&page=4&limit=100&target=SOME_ARRAY_VALUE&storeIds=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/promotion/{identifierType}/{identifierValue}:
    get:
      tags:
        - Promotions
      summary: Get promotion details as Workspace
      description: |
        Retrieve the details of a promotion by its code.

        ---

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

        **API key permission required:** `PROMOTIONS_DETAILS_FOR_PROFILE_PROMOTIONS_READ`

        **User role permission required:** `campaigns_promotions: read`
      operationId: GetPromotionDetailsAsBusinessProfile
      parameters:
        - $ref: "#/components/parameters/promotions-pathPromoIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
      responses:
        "200":
          description: Details of a promotion
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-Viewpromotiondetails-HTTP200"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Object not found
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/GetPromotionDetailsAsBusinessProfile
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

            conn.request("GET", "/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D", headers=headers)

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_GET);

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    put:
      tags:
        - Promotions
      summary: Update a promotion
      description: |
        You can update an existing promotion. Include only the fields that you want to change. Inserting a null value overwrites an existing value.

        ---

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

        **API key permission required:** `PROMOTIONS_DETAILS_FOR_PROFILE_PROMOTIONS_UPDATE`

        **User role permission required:** `campaigns_promotions: update`
      operationId: UpdateAPromotion
      parameters:
        - $ref: "#/components/parameters/promotions-pathPromoIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-promotionDataCreate"
        required: true
      responses:
        "200":
          description: Promotion updated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionCreateUpdateDeleteRes"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/UpdateAPromotion
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"visibilityStatus":"DRAFT","type":"MEMBERS_ONLY","redeemLimitPerClient":0,"redeemQuantityPerActivation":8388607,"redeemLimitGlobal":0,"redeemType":"FULL","details":{"discountType":{"name":"BOGO","outerScope":true,"requiredItemsCount":2,"requiredItems":{"catalog":"221","catalogItemType":"FILTERED","catalogIndexItems":[],"catalogFilterIds":["f978b20f-7156-40ed-99c2-3af62b76af12"]},"discountedItemsCount":1},"cashbackSettings":{"exchangeRate":0.01,"limits":{"minPoints":10,"maxPoints":1000,"maxTransactionAmount":20,"maxTransactionPercentage":50}}},"discountType":"PERCENT","discountValue":0,"discountMode":"STATIC","discountModeDetails":{"discountSteps":[{"discountValue":0,"usageThreshold":0}],"discountUsageTrigger":"TRANSACTION"},"preDiscountValue":0,"requireRedeemedPoints":0,"headerName":"string","headerDescription":"string","name":"string","headline":"string","description":"string","images":[{"url":"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png","type":"image"}],"tags":[{"hash":"6f54671d-157f-4c4e-a577-11fac3111293"}],"startAt":"2019-08-24T14:15:22Z","expireAt":"2019-08-24T14:15:22Z","displayFrom":"string","displayTo":"string","lastingTime":0,"params":{},"itemScope":"LINE_ITEM","minBasketValue":null,"maxBasketValue":null,"catalog":"221","catalogItemType":"FILTERED","catalogIndexItems":[],"catalogFilterIds":["f978b20f-7156-40ed-99c2-3af62b76af12"],"excludeCatalog":["311"],"excludeCatalogItemType":"SELECTED","excludeCatalogIndexItems":["29727276"],"excludeCatalogFilterIds":[],"activationLimitGlobalType":"RELATIVE","activationLimitGlobalLimit":1,"activationLimitGlobalRelativeMinutes":null,"storeCatalog":"string","storeItemType":"ALL","storeIds":["string"],"targetType":"ALL","targetSegment":["string"],"price":0,"priority":250,"voucherPool":{"enabled":false,"uuid":"095be615-a8ad-4c33-8e9c-c7612fbf6c9f","transferable":false},"importHash":"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"visibilityStatus\":\"DRAFT\",\"type\":\"MEMBERS_ONLY\",\"redeemLimitPerClient\":0,\"redeemQuantityPerActivation\":8388607,\"redeemLimitGlobal\":0,\"redeemType\":\"FULL\",\"details\":{\"discountType\":{\"name\":\"BOGO\",\"outerScope\":true,\"requiredItemsCount\":2,\"requiredItems\":{\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"]},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.01,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}},\"discountType\":\"PERCENT\",\"discountValue\":0,\"discountMode\":\"STATIC\",\"discountModeDetails\":{\"discountSteps\":[{\"discountValue\":0,\"usageThreshold\":0}],\"discountUsageTrigger\":\"TRANSACTION\"},\"preDiscountValue\":0,\"requireRedeemedPoints\":0,\"headerName\":\"string\",\"headerDescription\":\"string\",\"name\":\"string\",\"headline\":\"string\",\"description\":\"string\",\"images\":[{\"url\":\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\",\"type\":\"image\"}],\"tags\":[{\"hash\":\"6f54671d-157f-4c4e-a577-11fac3111293\"}],\"startAt\":\"2019-08-24T14:15:22Z\",\"expireAt\":\"2019-08-24T14:15:22Z\",\"displayFrom\":\"string\",\"displayTo\":\"string\",\"lastingTime\":0,\"params\":{},\"itemScope\":\"LINE_ITEM\",\"minBasketValue\":null,\"maxBasketValue\":null,\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"],\"excludeCatalog\":[\"311\"],\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"29727276\"],\"excludeCatalogFilterIds\":[],\"activationLimitGlobalType\":\"RELATIVE\",\"activationLimitGlobalLimit\":1,\"activationLimitGlobalRelativeMinutes\":null,\"storeCatalog\":\"string\",\"storeItemType\":\"ALL\",\"storeIds\":[\"string\"],\"targetType\":\"ALL\",\"targetSegment\":[\"string\"],\"price\":0,\"priority\":250,\"voucherPool\":{\"enabled\":false,\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"transferable\":false},\"importHash\":\"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9\"}"

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

            conn.request("PUT", "/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "visibilityStatus": "DRAFT",
              "type": "MEMBERS_ONLY",
              "redeemLimitPerClient": 0,
              "redeemQuantityPerActivation": 8388607,
              "redeemLimitGlobal": 0,
              "redeemType": "FULL",
              "details": {
                "discountType": {
                  "name": "BOGO",
                  "outerScope": true,
                  "requiredItemsCount": 2,
                  "requiredItems": {
                    "catalog": "221",
                    "catalogItemType": "FILTERED",
                    "catalogIndexItems": [],
                    "catalogFilterIds": [
                      "f978b20f-7156-40ed-99c2-3af62b76af12"
                    ]
                  },
                  "discountedItemsCount": 1
                },
                "cashbackSettings": {
                  "exchangeRate": 0.01,
                  "limits": {
                    "minPoints": 10,
                    "maxPoints": 1000,
                    "maxTransactionAmount": 20,
                    "maxTransactionPercentage": 50
                  }
                }
              },
              "discountType": "PERCENT",
              "discountValue": 0,
              "discountMode": "STATIC",
              "discountModeDetails": {
                "discountSteps": [
                  {
                    "discountValue": 0,
                    "usageThreshold": 0
                  }
                ],
                "discountUsageTrigger": "TRANSACTION"
              },
              "preDiscountValue": 0,
              "requireRedeemedPoints": 0,
              "headerName": "string",
              "headerDescription": "string",
              "name": "string",
              "headline": "string",
              "description": "string",
              "images": [
                {
                  "url": "https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png",
                  "type": "image"
                }
              ],
              "tags": [
                {
                  "hash": "6f54671d-157f-4c4e-a577-11fac3111293"
                }
              ],
              "startAt": "2019-08-24T14:15:22Z",
              "expireAt": "2019-08-24T14:15:22Z",
              "displayFrom": "string",
              "displayTo": "string",
              "lastingTime": 0,
              "params": {},
              "itemScope": "LINE_ITEM",
              "minBasketValue": null,
              "maxBasketValue": null,
              "catalog": "221",
              "catalogItemType": "FILTERED",
              "catalogIndexItems": [],
              "catalogFilterIds": [
                "f978b20f-7156-40ed-99c2-3af62b76af12"
              ],
              "excludeCatalog": [
                "311"
              ],
              "excludeCatalogItemType": "SELECTED",
              "excludeCatalogIndexItems": [
                "29727276"
              ],
              "excludeCatalogFilterIds": [],
              "activationLimitGlobalType": "RELATIVE",
              "activationLimitGlobalLimit": 1,
              "activationLimitGlobalRelativeMinutes": null,
              "storeCatalog": "string",
              "storeItemType": "ALL",
              "storeIds": [
                "string"
              ],
              "targetType": "ALL",
              "targetSegment": [
                "string"
              ],
              "price": 0,
              "priority": 250,
              "voucherPool": {
                "enabled": false,
                "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
                "transferable": false
              },
              "importHash": "ced8a4ad-6d6e-48ca-a663-3fb07e6216a9"
            });

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

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

            xhr.open("PUT", "https://api.synerise.com/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({
              visibilityStatus: 'DRAFT',
              type: 'MEMBERS_ONLY',
              redeemLimitPerClient: 0,
              redeemQuantityPerActivation: 8388607,
              redeemLimitGlobal: 0,
              redeemType: 'FULL',
              details: {
                discountType: {
                  name: 'BOGO',
                  outerScope: true,
                  requiredItemsCount: 2,
                  requiredItems: {
                    catalog: '221',
                    catalogItemType: 'FILTERED',
                    catalogIndexItems: [],
                    catalogFilterIds: ['f978b20f-7156-40ed-99c2-3af62b76af12']
                  },
                  discountedItemsCount: 1
                },
                cashbackSettings: {
                  exchangeRate: 0.01,
                  limits: {
                    minPoints: 10,
                    maxPoints: 1000,
                    maxTransactionAmount: 20,
                    maxTransactionPercentage: 50
                  }
                }
              },
              discountType: 'PERCENT',
              discountValue: 0,
              discountMode: 'STATIC',
              discountModeDetails: {
                discountSteps: [{discountValue: 0, usageThreshold: 0}],
                discountUsageTrigger: 'TRANSACTION'
              },
              preDiscountValue: 0,
              requireRedeemedPoints: 0,
              headerName: 'string',
              headerDescription: 'string',
              name: 'string',
              headline: 'string',
              description: 'string',
              images: [
                {
                  url: 'https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png',
                  type: 'image'
                }
              ],
              tags: [{hash: '6f54671d-157f-4c4e-a577-11fac3111293'}],
              startAt: '2019-08-24T14:15:22Z',
              expireAt: '2019-08-24T14:15:22Z',
              displayFrom: 'string',
              displayTo: 'string',
              lastingTime: 0,
              params: {},
              itemScope: 'LINE_ITEM',
              minBasketValue: null,
              maxBasketValue: null,
              catalog: '221',
              catalogItemType: 'FILTERED',
              catalogIndexItems: [],
              catalogFilterIds: ['f978b20f-7156-40ed-99c2-3af62b76af12'],
              excludeCatalog: ['311'],
              excludeCatalogItemType: 'SELECTED',
              excludeCatalogIndexItems: ['29727276'],
              excludeCatalogFilterIds: [],
              activationLimitGlobalType: 'RELATIVE',
              activationLimitGlobalLimit: 1,
              activationLimitGlobalRelativeMinutes: null,
              storeCatalog: 'string',
              storeItemType: 'ALL',
              storeIds: ['string'],
              targetType: 'ALL',
              targetSegment: ['string'],
              price: 0,
              priority: 250,
              voucherPool: {
                enabled: false,
                uuid: '095be615-a8ad-4c33-8e9c-c7612fbf6c9f',
                transferable: false
              },
              importHash: 'ced8a4ad-6d6e-48ca-a663-3fb07e6216a9'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_PUT);

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

            $request->setBody('{"visibilityStatus":"DRAFT","type":"MEMBERS_ONLY","redeemLimitPerClient":0,"redeemQuantityPerActivation":8388607,"redeemLimitGlobal":0,"redeemType":"FULL","details":{"discountType":{"name":"BOGO","outerScope":true,"requiredItemsCount":2,"requiredItems":{"catalog":"221","catalogItemType":"FILTERED","catalogIndexItems":[],"catalogFilterIds":["f978b20f-7156-40ed-99c2-3af62b76af12"]},"discountedItemsCount":1},"cashbackSettings":{"exchangeRate":0.01,"limits":{"minPoints":10,"maxPoints":1000,"maxTransactionAmount":20,"maxTransactionPercentage":50}}},"discountType":"PERCENT","discountValue":0,"discountMode":"STATIC","discountModeDetails":{"discountSteps":[{"discountValue":0,"usageThreshold":0}],"discountUsageTrigger":"TRANSACTION"},"preDiscountValue":0,"requireRedeemedPoints":0,"headerName":"string","headerDescription":"string","name":"string","headline":"string","description":"string","images":[{"url":"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png","type":"image"}],"tags":[{"hash":"6f54671d-157f-4c4e-a577-11fac3111293"}],"startAt":"2019-08-24T14:15:22Z","expireAt":"2019-08-24T14:15:22Z","displayFrom":"string","displayTo":"string","lastingTime":0,"params":{},"itemScope":"LINE_ITEM","minBasketValue":null,"maxBasketValue":null,"catalog":"221","catalogItemType":"FILTERED","catalogIndexItems":[],"catalogFilterIds":["f978b20f-7156-40ed-99c2-3af62b76af12"],"excludeCatalog":["311"],"excludeCatalogItemType":"SELECTED","excludeCatalogIndexItems":["29727276"],"excludeCatalogFilterIds":[],"activationLimitGlobalType":"RELATIVE","activationLimitGlobalLimit":1,"activationLimitGlobalRelativeMinutes":null,"storeCatalog":"string","storeItemType":"ALL","storeIds":["string"],"targetType":"ALL","targetSegment":["string"],"price":0,"priority":250,"voucherPool":{"enabled":false,"uuid":"095be615-a8ad-4c33-8e9c-c7612fbf6c9f","transferable":false},"importHash":"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9"}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.put("https://api.synerise.com/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"visibilityStatus\":\"DRAFT\",\"type\":\"MEMBERS_ONLY\",\"redeemLimitPerClient\":0,\"redeemQuantityPerActivation\":8388607,\"redeemLimitGlobal\":0,\"redeemType\":\"FULL\",\"details\":{\"discountType\":{\"name\":\"BOGO\",\"outerScope\":true,\"requiredItemsCount\":2,\"requiredItems\":{\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"]},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.01,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}},\"discountType\":\"PERCENT\",\"discountValue\":0,\"discountMode\":\"STATIC\",\"discountModeDetails\":{\"discountSteps\":[{\"discountValue\":0,\"usageThreshold\":0}],\"discountUsageTrigger\":\"TRANSACTION\"},\"preDiscountValue\":0,\"requireRedeemedPoints\":0,\"headerName\":\"string\",\"headerDescription\":\"string\",\"name\":\"string\",\"headline\":\"string\",\"description\":\"string\",\"images\":[{\"url\":\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\",\"type\":\"image\"}],\"tags\":[{\"hash\":\"6f54671d-157f-4c4e-a577-11fac3111293\"}],\"startAt\":\"2019-08-24T14:15:22Z\",\"expireAt\":\"2019-08-24T14:15:22Z\",\"displayFrom\":\"string\",\"displayTo\":\"string\",\"lastingTime\":0,\"params\":{},\"itemScope\":\"LINE_ITEM\",\"minBasketValue\":null,\"maxBasketValue\":null,\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"],\"excludeCatalog\":[\"311\"],\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"29727276\"],\"excludeCatalogFilterIds\":[],\"activationLimitGlobalType\":\"RELATIVE\",\"activationLimitGlobalLimit\":1,\"activationLimitGlobalRelativeMinutes\":null,\"storeCatalog\":\"string\",\"storeItemType\":\"ALL\",\"storeIds\":[\"string\"],\"targetType\":\"ALL\",\"targetSegment\":[\"string\"],\"price\":0,\"priority\":250,\"voucherPool\":{\"enabled\":false,\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"transferable\":false},\"importHash\":\"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9\"}")
              .asString();
  /v4/promotions/promotion/get-for-client-by-custom-settings/{identifierType}/{identifierValue}:
    get:
      tags:
        - Promotions
      summary: Get Profile promotions by a custom filter
      description: |
        Retrieve a list of promotions related to a Profile by a custom,
        pre-defined filter.

        The filter is maintained by your backend administrator.

        **IMPORTANT**: 
        - As a result of this request, the `targetSegments` of all the matching promotions are checked. If this results in checking more than 30 unique segments, any segments above this limit may be ignored.
        - The endpoint is limited to 25000 requests per minute (per workspace).


        ---

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

        **API key permission required:** `PROMOTIONS_GET_FOR_CLIENT_BY_CUSTOM_SETTINGS_PROMOTIONS_READ`

        **User role permission required:** `campaigns_promotions: read`
      operationId: GetClientPromotionsByACustomFilter
      parameters:
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
        - $ref: "#/components/parameters/promotions-queryPage"
        - $ref: "#/components/parameters/promotions-queryLimit"
        - $ref: "#/components/parameters/promotions-queryLockIdentifier"
      responses:
        "200":
          description: An array of promotions
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/promotions-promotionClientDataResponse"
                    description: An array of promotions
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "409":
          $ref: "#/components/responses/promotions-WaitingForProfileLockReleaseError"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/GetClientPromotionsByACustomFilter
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/promotions/promotion/get-for-client-by-custom-settings/email/%7BidentifierValue%7D?page=4&limit=100&lockIdentifier=6561d87b-2697-46ad-8f9a-0550736b86e3' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

            conn.request("GET", "/v4/promotions/promotion/get-for-client-by-custom-settings/email/%7BidentifierValue%7D?page=4&limit=100&lockIdentifier=6561d87b-2697-46ad-8f9a-0550736b86e3", headers=headers)

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/v4/promotions/promotion/get-for-client-by-custom-settings/email/%7BidentifierValue%7D?page=4&limit=100&lockIdentifier=6561d87b-2697-46ad-8f9a-0550736b86e3");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/promotion/get-for-client-by-custom-settings/email/%7BidentifierValue%7D?page=4&limit=100&lockIdentifier=6561d87b-2697-46ad-8f9a-0550736b86e3",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/get-for-client-by-custom-settings/email/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => '4',
              'limit' => '100',
              'lockIdentifier' => '6561d87b-2697-46ad-8f9a-0550736b86e3'
            ]);

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/promotions/promotion/get-for-client-by-custom-settings/email/%7BidentifierValue%7D?page=4&limit=100&lockIdentifier=6561d87b-2697-46ad-8f9a-0550736b86e3")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/promotion/activate-for-client/{identifierType}/{identifierValue}:
    post:
      tags:
        - Promotions
      summary: Activate a promotion as Workspace
      description: |
        You can change the status of a Profile's promotion from `assigned` to `active`, the promotion can now be applied to a purchase.

        ---

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

        **API key permission required:** `PROMOTIONS_ACTIVATE_PROMOTIONS_UPDATE`

        **User role permission required:** `campaigns_promotions: update`
      operationId: ActivateAPromotionAsProfile
      parameters:
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-promotionActivation"
        required: true
      responses:
        "200":
          description: Promotion activated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-promotionClientDataResponse"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Promotion for profile not found
        "409":
          $ref: "#/components/responses/promotions-WaitingForProfileLockReleaseError"
        "412":
          $ref: "#/components/responses/promotions-PromotionActivate412"
        "422":
          $ref: "#/components/responses/promotions-PromotionActivate422"
        "423":
          $ref: "#/components/responses/promotions-ProfilePromotionsBlockedError"
        "500":
          $ref: "#/components/responses/promotions-500"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/ActivateAPromotionAsProfile
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/promotion/activate-for-client/email/%7BidentifierValue%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"key":"code","value":"7893467834GG","pointsToUse":100}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}"

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

            conn.request("POST", "/v4/promotions/promotion/activate-for-client/email/%7BidentifierValue%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "key": "code",
              "value": "7893467834GG",
              "pointsToUse": 100
            });

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

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

            xhr.open("POST", "https://api.synerise.com/v4/promotions/promotion/activate-for-client/email/%7BidentifierValue%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/promotion/activate-for-client/email/%7BidentifierValue%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({key: 'code', value: '7893467834GG', pointsToUse: 100}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/activate-for-client/email/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"key":"code","value":"7893467834GG","pointsToUse":100}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/promotions/promotion/activate-for-client/email/%7BidentifierValue%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}")
              .asString();
  /v4/promotions/promotion/batch-activate-for-client/{identifierType}/{identifierValue}:
    post:
      tags:
        - Promotions
      summary: Batch activate promotions as Workspace
      description: |
        You can change the status of a number of Profile's promotions promotion from `assigned` to `active`, the promotion can now be applied to a purchase.

        ---

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

        **API key permission required:** `PROMOTIONS_BATCH_ACTIVATE_PROMOTIONS_UPDATE`

        **User role permission required:** `campaigns_promotions: update`
      operationId: BatchActivateAsProfile
      parameters:
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/promotions-promotionActivation"
        required: true
      responses:
        "200":
          description: Promotions activated
          content:
            application/json:
              schema:
                type: object
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Promotions for profile not found
        "409":
          $ref: "#/components/responses/promotions-WaitingForProfileLockReleaseError"
        "412":
          $ref: "#/components/responses/promotions-PromotionActivate412"
        "500":
          $ref: "#/components/responses/promotions-500"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/BatchActivateAsProfile
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/promotion/batch-activate-for-client/email/%7BidentifierValue%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '[{"key":"code","value":"7893467834GG","pointsToUse":100}]'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]"

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

            conn.request("POST", "/v4/promotions/promotion/batch-activate-for-client/email/%7BidentifierValue%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              {
                "key": "code",
                "value": "7893467834GG",
                "pointsToUse": 100
              }
            ]);

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

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

            xhr.open("POST", "https://api.synerise.com/v4/promotions/promotion/batch-activate-for-client/email/%7BidentifierValue%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/promotion/batch-activate-for-client/email/%7BidentifierValue%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify([{key: 'code', value: '7893467834GG', pointsToUse: 100}]));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/batch-activate-for-client/email/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('[{"key":"code","value":"7893467834GG","pointsToUse":100}]');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/promotions/promotion/batch-activate-for-client/email/%7BidentifierValue%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]")
              .asString();
  /v4/promotions/promotion/deactivate-for-client/{identifierType}/{identifierValue}:
    post:
      tags:
        - Promotions
      summary: Deactivate a promotion as Workspace
      description: |
        You can change the status of a Profile's activated promotion back to `assigned`.

        ---

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

        **API key permission required:** `PROMOTIONS_DEACTIVATE_PROMOTIONS_UPDATE`

        **User role permission required:** `campaigns_promotions: update`
      operationId: DeactivateAPromotionProfile
      parameters:
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-promotionActivation"
        required: true
      responses:
        "200":
          description: Promotion deactivated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-promotionClientDataResponse"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Promotion for profile not found
        "429":
          $ref: "#/components/responses/promotions-WaitingForProfileLockReleaseError"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/DeactivateAPromotionProfile
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/promotion/deactivate-for-client/email/%7BidentifierValue%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"key":"code","value":"7893467834GG","pointsToUse":100}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}"

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

            conn.request("POST", "/v4/promotions/promotion/deactivate-for-client/email/%7BidentifierValue%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "key": "code",
              "value": "7893467834GG",
              "pointsToUse": 100
            });

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

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

            xhr.open("POST", "https://api.synerise.com/v4/promotions/promotion/deactivate-for-client/email/%7BidentifierValue%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/promotion/deactivate-for-client/email/%7BidentifierValue%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({key: 'code', value: '7893467834GG', pointsToUse: 100}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/deactivate-for-client/email/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"key":"code","value":"7893467834GG","pointsToUse":100}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/promotions/promotion/deactivate-for-client/email/%7BidentifierValue%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}")
              .asString();
  /v4/promotions/promotion/batch-deactivate-for-client/{identifierType}/{identifierValue}:
    post:
      tags:
        - Promotions
      summary: Batch deactivate promotions
      description: |
        You can change the status of a number of Profile's activated promotions back to `assigned`.

        ---

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

        **API key permission required:** `PROMOTIONS_BATCH_DEACTIVATE_PROMOTIONS_UPDATE`

        **User role permission required:** `campaigns_promotions: update`
      operationId: BatchDeactivateAsProfile
      parameters:
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/promotions-promotionActivation"
        required: true
      responses:
        "200":
          description: Promotions deactivated
          content:
            application/json:
              schema:
                type: object
                example: "{}"
              example: "{}"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionResponseMessage"
              example:
                message: Promotions for profile not found
        "429":
          $ref: "#/components/responses/promotions-WaitingForProfileLockReleaseError"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/BatchDeactivateAsProfile
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/promotion/batch-deactivate-for-client/email/%7BidentifierValue%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '[{"key":"code","value":"7893467834GG","pointsToUse":100}]'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]"

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

            conn.request("POST", "/v4/promotions/promotion/batch-deactivate-for-client/email/%7BidentifierValue%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              {
                "key": "code",
                "value": "7893467834GG",
                "pointsToUse": 100
              }
            ]);

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

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

            xhr.open("POST", "https://api.synerise.com/v4/promotions/promotion/batch-deactivate-for-client/email/%7BidentifierValue%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/promotion/batch-deactivate-for-client/email/%7BidentifierValue%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify([{key: 'code', value: '7893467834GG', pointsToUse: 100}]));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/batch-deactivate-for-client/email/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('[{"key":"code","value":"7893467834GG","pointsToUse":100}]');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/promotions/promotion/batch-deactivate-for-client/email/%7BidentifierValue%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]")
              .asString();
  /v4/promotions/promotion:
    post:
      tags:
        - Promotions
      summary: Create a promotion
      description: |
        You can create a new promotion in the Synerise application.


        If you don't enter a code or UUID, they are generated automatically.

        ---

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

        **API key permission required:** `PROMOTIONS_PROMOTIONS_CREATE`

        **User role permission required:** `campaigns_promotions: create`
      operationId: CreateAPromotion
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-promotionDataCreate"
        required: true
      responses:
        "201":
          description: Promotion created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionCreateUpdateDeleteRes"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/CreateAPromotion
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/promotion \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"visibilityStatus":"DRAFT","type":"MEMBERS_ONLY","redeemLimitPerClient":0,"redeemQuantityPerActivation":8388607,"redeemLimitGlobal":0,"redeemType":"FULL","details":{"discountType":{"name":"BOGO","outerScope":true,"requiredItemsCount":2,"requiredItems":{"catalog":"221","catalogItemType":"FILTERED","catalogIndexItems":[],"catalogFilterIds":["f978b20f-7156-40ed-99c2-3af62b76af12"]},"discountedItemsCount":1},"cashbackSettings":{"exchangeRate":0.01,"limits":{"minPoints":10,"maxPoints":1000,"maxTransactionAmount":20,"maxTransactionPercentage":50}}},"discountType":"PERCENT","discountValue":0,"discountMode":"STATIC","discountModeDetails":{"discountSteps":[{"discountValue":0,"usageThreshold":0}],"discountUsageTrigger":"TRANSACTION"},"preDiscountValue":0,"requireRedeemedPoints":0,"headerName":"string","headerDescription":"string","name":"string","headline":"string","description":"string","images":[{"url":"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png","type":"image"}],"tags":[{"hash":"6f54671d-157f-4c4e-a577-11fac3111293"}],"startAt":"2019-08-24T14:15:22Z","expireAt":"2019-08-24T14:15:22Z","displayFrom":"string","displayTo":"string","lastingTime":0,"params":{},"itemScope":"LINE_ITEM","minBasketValue":null,"maxBasketValue":null,"catalog":"221","catalogItemType":"FILTERED","catalogIndexItems":[],"catalogFilterIds":["f978b20f-7156-40ed-99c2-3af62b76af12"],"excludeCatalog":["311"],"excludeCatalogItemType":"SELECTED","excludeCatalogIndexItems":["29727276"],"excludeCatalogFilterIds":[],"activationLimitGlobalType":"RELATIVE","activationLimitGlobalLimit":1,"activationLimitGlobalRelativeMinutes":null,"storeCatalog":"string","storeItemType":"ALL","storeIds":["string"],"targetType":"ALL","targetSegment":["string"],"price":0,"priority":250,"voucherPool":{"enabled":false,"uuid":"095be615-a8ad-4c33-8e9c-c7612fbf6c9f","transferable":false},"importHash":"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"visibilityStatus\":\"DRAFT\",\"type\":\"MEMBERS_ONLY\",\"redeemLimitPerClient\":0,\"redeemQuantityPerActivation\":8388607,\"redeemLimitGlobal\":0,\"redeemType\":\"FULL\",\"details\":{\"discountType\":{\"name\":\"BOGO\",\"outerScope\":true,\"requiredItemsCount\":2,\"requiredItems\":{\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"]},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.01,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}},\"discountType\":\"PERCENT\",\"discountValue\":0,\"discountMode\":\"STATIC\",\"discountModeDetails\":{\"discountSteps\":[{\"discountValue\":0,\"usageThreshold\":0}],\"discountUsageTrigger\":\"TRANSACTION\"},\"preDiscountValue\":0,\"requireRedeemedPoints\":0,\"headerName\":\"string\",\"headerDescription\":\"string\",\"name\":\"string\",\"headline\":\"string\",\"description\":\"string\",\"images\":[{\"url\":\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\",\"type\":\"image\"}],\"tags\":[{\"hash\":\"6f54671d-157f-4c4e-a577-11fac3111293\"}],\"startAt\":\"2019-08-24T14:15:22Z\",\"expireAt\":\"2019-08-24T14:15:22Z\",\"displayFrom\":\"string\",\"displayTo\":\"string\",\"lastingTime\":0,\"params\":{},\"itemScope\":\"LINE_ITEM\",\"minBasketValue\":null,\"maxBasketValue\":null,\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"],\"excludeCatalog\":[\"311\"],\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"29727276\"],\"excludeCatalogFilterIds\":[],\"activationLimitGlobalType\":\"RELATIVE\",\"activationLimitGlobalLimit\":1,\"activationLimitGlobalRelativeMinutes\":null,\"storeCatalog\":\"string\",\"storeItemType\":\"ALL\",\"storeIds\":[\"string\"],\"targetType\":\"ALL\",\"targetSegment\":[\"string\"],\"price\":0,\"priority\":250,\"voucherPool\":{\"enabled\":false,\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"transferable\":false},\"importHash\":\"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9\"}"

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

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

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "visibilityStatus": "DRAFT",
              "type": "MEMBERS_ONLY",
              "redeemLimitPerClient": 0,
              "redeemQuantityPerActivation": 8388607,
              "redeemLimitGlobal": 0,
              "redeemType": "FULL",
              "details": {
                "discountType": {
                  "name": "BOGO",
                  "outerScope": true,
                  "requiredItemsCount": 2,
                  "requiredItems": {
                    "catalog": "221",
                    "catalogItemType": "FILTERED",
                    "catalogIndexItems": [],
                    "catalogFilterIds": [
                      "f978b20f-7156-40ed-99c2-3af62b76af12"
                    ]
                  },
                  "discountedItemsCount": 1
                },
                "cashbackSettings": {
                  "exchangeRate": 0.01,
                  "limits": {
                    "minPoints": 10,
                    "maxPoints": 1000,
                    "maxTransactionAmount": 20,
                    "maxTransactionPercentage": 50
                  }
                }
              },
              "discountType": "PERCENT",
              "discountValue": 0,
              "discountMode": "STATIC",
              "discountModeDetails": {
                "discountSteps": [
                  {
                    "discountValue": 0,
                    "usageThreshold": 0
                  }
                ],
                "discountUsageTrigger": "TRANSACTION"
              },
              "preDiscountValue": 0,
              "requireRedeemedPoints": 0,
              "headerName": "string",
              "headerDescription": "string",
              "name": "string",
              "headline": "string",
              "description": "string",
              "images": [
                {
                  "url": "https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png",
                  "type": "image"
                }
              ],
              "tags": [
                {
                  "hash": "6f54671d-157f-4c4e-a577-11fac3111293"
                }
              ],
              "startAt": "2019-08-24T14:15:22Z",
              "expireAt": "2019-08-24T14:15:22Z",
              "displayFrom": "string",
              "displayTo": "string",
              "lastingTime": 0,
              "params": {},
              "itemScope": "LINE_ITEM",
              "minBasketValue": null,
              "maxBasketValue": null,
              "catalog": "221",
              "catalogItemType": "FILTERED",
              "catalogIndexItems": [],
              "catalogFilterIds": [
                "f978b20f-7156-40ed-99c2-3af62b76af12"
              ],
              "excludeCatalog": [
                "311"
              ],
              "excludeCatalogItemType": "SELECTED",
              "excludeCatalogIndexItems": [
                "29727276"
              ],
              "excludeCatalogFilterIds": [],
              "activationLimitGlobalType": "RELATIVE",
              "activationLimitGlobalLimit": 1,
              "activationLimitGlobalRelativeMinutes": null,
              "storeCatalog": "string",
              "storeItemType": "ALL",
              "storeIds": [
                "string"
              ],
              "targetType": "ALL",
              "targetSegment": [
                "string"
              ],
              "price": 0,
              "priority": 250,
              "voucherPool": {
                "enabled": false,
                "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
                "transferable": false
              },
              "importHash": "ced8a4ad-6d6e-48ca-a663-3fb07e6216a9"
            });

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

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

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

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

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

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

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

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

            req.write(JSON.stringify({
              visibilityStatus: 'DRAFT',
              type: 'MEMBERS_ONLY',
              redeemLimitPerClient: 0,
              redeemQuantityPerActivation: 8388607,
              redeemLimitGlobal: 0,
              redeemType: 'FULL',
              details: {
                discountType: {
                  name: 'BOGO',
                  outerScope: true,
                  requiredItemsCount: 2,
                  requiredItems: {
                    catalog: '221',
                    catalogItemType: 'FILTERED',
                    catalogIndexItems: [],
                    catalogFilterIds: ['f978b20f-7156-40ed-99c2-3af62b76af12']
                  },
                  discountedItemsCount: 1
                },
                cashbackSettings: {
                  exchangeRate: 0.01,
                  limits: {
                    minPoints: 10,
                    maxPoints: 1000,
                    maxTransactionAmount: 20,
                    maxTransactionPercentage: 50
                  }
                }
              },
              discountType: 'PERCENT',
              discountValue: 0,
              discountMode: 'STATIC',
              discountModeDetails: {
                discountSteps: [{discountValue: 0, usageThreshold: 0}],
                discountUsageTrigger: 'TRANSACTION'
              },
              preDiscountValue: 0,
              requireRedeemedPoints: 0,
              headerName: 'string',
              headerDescription: 'string',
              name: 'string',
              headline: 'string',
              description: 'string',
              images: [
                {
                  url: 'https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png',
                  type: 'image'
                }
              ],
              tags: [{hash: '6f54671d-157f-4c4e-a577-11fac3111293'}],
              startAt: '2019-08-24T14:15:22Z',
              expireAt: '2019-08-24T14:15:22Z',
              displayFrom: 'string',
              displayTo: 'string',
              lastingTime: 0,
              params: {},
              itemScope: 'LINE_ITEM',
              minBasketValue: null,
              maxBasketValue: null,
              catalog: '221',
              catalogItemType: 'FILTERED',
              catalogIndexItems: [],
              catalogFilterIds: ['f978b20f-7156-40ed-99c2-3af62b76af12'],
              excludeCatalog: ['311'],
              excludeCatalogItemType: 'SELECTED',
              excludeCatalogIndexItems: ['29727276'],
              excludeCatalogFilterIds: [],
              activationLimitGlobalType: 'RELATIVE',
              activationLimitGlobalLimit: 1,
              activationLimitGlobalRelativeMinutes: null,
              storeCatalog: 'string',
              storeItemType: 'ALL',
              storeIds: ['string'],
              targetType: 'ALL',
              targetSegment: ['string'],
              price: 0,
              priority: 250,
              voucherPool: {
                enabled: false,
                uuid: '095be615-a8ad-4c33-8e9c-c7612fbf6c9f',
                transferable: false
              },
              importHash: 'ced8a4ad-6d6e-48ca-a663-3fb07e6216a9'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"visibilityStatus":"DRAFT","type":"MEMBERS_ONLY","redeemLimitPerClient":0,"redeemQuantityPerActivation":8388607,"redeemLimitGlobal":0,"redeemType":"FULL","details":{"discountType":{"name":"BOGO","outerScope":true,"requiredItemsCount":2,"requiredItems":{"catalog":"221","catalogItemType":"FILTERED","catalogIndexItems":[],"catalogFilterIds":["f978b20f-7156-40ed-99c2-3af62b76af12"]},"discountedItemsCount":1},"cashbackSettings":{"exchangeRate":0.01,"limits":{"minPoints":10,"maxPoints":1000,"maxTransactionAmount":20,"maxTransactionPercentage":50}}},"discountType":"PERCENT","discountValue":0,"discountMode":"STATIC","discountModeDetails":{"discountSteps":[{"discountValue":0,"usageThreshold":0}],"discountUsageTrigger":"TRANSACTION"},"preDiscountValue":0,"requireRedeemedPoints":0,"headerName":"string","headerDescription":"string","name":"string","headline":"string","description":"string","images":[{"url":"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png","type":"image"}],"tags":[{"hash":"6f54671d-157f-4c4e-a577-11fac3111293"}],"startAt":"2019-08-24T14:15:22Z","expireAt":"2019-08-24T14:15:22Z","displayFrom":"string","displayTo":"string","lastingTime":0,"params":{},"itemScope":"LINE_ITEM","minBasketValue":null,"maxBasketValue":null,"catalog":"221","catalogItemType":"FILTERED","catalogIndexItems":[],"catalogFilterIds":["f978b20f-7156-40ed-99c2-3af62b76af12"],"excludeCatalog":["311"],"excludeCatalogItemType":"SELECTED","excludeCatalogIndexItems":["29727276"],"excludeCatalogFilterIds":[],"activationLimitGlobalType":"RELATIVE","activationLimitGlobalLimit":1,"activationLimitGlobalRelativeMinutes":null,"storeCatalog":"string","storeItemType":"ALL","storeIds":["string"],"targetType":"ALL","targetSegment":["string"],"price":0,"priority":250,"voucherPool":{"enabled":false,"uuid":"095be615-a8ad-4c33-8e9c-c7612fbf6c9f","transferable":false},"importHash":"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9"}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/promotions/promotion")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"visibilityStatus\":\"DRAFT\",\"type\":\"MEMBERS_ONLY\",\"redeemLimitPerClient\":0,\"redeemQuantityPerActivation\":8388607,\"redeemLimitGlobal\":0,\"redeemType\":\"FULL\",\"details\":{\"discountType\":{\"name\":\"BOGO\",\"outerScope\":true,\"requiredItemsCount\":2,\"requiredItems\":{\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"]},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.01,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}},\"discountType\":\"PERCENT\",\"discountValue\":0,\"discountMode\":\"STATIC\",\"discountModeDetails\":{\"discountSteps\":[{\"discountValue\":0,\"usageThreshold\":0}],\"discountUsageTrigger\":\"TRANSACTION\"},\"preDiscountValue\":0,\"requireRedeemedPoints\":0,\"headerName\":\"string\",\"headerDescription\":\"string\",\"name\":\"string\",\"headline\":\"string\",\"description\":\"string\",\"images\":[{\"url\":\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\",\"type\":\"image\"}],\"tags\":[{\"hash\":\"6f54671d-157f-4c4e-a577-11fac3111293\"}],\"startAt\":\"2019-08-24T14:15:22Z\",\"expireAt\":\"2019-08-24T14:15:22Z\",\"displayFrom\":\"string\",\"displayTo\":\"string\",\"lastingTime\":0,\"params\":{},\"itemScope\":\"LINE_ITEM\",\"minBasketValue\":null,\"maxBasketValue\":null,\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"],\"excludeCatalog\":[\"311\"],\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"29727276\"],\"excludeCatalogFilterIds\":[],\"activationLimitGlobalType\":\"RELATIVE\",\"activationLimitGlobalLimit\":1,\"activationLimitGlobalRelativeMinutes\":null,\"storeCatalog\":\"string\",\"storeItemType\":\"ALL\",\"storeIds\":[\"string\"],\"targetType\":\"ALL\",\"targetSegment\":[\"string\"],\"price\":0,\"priority\":250,\"voucherPool\":{\"enabled\":false,\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"transferable\":false},\"importHash\":\"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9\"}")
              .asString();
    delete:
      tags:
        - Promotions
      summary: Delete a promotion
      description: |
        This method is used to delete an existing promotion. It can be used by a backend business administrator.

        ---

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

        **API key permission required:** `PROMOTIONS_PROMOTIONS_DELETE`

        **User role permission required:** `campaigns_promotions: delete`
      operationId: DeleteAPromotion
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-promotionDataDelete"
            example:
              value: 8f3457075b2769d039
        required: true
      responses:
        "200":
          description: Promotion deleted
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionCreateUpdateDeleteRes"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          $ref: "#/components/responses/promotions-Promotion404"
        "409":
          $ref: "#/components/responses/promotions-WaitingForProfileLockReleaseError"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/DeleteAPromotion
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/v4/promotions/promotion \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"value":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

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

            conn.request("DELETE", "/v4/promotions/promotion", payload, headers)

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

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

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

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

            xhr.open("DELETE", "https://api.synerise.com/v4/promotions/promotion");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/promotion",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

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

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

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

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/v4/promotions/promotion")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"value\":\"string\"}")
              .asString();
  /v4/promotions/promotion/create-or-update:
    post:
      tags:
        - Promotions
      summary: Create or update a promotion
      description: |
        You can use this endpoint to create a new promotion or update an existing one that matches the UUID or promotion code that you send.


        When updating an existing promotion include only the fields that you want to change. Inserting a null value overwrites an existing value.

        ---

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

        **API key permissions required (at least one):** `PROMOTIONS_PROMOTIONS_CREATE`, `PROMOTIONS_PROMOTIONS_UPDATE`

        **User role permission required:** `campaigns_promotions: create`
      operationId: CreateOrUpdateAPromotion
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-promotionDataCreateOrUpdate"
        required: true
      responses:
        "200":
          $ref: "#/components/responses/promotions-PromotionUpdated"
        "201":
          $ref: "#/components/responses/promotions-PromotionCreated"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/CreateOrUpdateAPromotion
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/promotion/create-or-update \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"uuid":"string","code":"string","visibilityStatus":"DRAFT","type":"MEMBERS_ONLY","redeemLimitPerClient":0,"redeemQuantityPerActivation":8388607,"redeemLimitGlobal":0,"redeemType":"FULL","discountType":"PERCENT","details":{"discountType":{"name":"BOGO","outerScope":true,"requiredItemsCount":2,"requiredItems":{"catalog":"221","catalogItemType":"FILTERED","catalogIndexItems":[],"catalogFilterIds":["f978b20f-7156-40ed-99c2-3af62b76af12"]},"discountedItemsCount":1},"cashbackSettings":{"exchangeRate":0.01,"limits":{"minPoints":10,"maxPoints":1000,"maxTransactionAmount":20,"maxTransactionPercentage":50}}},"discountValue":0,"discountMode":"STATIC","discountModeDetails":{"discountSteps":[{"discountValue":0,"usageThreshold":0}],"discountUsageTrigger":"TRANSACTION"},"preDiscountValue":0,"requireRedeemedPoints":0,"headerName":"string","headerDescription":"string","name":"string","headline":"string","description":"string","images":[{"url":"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png","type":"image"}],"tags":[{"hash":"6f54671d-157f-4c4e-a577-11fac3111293"}],"startAt":"2019-08-24T14:15:22Z","expireAt":"2019-08-24T14:15:22Z","displayFrom":"string","displayTo":"string","lastingTime":0,"params":{},"itemScope":"LINE_ITEM","minBasketValue":null,"maxBasketValue":null,"catalog":"221","catalogItemType":"FILTERED","catalogIndexItems":[],"catalogFilterIds":["f978b20f-7156-40ed-99c2-3af62b76af12"],"excludeCatalog":["311"],"excludeCatalogItemType":"SELECTED","excludeCatalogIndexItems":["29727276"],"excludeCatalogFilterIds":[],"storeCatalog":"string","storeItemType":"ALL","storeIds":["string"],"targetType":"ALL","targetSegment":["string"],"price":0,"priority":250,"voucherPool":{"enabled":false,"uuid":"095be615-a8ad-4c33-8e9c-c7612fbf6c9f","transferable":false},"importHash":"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"uuid\":\"string\",\"code\":\"string\",\"visibilityStatus\":\"DRAFT\",\"type\":\"MEMBERS_ONLY\",\"redeemLimitPerClient\":0,\"redeemQuantityPerActivation\":8388607,\"redeemLimitGlobal\":0,\"redeemType\":\"FULL\",\"discountType\":\"PERCENT\",\"details\":{\"discountType\":{\"name\":\"BOGO\",\"outerScope\":true,\"requiredItemsCount\":2,\"requiredItems\":{\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"]},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.01,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}},\"discountValue\":0,\"discountMode\":\"STATIC\",\"discountModeDetails\":{\"discountSteps\":[{\"discountValue\":0,\"usageThreshold\":0}],\"discountUsageTrigger\":\"TRANSACTION\"},\"preDiscountValue\":0,\"requireRedeemedPoints\":0,\"headerName\":\"string\",\"headerDescription\":\"string\",\"name\":\"string\",\"headline\":\"string\",\"description\":\"string\",\"images\":[{\"url\":\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\",\"type\":\"image\"}],\"tags\":[{\"hash\":\"6f54671d-157f-4c4e-a577-11fac3111293\"}],\"startAt\":\"2019-08-24T14:15:22Z\",\"expireAt\":\"2019-08-24T14:15:22Z\",\"displayFrom\":\"string\",\"displayTo\":\"string\",\"lastingTime\":0,\"params\":{},\"itemScope\":\"LINE_ITEM\",\"minBasketValue\":null,\"maxBasketValue\":null,\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"],\"excludeCatalog\":[\"311\"],\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"29727276\"],\"excludeCatalogFilterIds\":[],\"storeCatalog\":\"string\",\"storeItemType\":\"ALL\",\"storeIds\":[\"string\"],\"targetType\":\"ALL\",\"targetSegment\":[\"string\"],\"price\":0,\"priority\":250,\"voucherPool\":{\"enabled\":false,\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"transferable\":false},\"importHash\":\"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9\"}"

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

            conn.request("POST", "/v4/promotions/promotion/create-or-update", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "uuid": "string",
              "code": "string",
              "visibilityStatus": "DRAFT",
              "type": "MEMBERS_ONLY",
              "redeemLimitPerClient": 0,
              "redeemQuantityPerActivation": 8388607,
              "redeemLimitGlobal": 0,
              "redeemType": "FULL",
              "discountType": "PERCENT",
              "details": {
                "discountType": {
                  "name": "BOGO",
                  "outerScope": true,
                  "requiredItemsCount": 2,
                  "requiredItems": {
                    "catalog": "221",
                    "catalogItemType": "FILTERED",
                    "catalogIndexItems": [],
                    "catalogFilterIds": [
                      "f978b20f-7156-40ed-99c2-3af62b76af12"
                    ]
                  },
                  "discountedItemsCount": 1
                },
                "cashbackSettings": {
                  "exchangeRate": 0.01,
                  "limits": {
                    "minPoints": 10,
                    "maxPoints": 1000,
                    "maxTransactionAmount": 20,
                    "maxTransactionPercentage": 50
                  }
                }
              },
              "discountValue": 0,
              "discountMode": "STATIC",
              "discountModeDetails": {
                "discountSteps": [
                  {
                    "discountValue": 0,
                    "usageThreshold": 0
                  }
                ],
                "discountUsageTrigger": "TRANSACTION"
              },
              "preDiscountValue": 0,
              "requireRedeemedPoints": 0,
              "headerName": "string",
              "headerDescription": "string",
              "name": "string",
              "headline": "string",
              "description": "string",
              "images": [
                {
                  "url": "https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png",
                  "type": "image"
                }
              ],
              "tags": [
                {
                  "hash": "6f54671d-157f-4c4e-a577-11fac3111293"
                }
              ],
              "startAt": "2019-08-24T14:15:22Z",
              "expireAt": "2019-08-24T14:15:22Z",
              "displayFrom": "string",
              "displayTo": "string",
              "lastingTime": 0,
              "params": {},
              "itemScope": "LINE_ITEM",
              "minBasketValue": null,
              "maxBasketValue": null,
              "catalog": "221",
              "catalogItemType": "FILTERED",
              "catalogIndexItems": [],
              "catalogFilterIds": [
                "f978b20f-7156-40ed-99c2-3af62b76af12"
              ],
              "excludeCatalog": [
                "311"
              ],
              "excludeCatalogItemType": "SELECTED",
              "excludeCatalogIndexItems": [
                "29727276"
              ],
              "excludeCatalogFilterIds": [],
              "storeCatalog": "string",
              "storeItemType": "ALL",
              "storeIds": [
                "string"
              ],
              "targetType": "ALL",
              "targetSegment": [
                "string"
              ],
              "price": 0,
              "priority": 250,
              "voucherPool": {
                "enabled": false,
                "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
                "transferable": false
              },
              "importHash": "ced8a4ad-6d6e-48ca-a663-3fb07e6216a9"
            });

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

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

            xhr.open("POST", "https://api.synerise.com/v4/promotions/promotion/create-or-update");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/promotion/create-or-update",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({
              uuid: 'string',
              code: 'string',
              visibilityStatus: 'DRAFT',
              type: 'MEMBERS_ONLY',
              redeemLimitPerClient: 0,
              redeemQuantityPerActivation: 8388607,
              redeemLimitGlobal: 0,
              redeemType: 'FULL',
              discountType: 'PERCENT',
              details: {
                discountType: {
                  name: 'BOGO',
                  outerScope: true,
                  requiredItemsCount: 2,
                  requiredItems: {
                    catalog: '221',
                    catalogItemType: 'FILTERED',
                    catalogIndexItems: [],
                    catalogFilterIds: ['f978b20f-7156-40ed-99c2-3af62b76af12']
                  },
                  discountedItemsCount: 1
                },
                cashbackSettings: {
                  exchangeRate: 0.01,
                  limits: {
                    minPoints: 10,
                    maxPoints: 1000,
                    maxTransactionAmount: 20,
                    maxTransactionPercentage: 50
                  }
                }
              },
              discountValue: 0,
              discountMode: 'STATIC',
              discountModeDetails: {
                discountSteps: [{discountValue: 0, usageThreshold: 0}],
                discountUsageTrigger: 'TRANSACTION'
              },
              preDiscountValue: 0,
              requireRedeemedPoints: 0,
              headerName: 'string',
              headerDescription: 'string',
              name: 'string',
              headline: 'string',
              description: 'string',
              images: [
                {
                  url: 'https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png',
                  type: 'image'
                }
              ],
              tags: [{hash: '6f54671d-157f-4c4e-a577-11fac3111293'}],
              startAt: '2019-08-24T14:15:22Z',
              expireAt: '2019-08-24T14:15:22Z',
              displayFrom: 'string',
              displayTo: 'string',
              lastingTime: 0,
              params: {},
              itemScope: 'LINE_ITEM',
              minBasketValue: null,
              maxBasketValue: null,
              catalog: '221',
              catalogItemType: 'FILTERED',
              catalogIndexItems: [],
              catalogFilterIds: ['f978b20f-7156-40ed-99c2-3af62b76af12'],
              excludeCatalog: ['311'],
              excludeCatalogItemType: 'SELECTED',
              excludeCatalogIndexItems: ['29727276'],
              excludeCatalogFilterIds: [],
              storeCatalog: 'string',
              storeItemType: 'ALL',
              storeIds: ['string'],
              targetType: 'ALL',
              targetSegment: ['string'],
              price: 0,
              priority: 250,
              voucherPool: {
                enabled: false,
                uuid: '095be615-a8ad-4c33-8e9c-c7612fbf6c9f',
                transferable: false
              },
              importHash: 'ced8a4ad-6d6e-48ca-a663-3fb07e6216a9'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/create-or-update');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"uuid":"string","code":"string","visibilityStatus":"DRAFT","type":"MEMBERS_ONLY","redeemLimitPerClient":0,"redeemQuantityPerActivation":8388607,"redeemLimitGlobal":0,"redeemType":"FULL","discountType":"PERCENT","details":{"discountType":{"name":"BOGO","outerScope":true,"requiredItemsCount":2,"requiredItems":{"catalog":"221","catalogItemType":"FILTERED","catalogIndexItems":[],"catalogFilterIds":["f978b20f-7156-40ed-99c2-3af62b76af12"]},"discountedItemsCount":1},"cashbackSettings":{"exchangeRate":0.01,"limits":{"minPoints":10,"maxPoints":1000,"maxTransactionAmount":20,"maxTransactionPercentage":50}}},"discountValue":0,"discountMode":"STATIC","discountModeDetails":{"discountSteps":[{"discountValue":0,"usageThreshold":0}],"discountUsageTrigger":"TRANSACTION"},"preDiscountValue":0,"requireRedeemedPoints":0,"headerName":"string","headerDescription":"string","name":"string","headline":"string","description":"string","images":[{"url":"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png","type":"image"}],"tags":[{"hash":"6f54671d-157f-4c4e-a577-11fac3111293"}],"startAt":"2019-08-24T14:15:22Z","expireAt":"2019-08-24T14:15:22Z","displayFrom":"string","displayTo":"string","lastingTime":0,"params":{},"itemScope":"LINE_ITEM","minBasketValue":null,"maxBasketValue":null,"catalog":"221","catalogItemType":"FILTERED","catalogIndexItems":[],"catalogFilterIds":["f978b20f-7156-40ed-99c2-3af62b76af12"],"excludeCatalog":["311"],"excludeCatalogItemType":"SELECTED","excludeCatalogIndexItems":["29727276"],"excludeCatalogFilterIds":[],"storeCatalog":"string","storeItemType":"ALL","storeIds":["string"],"targetType":"ALL","targetSegment":["string"],"price":0,"priority":250,"voucherPool":{"enabled":false,"uuid":"095be615-a8ad-4c33-8e9c-c7612fbf6c9f","transferable":false},"importHash":"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9"}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/promotions/promotion/create-or-update")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"uuid\":\"string\",\"code\":\"string\",\"visibilityStatus\":\"DRAFT\",\"type\":\"MEMBERS_ONLY\",\"redeemLimitPerClient\":0,\"redeemQuantityPerActivation\":8388607,\"redeemLimitGlobal\":0,\"redeemType\":\"FULL\",\"discountType\":\"PERCENT\",\"details\":{\"discountType\":{\"name\":\"BOGO\",\"outerScope\":true,\"requiredItemsCount\":2,\"requiredItems\":{\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"]},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.01,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}},\"discountValue\":0,\"discountMode\":\"STATIC\",\"discountModeDetails\":{\"discountSteps\":[{\"discountValue\":0,\"usageThreshold\":0}],\"discountUsageTrigger\":\"TRANSACTION\"},\"preDiscountValue\":0,\"requireRedeemedPoints\":0,\"headerName\":\"string\",\"headerDescription\":\"string\",\"name\":\"string\",\"headline\":\"string\",\"description\":\"string\",\"images\":[{\"url\":\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\",\"type\":\"image\"}],\"tags\":[{\"hash\":\"6f54671d-157f-4c4e-a577-11fac3111293\"}],\"startAt\":\"2019-08-24T14:15:22Z\",\"expireAt\":\"2019-08-24T14:15:22Z\",\"displayFrom\":\"string\",\"displayTo\":\"string\",\"lastingTime\":0,\"params\":{},\"itemScope\":\"LINE_ITEM\",\"minBasketValue\":null,\"maxBasketValue\":null,\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"],\"excludeCatalog\":[\"311\"],\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"29727276\"],\"excludeCatalogFilterIds\":[],\"storeCatalog\":\"string\",\"storeItemType\":\"ALL\",\"storeIds\":[\"string\"],\"targetType\":\"ALL\",\"targetSegment\":[\"string\"],\"price\":0,\"priority\":250,\"voucherPool\":{\"enabled\":false,\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"transferable\":false},\"importHash\":\"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9\"}")
              .asString();
  /v4/promotions/promotion/locking/check-client:
    get:
      tags:
        - Promotion locks
      summary: Check account lock
      description: |
        You can check if a Profile account is locked due to processing of batch promotion/voucher activations or deactivations.


        You must be logged in as the Profile.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>
      operationId: CheckAccountLock
      responses:
        "200":
          description: Information about Profile lock
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-HTTP200withMessage"
              example:
                message: Profile is unlocked and ready for traffic
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotion-locks/operation/CheckAccountLock
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/promotions/promotion/locking/check-client \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

            conn.request("GET", "/v4/promotions/promotion/locking/check-client", headers=headers)

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/v4/promotions/promotion/locking/check-client");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/promotion/locking/check-client",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/locking/check-client');
            $request->setMethod(HTTP_METH_GET);

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/promotions/promotion/locking/check-client")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/voucher/batch-redeem:
    post:
      tags:
        - Promotions
      summary: Batch redeem vouchers
      description: |
        You can redeem up to 100 vouchers.

        ---

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

        **User role permission required:** `campaigns_promotions: create`
      operationId: BatchRedeemVouchers
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-RedeemVouchersRequest"
        required: true
      responses:
        "200":
          $ref: "#/components/responses/promotions-VouchersRedeemedResponse"
        "207":
          $ref: "#/components/responses/promotions-VouchersRedeemedResponseWithErrors"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/BatchRedeemVouchers
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/voucher/batch-redeem \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '[{"voucherKey":"code","voucherValue":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9","options":{"quantity":1,"sourceId":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1","orderId":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1","lockIdentifier":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9"}}]'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "[{\"voucherKey\":\"code\",\"voucherValue\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\",\"options\":{\"quantity\":1,\"sourceId\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1\",\"orderId\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1\",\"lockIdentifier\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\"}}]"

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

            conn.request("POST", "/v4/promotions/voucher/batch-redeem", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              {
                "voucherKey": "code",
                "voucherValue": "75d9090f-06ac-46a2-a0ce-4b8eb287efb9",
                "options": {
                  "quantity": 1,
                  "sourceId": "75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1",
                  "orderId": "75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1",
                  "lockIdentifier": "75d9090f-06ac-46a2-a0ce-4b8eb287efb9"
                }
              }
            ]);

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

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

            xhr.open("POST", "https://api.synerise.com/v4/promotions/voucher/batch-redeem");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

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

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

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

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

            req.write(JSON.stringify([
              {
                voucherKey: 'code',
                voucherValue: '75d9090f-06ac-46a2-a0ce-4b8eb287efb9',
                options: {
                  quantity: 1,
                  sourceId: '75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1',
                  orderId: '75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1',
                  lockIdentifier: '75d9090f-06ac-46a2-a0ce-4b8eb287efb9'
                }
              }
            ]));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('[{"voucherKey":"code","voucherValue":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9","options":{"quantity":1,"sourceId":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1","orderId":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1","lockIdentifier":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9"}}]');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/promotions/voucher/batch-redeem")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[{\"voucherKey\":\"code\",\"voucherValue\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\",\"options\":{\"quantity\":1,\"sourceId\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1\",\"orderId\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1\",\"lockIdentifier\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\"}}]")
              .asString();
  /v4/promotions/voucher/batch-redeem-for-profile:
    post:
      tags:
        - Promotions
      summary: Batch redeem vouchers for profiles
      description: |
        You can redeem up to 100 vouchers.

        ---

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

        **API key permission required:** `PROMOTIONS_BATCH_REDEEM_VOUCHERS_PROMOTIONS_CREATE`

        **User role permission required:** `campaigns_promotions: create`
      operationId: BatchRedeemVouchersForProfile
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-RedeemVouchersForProfileRequest"
        required: true
      responses:
        "200":
          $ref: "#/components/responses/promotions-VouchersRedeemedResponse"
        "207":
          $ref: "#/components/responses/promotions-VouchersRedeemedResponseWithErrors"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/BatchRedeemVouchersForProfile
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/voucher/batch-redeem-for-profile \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '[{"profileKey":"clientId","profileValue":"434428563","voucherKey":"code","voucherValue":"434428563","options":{"quantity":2,"sourceId":"3f0a1670-eb63-43f1-a6b8-895a74621964-3","orderId":"3f0a1670-eb63-43f1-a6b8-895a74621964"}}]'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "[{\"profileKey\":\"clientId\",\"profileValue\":\"434428563\",\"voucherKey\":\"code\",\"voucherValue\":\"434428563\",\"options\":{\"quantity\":2,\"sourceId\":\"3f0a1670-eb63-43f1-a6b8-895a74621964-3\",\"orderId\":\"3f0a1670-eb63-43f1-a6b8-895a74621964\"}}]"

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

            conn.request("POST", "/v4/promotions/voucher/batch-redeem-for-profile", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              {
                "profileKey": "clientId",
                "profileValue": "434428563",
                "voucherKey": "code",
                "voucherValue": "434428563",
                "options": {
                  "quantity": 2,
                  "sourceId": "3f0a1670-eb63-43f1-a6b8-895a74621964-3",
                  "orderId": "3f0a1670-eb63-43f1-a6b8-895a74621964"
                }
              }
            ]);

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

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

            xhr.open("POST", "https://api.synerise.com/v4/promotions/voucher/batch-redeem-for-profile");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/voucher/batch-redeem-for-profile",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify([
              {
                profileKey: 'clientId',
                profileValue: '434428563',
                voucherKey: 'code',
                voucherValue: '434428563',
                options: {
                  quantity: 2,
                  sourceId: '3f0a1670-eb63-43f1-a6b8-895a74621964-3',
                  orderId: '3f0a1670-eb63-43f1-a6b8-895a74621964'
                }
              }
            ]));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/voucher/batch-redeem-for-profile');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('[{"profileKey":"clientId","profileValue":"434428563","voucherKey":"code","voucherValue":"434428563","options":{"quantity":2,"sourceId":"3f0a1670-eb63-43f1-a6b8-895a74621964-3","orderId":"3f0a1670-eb63-43f1-a6b8-895a74621964"}}]');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/promotions/voucher/batch-redeem-for-profile")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[{\"profileKey\":\"clientId\",\"profileValue\":\"434428563\",\"voucherKey\":\"code\",\"voucherValue\":\"434428563\",\"options\":{\"quantity\":2,\"sourceId\":\"3f0a1670-eb63-43f1-a6b8-895a74621964-3\",\"orderId\":\"3f0a1670-eb63-43f1-a6b8-895a74621964\"}}]")
              .asString();
  /v4/promotions/v2/promotion/batch:
    post:
      tags:
        - Promotions
      summary: Batch import promotions
      description: |
        Submit a batch of promotions for asynchronous import (upsert). Items are validated individually and queued for processing. Returns 202 if all items are valid, or 207 if some fail validation.

        ---

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

        **API key permission required:** `PROMOTIONS_IMPORT_PROMOTIONS_CREATE`

        **User role permission required:** `campaigns_promotions: create`
      operationId: BatchImportPromotions
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-PromotionImportBatchRequest"
        required: true
      responses:
        "202":
          description: All items accepted for processing
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionImportBatchAcceptedResponse"
        "207":
          $ref: "#/components/responses/promotions-PromotionImportBatchPartialError"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/BatchImportPromotions
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/v2/promotion/batch \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"data":[{"uuid":"string","code":"string","visibilityStatus":"DRAFT","type":"MEMBERS_ONLY","redeemLimitPerClient":0,"redeemQuantityPerActivation":8388607,"redeemLimitGlobal":0,"redeemType":"FULL","autoRedeem":true,"activationLimitGlobalType":"RELATIVE","activationLimitGlobalLimit":1,"activationLimitGlobalRelativeMinutes":null,"discountType":"PERCENT","details":{"discountType":{"name":"BOGO","outerScope":true,"requiredItemsCount":2,"requiredItems":{"catalog":"221","catalogItemType":"FILTERED","catalogIndexItems":[],"catalogFilterIds":["f978b20f-7156-40ed-99c2-3af62b76af12"]},"discountedItemsCount":1},"cashbackSettings":{"exchangeRate":0.01,"limits":{"minPoints":10,"maxPoints":1000,"maxTransactionAmount":20,"maxTransactionPercentage":50}}},"discountValue":0,"discountMode":"STATIC","discountModeDetails":{"steps":[{"discountValue":0,"usageThreshold":0}],"discountUsageTrigger":"TRANSACTION"},"preDiscountValue":0,"requireRedeemedPoints":0,"headerName":"string","headerDescription":"string","name":"string","headline":"string","description":"string","images":[{"url":"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png","type":"image"}],"tags":[{"hash":"6f54671d-157f-4c4e-a577-11fac3111293"}],"metric":"string","startAt":"2019-08-24T14:15:22Z","expireAt":"2019-08-24T14:15:22Z","displayFrom":"string","displayTo":"string","lastingTime":0,"params":{},"itemScope":"LINE_ITEM","minBasketValue":null,"maxBasketValue":null,"catalog":"string","catalogItemType":"FILTERED","catalogIndexItems":["string"],"catalogFilterIds":["string"],"excludeCatalog":"string","excludeCatalogItemType":"SELECTED","excludeCatalogIndexItems":["string"],"excludeCatalogFilterIds":["string"],"storeCatalog":"string","storeItemType":"ALL","storeIds":["string"],"targetType":"ALL","targetSegment":["string"],"price":0,"priority":250,"voucherPool":{"enabled":false,"uuid":"095be615-a8ad-4c33-8e9c-c7612fbf6c9f","transferable":false}}],"extra":{"importHash":"string"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"data\":[{\"uuid\":\"string\",\"code\":\"string\",\"visibilityStatus\":\"DRAFT\",\"type\":\"MEMBERS_ONLY\",\"redeemLimitPerClient\":0,\"redeemQuantityPerActivation\":8388607,\"redeemLimitGlobal\":0,\"redeemType\":\"FULL\",\"autoRedeem\":true,\"activationLimitGlobalType\":\"RELATIVE\",\"activationLimitGlobalLimit\":1,\"activationLimitGlobalRelativeMinutes\":null,\"discountType\":\"PERCENT\",\"details\":{\"discountType\":{\"name\":\"BOGO\",\"outerScope\":true,\"requiredItemsCount\":2,\"requiredItems\":{\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"]},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.01,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}},\"discountValue\":0,\"discountMode\":\"STATIC\",\"discountModeDetails\":{\"steps\":[{\"discountValue\":0,\"usageThreshold\":0}],\"discountUsageTrigger\":\"TRANSACTION\"},\"preDiscountValue\":0,\"requireRedeemedPoints\":0,\"headerName\":\"string\",\"headerDescription\":\"string\",\"name\":\"string\",\"headline\":\"string\",\"description\":\"string\",\"images\":[{\"url\":\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\",\"type\":\"image\"}],\"tags\":[{\"hash\":\"6f54671d-157f-4c4e-a577-11fac3111293\"}],\"metric\":\"string\",\"startAt\":\"2019-08-24T14:15:22Z\",\"expireAt\":\"2019-08-24T14:15:22Z\",\"displayFrom\":\"string\",\"displayTo\":\"string\",\"lastingTime\":0,\"params\":{},\"itemScope\":\"LINE_ITEM\",\"minBasketValue\":null,\"maxBasketValue\":null,\"catalog\":\"string\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[\"string\"],\"catalogFilterIds\":[\"string\"],\"excludeCatalog\":\"string\",\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"string\"],\"excludeCatalogFilterIds\":[\"string\"],\"storeCatalog\":\"string\",\"storeItemType\":\"ALL\",\"storeIds\":[\"string\"],\"targetType\":\"ALL\",\"targetSegment\":[\"string\"],\"price\":0,\"priority\":250,\"voucherPool\":{\"enabled\":false,\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"transferable\":false}}],\"extra\":{\"importHash\":\"string\"}}"

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

            conn.request("POST", "/v4/promotions/v2/promotion/batch", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "data": [
                {
                  "uuid": "string",
                  "code": "string",
                  "visibilityStatus": "DRAFT",
                  "type": "MEMBERS_ONLY",
                  "redeemLimitPerClient": 0,
                  "redeemQuantityPerActivation": 8388607,
                  "redeemLimitGlobal": 0,
                  "redeemType": "FULL",
                  "autoRedeem": true,
                  "activationLimitGlobalType": "RELATIVE",
                  "activationLimitGlobalLimit": 1,
                  "activationLimitGlobalRelativeMinutes": null,
                  "discountType": "PERCENT",
                  "details": {
                    "discountType": {
                      "name": "BOGO",
                      "outerScope": true,
                      "requiredItemsCount": 2,
                      "requiredItems": {
                        "catalog": "221",
                        "catalogItemType": "FILTERED",
                        "catalogIndexItems": [],
                        "catalogFilterIds": [
                          "f978b20f-7156-40ed-99c2-3af62b76af12"
                        ]
                      },
                      "discountedItemsCount": 1
                    },
                    "cashbackSettings": {
                      "exchangeRate": 0.01,
                      "limits": {
                        "minPoints": 10,
                        "maxPoints": 1000,
                        "maxTransactionAmount": 20,
                        "maxTransactionPercentage": 50
                      }
                    }
                  },
                  "discountValue": 0,
                  "discountMode": "STATIC",
                  "discountModeDetails": {
                    "steps": [
                      {
                        "discountValue": 0,
                        "usageThreshold": 0
                      }
                    ],
                    "discountUsageTrigger": "TRANSACTION"
                  },
                  "preDiscountValue": 0,
                  "requireRedeemedPoints": 0,
                  "headerName": "string",
                  "headerDescription": "string",
                  "name": "string",
                  "headline": "string",
                  "description": "string",
                  "images": [
                    {
                      "url": "https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png",
                      "type": "image"
                    }
                  ],
                  "tags": [
                    {
                      "hash": "6f54671d-157f-4c4e-a577-11fac3111293"
                    }
                  ],
                  "metric": "string",
                  "startAt": "2019-08-24T14:15:22Z",
                  "expireAt": "2019-08-24T14:15:22Z",
                  "displayFrom": "string",
                  "displayTo": "string",
                  "lastingTime": 0,
                  "params": {},
                  "itemScope": "LINE_ITEM",
                  "minBasketValue": null,
                  "maxBasketValue": null,
                  "catalog": "string",
                  "catalogItemType": "FILTERED",
                  "catalogIndexItems": [
                    "string"
                  ],
                  "catalogFilterIds": [
                    "string"
                  ],
                  "excludeCatalog": "string",
                  "excludeCatalogItemType": "SELECTED",
                  "excludeCatalogIndexItems": [
                    "string"
                  ],
                  "excludeCatalogFilterIds": [
                    "string"
                  ],
                  "storeCatalog": "string",
                  "storeItemType": "ALL",
                  "storeIds": [
                    "string"
                  ],
                  "targetType": "ALL",
                  "targetSegment": [
                    "string"
                  ],
                  "price": 0,
                  "priority": 250,
                  "voucherPool": {
                    "enabled": false,
                    "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
                    "transferable": false
                  }
                }
              ],
              "extra": {
                "importHash": "string"
              }
            });

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

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

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

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

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

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

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

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

            req.write(JSON.stringify({
              data: [
                {
                  uuid: 'string',
                  code: 'string',
                  visibilityStatus: 'DRAFT',
                  type: 'MEMBERS_ONLY',
                  redeemLimitPerClient: 0,
                  redeemQuantityPerActivation: 8388607,
                  redeemLimitGlobal: 0,
                  redeemType: 'FULL',
                  autoRedeem: true,
                  activationLimitGlobalType: 'RELATIVE',
                  activationLimitGlobalLimit: 1,
                  activationLimitGlobalRelativeMinutes: null,
                  discountType: 'PERCENT',
                  details: {
                    discountType: {
                      name: 'BOGO',
                      outerScope: true,
                      requiredItemsCount: 2,
                      requiredItems: {
                        catalog: '221',
                        catalogItemType: 'FILTERED',
                        catalogIndexItems: [],
                        catalogFilterIds: ['f978b20f-7156-40ed-99c2-3af62b76af12']
                      },
                      discountedItemsCount: 1
                    },
                    cashbackSettings: {
                      exchangeRate: 0.01,
                      limits: {
                        minPoints: 10,
                        maxPoints: 1000,
                        maxTransactionAmount: 20,
                        maxTransactionPercentage: 50
                      }
                    }
                  },
                  discountValue: 0,
                  discountMode: 'STATIC',
                  discountModeDetails: {
                    steps: [{discountValue: 0, usageThreshold: 0}],
                    discountUsageTrigger: 'TRANSACTION'
                  },
                  preDiscountValue: 0,
                  requireRedeemedPoints: 0,
                  headerName: 'string',
                  headerDescription: 'string',
                  name: 'string',
                  headline: 'string',
                  description: 'string',
                  images: [
                    {
                      url: 'https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png',
                      type: 'image'
                    }
                  ],
                  tags: [{hash: '6f54671d-157f-4c4e-a577-11fac3111293'}],
                  metric: 'string',
                  startAt: '2019-08-24T14:15:22Z',
                  expireAt: '2019-08-24T14:15:22Z',
                  displayFrom: 'string',
                  displayTo: 'string',
                  lastingTime: 0,
                  params: {},
                  itemScope: 'LINE_ITEM',
                  minBasketValue: null,
                  maxBasketValue: null,
                  catalog: 'string',
                  catalogItemType: 'FILTERED',
                  catalogIndexItems: ['string'],
                  catalogFilterIds: ['string'],
                  excludeCatalog: 'string',
                  excludeCatalogItemType: 'SELECTED',
                  excludeCatalogIndexItems: ['string'],
                  excludeCatalogFilterIds: ['string'],
                  storeCatalog: 'string',
                  storeItemType: 'ALL',
                  storeIds: ['string'],
                  targetType: 'ALL',
                  targetSegment: ['string'],
                  price: 0,
                  priority: 250,
                  voucherPool: {
                    enabled: false,
                    uuid: '095be615-a8ad-4c33-8e9c-c7612fbf6c9f',
                    transferable: false
                  }
                }
              ],
              extra: {importHash: 'string'}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"data":[{"uuid":"string","code":"string","visibilityStatus":"DRAFT","type":"MEMBERS_ONLY","redeemLimitPerClient":0,"redeemQuantityPerActivation":8388607,"redeemLimitGlobal":0,"redeemType":"FULL","autoRedeem":true,"activationLimitGlobalType":"RELATIVE","activationLimitGlobalLimit":1,"activationLimitGlobalRelativeMinutes":null,"discountType":"PERCENT","details":{"discountType":{"name":"BOGO","outerScope":true,"requiredItemsCount":2,"requiredItems":{"catalog":"221","catalogItemType":"FILTERED","catalogIndexItems":[],"catalogFilterIds":["f978b20f-7156-40ed-99c2-3af62b76af12"]},"discountedItemsCount":1},"cashbackSettings":{"exchangeRate":0.01,"limits":{"minPoints":10,"maxPoints":1000,"maxTransactionAmount":20,"maxTransactionPercentage":50}}},"discountValue":0,"discountMode":"STATIC","discountModeDetails":{"steps":[{"discountValue":0,"usageThreshold":0}],"discountUsageTrigger":"TRANSACTION"},"preDiscountValue":0,"requireRedeemedPoints":0,"headerName":"string","headerDescription":"string","name":"string","headline":"string","description":"string","images":[{"url":"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png","type":"image"}],"tags":[{"hash":"6f54671d-157f-4c4e-a577-11fac3111293"}],"metric":"string","startAt":"2019-08-24T14:15:22Z","expireAt":"2019-08-24T14:15:22Z","displayFrom":"string","displayTo":"string","lastingTime":0,"params":{},"itemScope":"LINE_ITEM","minBasketValue":null,"maxBasketValue":null,"catalog":"string","catalogItemType":"FILTERED","catalogIndexItems":["string"],"catalogFilterIds":["string"],"excludeCatalog":"string","excludeCatalogItemType":"SELECTED","excludeCatalogIndexItems":["string"],"excludeCatalogFilterIds":["string"],"storeCatalog":"string","storeItemType":"ALL","storeIds":["string"],"targetType":"ALL","targetSegment":["string"],"price":0,"priority":250,"voucherPool":{"enabled":false,"uuid":"095be615-a8ad-4c33-8e9c-c7612fbf6c9f","transferable":false}}],"extra":{"importHash":"string"}}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/promotions/v2/promotion/batch")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"data\":[{\"uuid\":\"string\",\"code\":\"string\",\"visibilityStatus\":\"DRAFT\",\"type\":\"MEMBERS_ONLY\",\"redeemLimitPerClient\":0,\"redeemQuantityPerActivation\":8388607,\"redeemLimitGlobal\":0,\"redeemType\":\"FULL\",\"autoRedeem\":true,\"activationLimitGlobalType\":\"RELATIVE\",\"activationLimitGlobalLimit\":1,\"activationLimitGlobalRelativeMinutes\":null,\"discountType\":\"PERCENT\",\"details\":{\"discountType\":{\"name\":\"BOGO\",\"outerScope\":true,\"requiredItemsCount\":2,\"requiredItems\":{\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"]},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.01,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}},\"discountValue\":0,\"discountMode\":\"STATIC\",\"discountModeDetails\":{\"steps\":[{\"discountValue\":0,\"usageThreshold\":0}],\"discountUsageTrigger\":\"TRANSACTION\"},\"preDiscountValue\":0,\"requireRedeemedPoints\":0,\"headerName\":\"string\",\"headerDescription\":\"string\",\"name\":\"string\",\"headline\":\"string\",\"description\":\"string\",\"images\":[{\"url\":\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\",\"type\":\"image\"}],\"tags\":[{\"hash\":\"6f54671d-157f-4c4e-a577-11fac3111293\"}],\"metric\":\"string\",\"startAt\":\"2019-08-24T14:15:22Z\",\"expireAt\":\"2019-08-24T14:15:22Z\",\"displayFrom\":\"string\",\"displayTo\":\"string\",\"lastingTime\":0,\"params\":{},\"itemScope\":\"LINE_ITEM\",\"minBasketValue\":null,\"maxBasketValue\":null,\"catalog\":\"string\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[\"string\"],\"catalogFilterIds\":[\"string\"],\"excludeCatalog\":\"string\",\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"string\"],\"excludeCatalogFilterIds\":[\"string\"],\"storeCatalog\":\"string\",\"storeItemType\":\"ALL\",\"storeIds\":[\"string\"],\"targetType\":\"ALL\",\"targetSegment\":[\"string\"],\"price\":0,\"priority\":250,\"voucherPool\":{\"enabled\":false,\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"transferable\":false}}],\"extra\":{\"importHash\":\"string\"}}")
              .asString();
    delete:
      tags:
        - Promotions
      summary: Batch delete promotions
      description: |
        Submit a batch of promotion codes for asynchronous deletion. Items are validated individually and queued for processing . Returns 202 if all items are valid, or 207 if some fail validation.  
        This method doesn't check if a promotion with the provide code exists.

        ---

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

        **API key permission required:** `PROMOTIONS_IMPORT_PROMOTIONS_DELETE`

        **User role permission required:** `campaigns_promotions: delete`
      operationId: BatchDeletePromotions
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-PromotionDeleteBatchRequest"
        required: true
      responses:
        "202":
          description: All items accepted for processing
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-PromotionImportBatchDeleteAcceptedResponse"
        "207":
          $ref: "#/components/responses/promotions-PromotionImportBatchPartialError"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/BatchDeletePromotions
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/v4/promotions/v2/promotion/batch \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"data":[{"code":"string"}],"extra":{"importHash":"string"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"data\":[{\"code\":\"string\"}],\"extra\":{\"importHash\":\"string\"}}"

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

            conn.request("DELETE", "/v4/promotions/v2/promotion/batch", payload, headers)

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

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

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

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

            xhr.open("DELETE", "https://api.synerise.com/v4/promotions/v2/promotion/batch");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/v2/promotion/batch",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({data: [{code: 'string'}], extra: {importHash: 'string'}}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/v2/promotion/batch');
            $request->setMethod(HTTP_METH_DELETE);

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

            $request->setBody('{"data":[{"code":"string"}],"extra":{"importHash":"string"}}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/v4/promotions/v2/promotion/batch")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"data\":[{\"code\":\"string\"}],\"extra\":{\"importHash\":\"string\"}}")
              .asString();
  /v4/promotions/v2/sale/process-sale/{identifierType}/{identifierValue}:
    post:
      tags:
        - Promotions
      summary: Process basket
      description: |
        Assign promotions to a basket and recalculate item values after discount.

        This method DOES NOT redeem any promotions or create a transaction.


        ---

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

        **API key permission required:** `PROMOTIONS_SALE_PROMOTIONS_READ`

        **User role permission required:** `campaigns_promotions: read`
      operationId: processSale_POST
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-processSaleReq"
      responses:
        "200":
          description: Basket processed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-processSaleRes"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/processSale_POST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/v2/sale/process-sale/email/%7BidentifierValue%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"operationId":0,"clientDateTime":"2019-08-24T14:15:22Z","terminal":{"storeId":"string","posId":0},"transactionMetric":{"posTransactionId":0,"beginDateTime":null,"globalTransactionId":"string"},"finalValue":"string","transactionItems":[{"seqNo":0,"articleRef":"string","quantity":"3.231","evidPrice":"34.23","finalPrice":"30.23","finalValue":"123.23"}],"transactionAdditionalItems":[{"seqNo":0,"type":"COUPON","code":"string"}],"paymentsReport":{"paymentItems":[{"seqNo":0,"type":0,"name":"string","amount":"string","hashCode":"string"}]},"promotionsToActivate":[{"key":"code","value":"7893467834GG","pointsToUse":100}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"operationId\":0,\"clientDateTime\":\"2019-08-24T14:15:22Z\",\"terminal\":{\"storeId\":\"string\",\"posId\":0},\"transactionMetric\":{\"posTransactionId\":0,\"beginDateTime\":null,\"globalTransactionId\":\"string\"},\"finalValue\":\"string\",\"transactionItems\":[{\"seqNo\":0,\"articleRef\":\"string\",\"quantity\":\"3.231\",\"evidPrice\":\"34.23\",\"finalPrice\":\"30.23\",\"finalValue\":\"123.23\"}],\"transactionAdditionalItems\":[{\"seqNo\":0,\"type\":\"COUPON\",\"code\":\"string\"}],\"paymentsReport\":{\"paymentItems\":[{\"seqNo\":0,\"type\":0,\"name\":\"string\",\"amount\":\"string\",\"hashCode\":\"string\"}]},\"promotionsToActivate\":[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]}"

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

            conn.request("POST", "/v4/promotions/v2/sale/process-sale/email/%7BidentifierValue%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "operationId": 0,
              "clientDateTime": "2019-08-24T14:15:22Z",
              "terminal": {
                "storeId": "string",
                "posId": 0
              },
              "transactionMetric": {
                "posTransactionId": 0,
                "beginDateTime": null,
                "globalTransactionId": "string"
              },
              "finalValue": "string",
              "transactionItems": [
                {
                  "seqNo": 0,
                  "articleRef": "string",
                  "quantity": "3.231",
                  "evidPrice": "34.23",
                  "finalPrice": "30.23",
                  "finalValue": "123.23"
                }
              ],
              "transactionAdditionalItems": [
                {
                  "seqNo": 0,
                  "type": "COUPON",
                  "code": "string"
                }
              ],
              "paymentsReport": {
                "paymentItems": [
                  {
                    "seqNo": 0,
                    "type": 0,
                    "name": "string",
                    "amount": "string",
                    "hashCode": "string"
                  }
                ]
              },
              "promotionsToActivate": [
                {
                  "key": "code",
                  "value": "7893467834GG",
                  "pointsToUse": 100
                }
              ]
            });

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

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

            xhr.open("POST", "https://api.synerise.com/v4/promotions/v2/sale/process-sale/email/%7BidentifierValue%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/v2/sale/process-sale/email/%7BidentifierValue%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({
              operationId: 0,
              clientDateTime: '2019-08-24T14:15:22Z',
              terminal: {storeId: 'string', posId: 0},
              transactionMetric: {posTransactionId: 0, beginDateTime: null, globalTransactionId: 'string'},
              finalValue: 'string',
              transactionItems: [
                {
                  seqNo: 0,
                  articleRef: 'string',
                  quantity: '3.231',
                  evidPrice: '34.23',
                  finalPrice: '30.23',
                  finalValue: '123.23'
                }
              ],
              transactionAdditionalItems: [{seqNo: 0, type: 'COUPON', code: 'string'}],
              paymentsReport: {
                paymentItems: [{seqNo: 0, type: 0, name: 'string', amount: 'string', hashCode: 'string'}]
              },
              promotionsToActivate: [{key: 'code', value: '7893467834GG', pointsToUse: 100}]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/v2/sale/process-sale/email/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"operationId":0,"clientDateTime":"2019-08-24T14:15:22Z","terminal":{"storeId":"string","posId":0},"transactionMetric":{"posTransactionId":0,"beginDateTime":null,"globalTransactionId":"string"},"finalValue":"string","transactionItems":[{"seqNo":0,"articleRef":"string","quantity":"3.231","evidPrice":"34.23","finalPrice":"30.23","finalValue":"123.23"}],"transactionAdditionalItems":[{"seqNo":0,"type":"COUPON","code":"string"}],"paymentsReport":{"paymentItems":[{"seqNo":0,"type":0,"name":"string","amount":"string","hashCode":"string"}]},"promotionsToActivate":[{"key":"code","value":"7893467834GG","pointsToUse":100}]}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/promotions/v2/sale/process-sale/email/%7BidentifierValue%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"operationId\":0,\"clientDateTime\":\"2019-08-24T14:15:22Z\",\"terminal\":{\"storeId\":\"string\",\"posId\":0},\"transactionMetric\":{\"posTransactionId\":0,\"beginDateTime\":null,\"globalTransactionId\":\"string\"},\"finalValue\":\"string\",\"transactionItems\":[{\"seqNo\":0,\"articleRef\":\"string\",\"quantity\":\"3.231\",\"evidPrice\":\"34.23\",\"finalPrice\":\"30.23\",\"finalValue\":\"123.23\"}],\"transactionAdditionalItems\":[{\"seqNo\":0,\"type\":\"COUPON\",\"code\":\"string\"}],\"paymentsReport\":{\"paymentItems\":[{\"seqNo\":0,\"type\":0,\"name\":\"string\",\"amount\":\"string\",\"hashCode\":\"string\"}]},\"promotionsToActivate\":[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]}")
              .asString();
  /v4/promotions/sale/process-checkout/{identifierType}/{identifierValue}:
    post:
      tags:
        - Promotions
      summary: Process checkout on POS
      description: |
        Assign checkout handbill coupons for a profile, based on items in the basket and historical transactions.

        This method DOES NOT redeem any promotions or create a transaction.


        ---

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

        **API key permission required:** `PROMOTIONS_SALE_PROMOTIONS_READ`

        **User role permission required:** `campaigns_promotions: read`
      operationId: processCheckout_POST
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-processCheckoutReq"
      responses:
        "200":
          description: POS checkout processed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-processCheckoutRes"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/processCheckout_POST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/sale/process-checkout/email/%7BidentifierValue%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"operationId":0,"clientDateTime":"2019-08-24T14:15:22Z","terminal":{"storeId":"string","posId":0},"transactionMetric":{"posTransactionId":0,"beginDateTime":null,"globalTransactionId":"string"},"finalValue":"string","transactionItems":[{"seqNo":0,"articleRef":"string","quantity":"3.231","evidPrice":"34.23","finalPrice":"30.23","finalValue":"123.23"}],"transactionAdditionalItems":[{"seqNo":0,"type":"COUPON","code":"string"}],"paymentsReport":{"paymentItems":[{"seqNo":0,"type":0,"name":"string","amount":"string","hashCode":"string"}]}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"operationId\":0,\"clientDateTime\":\"2019-08-24T14:15:22Z\",\"terminal\":{\"storeId\":\"string\",\"posId\":0},\"transactionMetric\":{\"posTransactionId\":0,\"beginDateTime\":null,\"globalTransactionId\":\"string\"},\"finalValue\":\"string\",\"transactionItems\":[{\"seqNo\":0,\"articleRef\":\"string\",\"quantity\":\"3.231\",\"evidPrice\":\"34.23\",\"finalPrice\":\"30.23\",\"finalValue\":\"123.23\"}],\"transactionAdditionalItems\":[{\"seqNo\":0,\"type\":\"COUPON\",\"code\":\"string\"}],\"paymentsReport\":{\"paymentItems\":[{\"seqNo\":0,\"type\":0,\"name\":\"string\",\"amount\":\"string\",\"hashCode\":\"string\"}]}}"

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

            conn.request("POST", "/v4/promotions/sale/process-checkout/email/%7BidentifierValue%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "operationId": 0,
              "clientDateTime": "2019-08-24T14:15:22Z",
              "terminal": {
                "storeId": "string",
                "posId": 0
              },
              "transactionMetric": {
                "posTransactionId": 0,
                "beginDateTime": null,
                "globalTransactionId": "string"
              },
              "finalValue": "string",
              "transactionItems": [
                {
                  "seqNo": 0,
                  "articleRef": "string",
                  "quantity": "3.231",
                  "evidPrice": "34.23",
                  "finalPrice": "30.23",
                  "finalValue": "123.23"
                }
              ],
              "transactionAdditionalItems": [
                {
                  "seqNo": 0,
                  "type": "COUPON",
                  "code": "string"
                }
              ],
              "paymentsReport": {
                "paymentItems": [
                  {
                    "seqNo": 0,
                    "type": 0,
                    "name": "string",
                    "amount": "string",
                    "hashCode": "string"
                  }
                ]
              }
            });

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

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

            xhr.open("POST", "https://api.synerise.com/v4/promotions/sale/process-checkout/email/%7BidentifierValue%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/sale/process-checkout/email/%7BidentifierValue%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({
              operationId: 0,
              clientDateTime: '2019-08-24T14:15:22Z',
              terminal: {storeId: 'string', posId: 0},
              transactionMetric: {posTransactionId: 0, beginDateTime: null, globalTransactionId: 'string'},
              finalValue: 'string',
              transactionItems: [
                {
                  seqNo: 0,
                  articleRef: 'string',
                  quantity: '3.231',
                  evidPrice: '34.23',
                  finalPrice: '30.23',
                  finalValue: '123.23'
                }
              ],
              transactionAdditionalItems: [{seqNo: 0, type: 'COUPON', code: 'string'}],
              paymentsReport: {
                paymentItems: [{seqNo: 0, type: 0, name: 'string', amount: 'string', hashCode: 'string'}]
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/sale/process-checkout/email/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"operationId":0,"clientDateTime":"2019-08-24T14:15:22Z","terminal":{"storeId":"string","posId":0},"transactionMetric":{"posTransactionId":0,"beginDateTime":null,"globalTransactionId":"string"},"finalValue":"string","transactionItems":[{"seqNo":0,"articleRef":"string","quantity":"3.231","evidPrice":"34.23","finalPrice":"30.23","finalValue":"123.23"}],"transactionAdditionalItems":[{"seqNo":0,"type":"COUPON","code":"string"}],"paymentsReport":{"paymentItems":[{"seqNo":0,"type":0,"name":"string","amount":"string","hashCode":"string"}]}}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/promotions/sale/process-checkout/email/%7BidentifierValue%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"operationId\":0,\"clientDateTime\":\"2019-08-24T14:15:22Z\",\"terminal\":{\"storeId\":\"string\",\"posId\":0},\"transactionMetric\":{\"posTransactionId\":0,\"beginDateTime\":null,\"globalTransactionId\":\"string\"},\"finalValue\":\"string\",\"transactionItems\":[{\"seqNo\":0,\"articleRef\":\"string\",\"quantity\":\"3.231\",\"evidPrice\":\"34.23\",\"finalPrice\":\"30.23\",\"finalValue\":\"123.23\"}],\"transactionAdditionalItems\":[{\"seqNo\":0,\"type\":\"COUPON\",\"code\":\"string\"}],\"paymentsReport\":{\"paymentItems\":[{\"seqNo\":0,\"type\":0,\"name\":\"string\",\"amount\":\"string\",\"hashCode\":\"string\"}]}}")
              .asString();
  /v4/promotions/v2/sale/process-anonymous-sale:
    post:
      tags:
        - Promotions
      summary: Process anonymous Profile's basket
      description: |
        Assign promotions to a basket and recalculate item values after discount.

        ---

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

        **API key permission required:** `PROMOTIONS_SALE_PROMOTIONS_READ`

        **User role permission required:** `campaigns_promotions: read`
      operationId: processAnonymousSale_POST
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-processSaleReq"
      responses:
        "200":
          description: Basket processed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-processSaleRes"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "428":
          $ref: "#/components/responses/promotions-ProcessSale428"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/processAnonymousSale_POST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/v2/sale/process-anonymous-sale \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"operationId":0,"clientDateTime":"2019-08-24T14:15:22Z","terminal":{"storeId":"string","posId":0},"transactionMetric":{"posTransactionId":0,"beginDateTime":null,"globalTransactionId":"string"},"finalValue":"string","transactionItems":[{"seqNo":0,"articleRef":"string","quantity":"3.231","evidPrice":"34.23","finalPrice":"30.23","finalValue":"123.23"}],"transactionAdditionalItems":[{"seqNo":0,"type":"COUPON","code":"string"}],"paymentsReport":{"paymentItems":[{"seqNo":0,"type":0,"name":"string","amount":"string","hashCode":"string"}]},"promotionsToActivate":[{"key":"code","value":"7893467834GG","pointsToUse":100}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"operationId\":0,\"clientDateTime\":\"2019-08-24T14:15:22Z\",\"terminal\":{\"storeId\":\"string\",\"posId\":0},\"transactionMetric\":{\"posTransactionId\":0,\"beginDateTime\":null,\"globalTransactionId\":\"string\"},\"finalValue\":\"string\",\"transactionItems\":[{\"seqNo\":0,\"articleRef\":\"string\",\"quantity\":\"3.231\",\"evidPrice\":\"34.23\",\"finalPrice\":\"30.23\",\"finalValue\":\"123.23\"}],\"transactionAdditionalItems\":[{\"seqNo\":0,\"type\":\"COUPON\",\"code\":\"string\"}],\"paymentsReport\":{\"paymentItems\":[{\"seqNo\":0,\"type\":0,\"name\":\"string\",\"amount\":\"string\",\"hashCode\":\"string\"}]},\"promotionsToActivate\":[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]}"

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

            conn.request("POST", "/v4/promotions/v2/sale/process-anonymous-sale", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "operationId": 0,
              "clientDateTime": "2019-08-24T14:15:22Z",
              "terminal": {
                "storeId": "string",
                "posId": 0
              },
              "transactionMetric": {
                "posTransactionId": 0,
                "beginDateTime": null,
                "globalTransactionId": "string"
              },
              "finalValue": "string",
              "transactionItems": [
                {
                  "seqNo": 0,
                  "articleRef": "string",
                  "quantity": "3.231",
                  "evidPrice": "34.23",
                  "finalPrice": "30.23",
                  "finalValue": "123.23"
                }
              ],
              "transactionAdditionalItems": [
                {
                  "seqNo": 0,
                  "type": "COUPON",
                  "code": "string"
                }
              ],
              "paymentsReport": {
                "paymentItems": [
                  {
                    "seqNo": 0,
                    "type": 0,
                    "name": "string",
                    "amount": "string",
                    "hashCode": "string"
                  }
                ]
              },
              "promotionsToActivate": [
                {
                  "key": "code",
                  "value": "7893467834GG",
                  "pointsToUse": 100
                }
              ]
            });

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

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

            xhr.open("POST", "https://api.synerise.com/v4/promotions/v2/sale/process-anonymous-sale");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

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

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

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

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

            req.write(JSON.stringify({
              operationId: 0,
              clientDateTime: '2019-08-24T14:15:22Z',
              terminal: {storeId: 'string', posId: 0},
              transactionMetric: {posTransactionId: 0, beginDateTime: null, globalTransactionId: 'string'},
              finalValue: 'string',
              transactionItems: [
                {
                  seqNo: 0,
                  articleRef: 'string',
                  quantity: '3.231',
                  evidPrice: '34.23',
                  finalPrice: '30.23',
                  finalValue: '123.23'
                }
              ],
              transactionAdditionalItems: [{seqNo: 0, type: 'COUPON', code: 'string'}],
              paymentsReport: {
                paymentItems: [{seqNo: 0, type: 0, name: 'string', amount: 'string', hashCode: 'string'}]
              },
              promotionsToActivate: [{key: 'code', value: '7893467834GG', pointsToUse: 100}]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/v2/sale/process-anonymous-sale');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"operationId":0,"clientDateTime":"2019-08-24T14:15:22Z","terminal":{"storeId":"string","posId":0},"transactionMetric":{"posTransactionId":0,"beginDateTime":null,"globalTransactionId":"string"},"finalValue":"string","transactionItems":[{"seqNo":0,"articleRef":"string","quantity":"3.231","evidPrice":"34.23","finalPrice":"30.23","finalValue":"123.23"}],"transactionAdditionalItems":[{"seqNo":0,"type":"COUPON","code":"string"}],"paymentsReport":{"paymentItems":[{"seqNo":0,"type":0,"name":"string","amount":"string","hashCode":"string"}]},"promotionsToActivate":[{"key":"code","value":"7893467834GG","pointsToUse":100}]}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/promotions/v2/sale/process-anonymous-sale")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"operationId\":0,\"clientDateTime\":\"2019-08-24T14:15:22Z\",\"terminal\":{\"storeId\":\"string\",\"posId\":0},\"transactionMetric\":{\"posTransactionId\":0,\"beginDateTime\":null,\"globalTransactionId\":\"string\"},\"finalValue\":\"string\",\"transactionItems\":[{\"seqNo\":0,\"articleRef\":\"string\",\"quantity\":\"3.231\",\"evidPrice\":\"34.23\",\"finalPrice\":\"30.23\",\"finalValue\":\"123.23\"}],\"transactionAdditionalItems\":[{\"seqNo\":0,\"type\":\"COUPON\",\"code\":\"string\"}],\"paymentsReport\":{\"paymentItems\":[{\"seqNo\":0,\"type\":0,\"name\":\"string\",\"amount\":\"string\",\"hashCode\":\"string\"}]},\"promotionsToActivate\":[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]}")
              .asString();
  /v4/promotions/sale/process-anonymous-checkout:
    post:
      tags:
        - Promotions
      summary: Process anonymous Profile's checkout on POS
      description: |
        Assign checkout handbill coupons for anonymous profile, based on items in basket and historical transactions.

        ---

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

        **API key permission required:** `PROMOTIONS_SALE_PROMOTIONS_READ`

        **User role permission required:** `campaigns_promotions: read`
      operationId: processAnonymousCheckout_POST
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-processCheckoutReq"
      responses:
        "200":
          description: POS checkout processed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-processCheckoutRes"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions/operation/processAnonymousCheckout_POST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/sale/process-anonymous-checkout \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"operationId":0,"clientDateTime":"2019-08-24T14:15:22Z","terminal":{"storeId":"string","posId":0},"transactionMetric":{"posTransactionId":0,"beginDateTime":null,"globalTransactionId":"string"},"finalValue":"string","transactionItems":[{"seqNo":0,"articleRef":"string","quantity":"3.231","evidPrice":"34.23","finalPrice":"30.23","finalValue":"123.23"}],"transactionAdditionalItems":[{"seqNo":0,"type":"COUPON","code":"string"}],"paymentsReport":{"paymentItems":[{"seqNo":0,"type":0,"name":"string","amount":"string","hashCode":"string"}]}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"operationId\":0,\"clientDateTime\":\"2019-08-24T14:15:22Z\",\"terminal\":{\"storeId\":\"string\",\"posId\":0},\"transactionMetric\":{\"posTransactionId\":0,\"beginDateTime\":null,\"globalTransactionId\":\"string\"},\"finalValue\":\"string\",\"transactionItems\":[{\"seqNo\":0,\"articleRef\":\"string\",\"quantity\":\"3.231\",\"evidPrice\":\"34.23\",\"finalPrice\":\"30.23\",\"finalValue\":\"123.23\"}],\"transactionAdditionalItems\":[{\"seqNo\":0,\"type\":\"COUPON\",\"code\":\"string\"}],\"paymentsReport\":{\"paymentItems\":[{\"seqNo\":0,\"type\":0,\"name\":\"string\",\"amount\":\"string\",\"hashCode\":\"string\"}]}}"

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

            conn.request("POST", "/v4/promotions/sale/process-anonymous-checkout", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "operationId": 0,
              "clientDateTime": "2019-08-24T14:15:22Z",
              "terminal": {
                "storeId": "string",
                "posId": 0
              },
              "transactionMetric": {
                "posTransactionId": 0,
                "beginDateTime": null,
                "globalTransactionId": "string"
              },
              "finalValue": "string",
              "transactionItems": [
                {
                  "seqNo": 0,
                  "articleRef": "string",
                  "quantity": "3.231",
                  "evidPrice": "34.23",
                  "finalPrice": "30.23",
                  "finalValue": "123.23"
                }
              ],
              "transactionAdditionalItems": [
                {
                  "seqNo": 0,
                  "type": "COUPON",
                  "code": "string"
                }
              ],
              "paymentsReport": {
                "paymentItems": [
                  {
                    "seqNo": 0,
                    "type": 0,
                    "name": "string",
                    "amount": "string",
                    "hashCode": "string"
                  }
                ]
              }
            });

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

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

            xhr.open("POST", "https://api.synerise.com/v4/promotions/sale/process-anonymous-checkout");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/sale/process-anonymous-checkout",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({
              operationId: 0,
              clientDateTime: '2019-08-24T14:15:22Z',
              terminal: {storeId: 'string', posId: 0},
              transactionMetric: {posTransactionId: 0, beginDateTime: null, globalTransactionId: 'string'},
              finalValue: 'string',
              transactionItems: [
                {
                  seqNo: 0,
                  articleRef: 'string',
                  quantity: '3.231',
                  evidPrice: '34.23',
                  finalPrice: '30.23',
                  finalValue: '123.23'
                }
              ],
              transactionAdditionalItems: [{seqNo: 0, type: 'COUPON', code: 'string'}],
              paymentsReport: {
                paymentItems: [{seqNo: 0, type: 0, name: 'string', amount: 'string', hashCode: 'string'}]
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/sale/process-anonymous-checkout');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"operationId":0,"clientDateTime":"2019-08-24T14:15:22Z","terminal":{"storeId":"string","posId":0},"transactionMetric":{"posTransactionId":0,"beginDateTime":null,"globalTransactionId":"string"},"finalValue":"string","transactionItems":[{"seqNo":0,"articleRef":"string","quantity":"3.231","evidPrice":"34.23","finalPrice":"30.23","finalValue":"123.23"}],"transactionAdditionalItems":[{"seqNo":0,"type":"COUPON","code":"string"}],"paymentsReport":{"paymentItems":[{"seqNo":0,"type":0,"name":"string","amount":"string","hashCode":"string"}]}}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/promotions/sale/process-anonymous-checkout")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"operationId\":0,\"clientDateTime\":\"2019-08-24T14:15:22Z\",\"terminal\":{\"storeId\":\"string\",\"posId\":0},\"transactionMetric\":{\"posTransactionId\":0,\"beginDateTime\":null,\"globalTransactionId\":\"string\"},\"finalValue\":\"string\",\"transactionItems\":[{\"seqNo\":0,\"articleRef\":\"string\",\"quantity\":\"3.231\",\"evidPrice\":\"34.23\",\"finalPrice\":\"30.23\",\"finalValue\":\"123.23\"}],\"transactionAdditionalItems\":[{\"seqNo\":0,\"type\":\"COUPON\",\"code\":\"string\"}],\"paymentsReport\":{\"paymentItems\":[{\"seqNo\":0,\"type\":0,\"name\":\"string\",\"amount\":\"string\",\"hashCode\":\"string\"}]}}")
              .asString();
  /v4/promotions/handbill:
    get:
      tags:
        - Handbills
      summary: Get all handbill configurations
      description: |
        Retrieve a list of all handbill configurations available in the current Workspace.

        ---

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

        **API key permission required:** `PROMOTIONS_HANDBILL_READ`

        **User role permission required:** `campaigns_personalised_promotions: read`
      operationId: getAllHandbillConfigs_GET
      parameters:
        - $ref: "#/components/parameters/promotions-queryLimit"
        - $ref: "#/components/parameters/promotions-queryPage"
        - $ref: "#/components/parameters/promotions-queryHandbillSort"
        - $ref: "#/components/parameters/promotions-queryIncludeMeta"
      responses:
        "200":
          description: List of handbill configurations
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: List of handbill configurations with simplified information about variants
                    items:
                      $ref: "#/components/schemas/promotions-handbillConfigWithSimplifiedVariants"
                  meta:
                    $ref: "#/components/schemas/promotions-responseMeta"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Handbills/operation/getAllHandbillConfigs_GET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/promotions/handbill?limit=100&page=4&sort=createdAt%2Cdesc&includeMeta=false' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

            conn.request("GET", "/v4/promotions/handbill?limit=100&page=4&sort=createdAt%2Cdesc&includeMeta=false", headers=headers)

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/v4/promotions/handbill?limit=100&page=4&sort=createdAt%2Cdesc&includeMeta=false");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/handbill?limit=100&page=4&sort=createdAt%2Cdesc&includeMeta=false",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

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

            $request->setQueryData([
              'limit' => '100',
              'page' => '4',
              'sort' => 'createdAt,desc',
              'includeMeta' => 'false'
            ]);

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/promotions/handbill?limit=100&page=4&sort=createdAt%2Cdesc&includeMeta=false")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - Handbills
      summary: Create handbill configuration
      description: |
        Create a new handbill configuration for use in handbill-type promotions.

        ---

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

        **API key permission required:** `PROMOTIONS_HANDBILL_CREATE`

        **User role permission required:** `campaigns_personalised_promotions: create`
      operationId: createHandbillConfiguration_POST
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-handbillConfigCreateRequest"
      responses:
        "200":
          description: Configuration created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/promotions-handbillConfig"
                  message:
                    type: string
                    description: Status of the operation
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Handbills/operation/createHandbillConfiguration_POST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/handbill \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"channel":"MOBILE","status":"DRAFT","name":"string","description":"string","controlGroup":{"name":"string","percentage":0},"variants":[{"name":"string","uuid":"095be615-a8ad-4c33-8e9c-c7612fbf6c9f","percentage":0,"ai":{"controlVariant":true,"varietyFactor":0.5,"varietyGroupSize":1,"redistributionFrequencyFactor":0.5,"popularityBoosting":1},"limits":{"limitPerDay":6,"limitExceptions":[{"dayOfWeek":5,"limitPerDay":8}],"limitsPerBasket":[{"basketSize":12,"basketValue":30.5,"condition":"AND"}],"limitExclusion":[{"catalogId":22424,"products":["UGG-BB-PUR-06"],"filters":["7c1fbdf6-dd27-11ea-87d0-0242ac130003"]}]},"activity":{"lastingType":"RELATIVE","lasting":{"unit":"HOURS","value":24},"cronWeekdays":[0,1,6],"cronTime":"12:34","lastingAt":"2019-08-24T14:15:22Z","timeExclusions":{"uuid":"6a177f3e-748f-44d4-ac30-a457a5199685"}},"printout":{"template":"|#{promotion.name};#{promotion.discountType == '\''EXACT_PRICE'\'' ? '\''Price'\'':'\''Discount'\''} #{promotion.discountValue} #{promotion.discountType == '\''PERCENT'\''? '\''%'\'' : '\''USD'\''};Valid for;#{moment.utc(coupon.createdAt).tz('\''Europe/Warsaw'\'').format('\''DD.MM.YYYY HH:mm'\'')} - #{moment.utc(coupon.lastingAt).tz('\''Europe/Warsaw'\'').format('\''DD.MM.YYYY HH:mm'\'')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!","maxLineLength":18,"newLineDelimiter":";"},"filterIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"types":["MEMBERS_ONLY","HANDBILL"],"excludeByAvailableProducts":true,"slotFilters":{"order":"GIVEN","slots":[{"filterId":"aff0ee0f-f371-4b82-82c6-dc3b96f05c91","limit":5}]}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"channel\":\"MOBILE\",\"status\":\"DRAFT\",\"name\":\"string\",\"description\":\"string\",\"controlGroup\":{\"name\":\"string\",\"percentage\":0},\"variants\":[{\"name\":\"string\",\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"percentage\":0,\"ai\":{\"controlVariant\":true,\"varietyFactor\":0.5,\"varietyGroupSize\":1,\"redistributionFrequencyFactor\":0.5,\"popularityBoosting\":1},\"limits\":{\"limitPerDay\":6,\"limitExceptions\":[{\"dayOfWeek\":5,\"limitPerDay\":8}],\"limitsPerBasket\":[{\"basketSize\":12,\"basketValue\":30.5,\"condition\":\"AND\"}],\"limitExclusion\":[{\"catalogId\":22424,\"products\":[\"UGG-BB-PUR-06\"],\"filters\":[\"7c1fbdf6-dd27-11ea-87d0-0242ac130003\"]}]},\"activity\":{\"lastingType\":\"RELATIVE\",\"lasting\":{\"unit\":\"HOURS\",\"value\":24},\"cronWeekdays\":[0,1,6],\"cronTime\":\"12:34\",\"lastingAt\":\"2019-08-24T14:15:22Z\",\"timeExclusions\":{\"uuid\":\"6a177f3e-748f-44d4-ac30-a457a5199685\"}},\"printout\":{\"template\":\"|#{promotion.name};#{promotion.discountType == 'EXACT_PRICE' ? 'Price':'Discount'} #{promotion.discountValue} #{promotion.discountType == 'PERCENT'? '%' : 'USD'};Valid for;#{moment.utc(coupon.createdAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')} - #{moment.utc(coupon.lastingAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!\",\"maxLineLength\":18,\"newLineDelimiter\":\";\"},\"filterIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"types\":[\"MEMBERS_ONLY\",\"HANDBILL\"],\"excludeByAvailableProducts\":true,\"slotFilters\":{\"order\":\"GIVEN\",\"slots\":[{\"filterId\":\"aff0ee0f-f371-4b82-82c6-dc3b96f05c91\",\"limit\":5}]}}]}"

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

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

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "channel": "MOBILE",
              "status": "DRAFT",
              "name": "string",
              "description": "string",
              "controlGroup": {
                "name": "string",
                "percentage": 0
              },
              "variants": [
                {
                  "name": "string",
                  "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
                  "percentage": 0,
                  "ai": {
                    "controlVariant": true,
                    "varietyFactor": 0.5,
                    "varietyGroupSize": 1,
                    "redistributionFrequencyFactor": 0.5,
                    "popularityBoosting": 1
                  },
                  "limits": {
                    "limitPerDay": 6,
                    "limitExceptions": [
                      {
                        "dayOfWeek": 5,
                        "limitPerDay": 8
                      }
                    ],
                    "limitsPerBasket": [
                      {
                        "basketSize": 12,
                        "basketValue": 30.5,
                        "condition": "AND"
                      }
                    ],
                    "limitExclusion": [
                      {
                        "catalogId": 22424,
                        "products": [
                          "UGG-BB-PUR-06"
                        ],
                        "filters": [
                          "7c1fbdf6-dd27-11ea-87d0-0242ac130003"
                        ]
                      }
                    ]
                  },
                  "activity": {
                    "lastingType": "RELATIVE",
                    "lasting": {
                      "unit": "HOURS",
                      "value": 24
                    },
                    "cronWeekdays": [
                      0,
                      1,
                      6
                    ],
                    "cronTime": "12:34",
                    "lastingAt": "2019-08-24T14:15:22Z",
                    "timeExclusions": {
                      "uuid": "6a177f3e-748f-44d4-ac30-a457a5199685"
                    }
                  },
                  "printout": {
                    "template": "|#{promotion.name};#{promotion.discountType == 'EXACT_PRICE' ? 'Price':'Discount'} #{promotion.discountValue} #{promotion.discountType == 'PERCENT'? '%' : 'USD'};Valid for;#{moment.utc(coupon.createdAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')} - #{moment.utc(coupon.lastingAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!",
                    "maxLineLength": 18,
                    "newLineDelimiter": ";"
                  },
                  "filterIds": [
                    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
                  ],
                  "types": [
                    "MEMBERS_ONLY",
                    "HANDBILL"
                  ],
                  "excludeByAvailableProducts": true,
                  "slotFilters": {
                    "order": "GIVEN",
                    "slots": [
                      {
                        "filterId": "aff0ee0f-f371-4b82-82c6-dc3b96f05c91",
                        "limit": 5
                      }
                    ]
                  }
                }
              ]
            });

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

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

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

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

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

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

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

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

            req.write(JSON.stringify({
              channel: 'MOBILE',
              status: 'DRAFT',
              name: 'string',
              description: 'string',
              controlGroup: {name: 'string', percentage: 0},
              variants: [
                {
                  name: 'string',
                  uuid: '095be615-a8ad-4c33-8e9c-c7612fbf6c9f',
                  percentage: 0,
                  ai: {
                    controlVariant: true,
                    varietyFactor: 0.5,
                    varietyGroupSize: 1,
                    redistributionFrequencyFactor: 0.5,
                    popularityBoosting: 1
                  },
                  limits: {
                    limitPerDay: 6,
                    limitExceptions: [{dayOfWeek: 5, limitPerDay: 8}],
                    limitsPerBasket: [{basketSize: 12, basketValue: 30.5, condition: 'AND'}],
                    limitExclusion: [
                      {
                        catalogId: 22424,
                        products: ['UGG-BB-PUR-06'],
                        filters: ['7c1fbdf6-dd27-11ea-87d0-0242ac130003']
                      }
                    ]
                  },
                  activity: {
                    lastingType: 'RELATIVE',
                    lasting: {unit: 'HOURS', value: 24},
                    cronWeekdays: [0, 1, 6],
                    cronTime: '12:34',
                    lastingAt: '2019-08-24T14:15:22Z',
                    timeExclusions: {uuid: '6a177f3e-748f-44d4-ac30-a457a5199685'}
                  },
                  printout: {
                    template: '|#{promotion.name};#{promotion.discountType == \'EXACT_PRICE\' ? \'Price\':\'Discount\'} #{promotion.discountValue} #{promotion.discountType == \'PERCENT\'? \'%\' : \'USD\'};Valid for;#{moment.utc(coupon.createdAt).tz(\'Europe/Warsaw\').format(\'DD.MM.YYYY HH:mm\')} - #{moment.utc(coupon.lastingAt).tz(\'Europe/Warsaw\').format(\'DD.MM.YYYY HH:mm\')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!',
                    maxLineLength: 18,
                    newLineDelimiter: ';'
                  },
                  filterIds: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],
                  types: ['MEMBERS_ONLY', 'HANDBILL'],
                  excludeByAvailableProducts: true,
                  slotFilters: {
                    order: 'GIVEN',
                    slots: [{filterId: 'aff0ee0f-f371-4b82-82c6-dc3b96f05c91', limit: 5}]
                  }
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"channel":"MOBILE","status":"DRAFT","name":"string","description":"string","controlGroup":{"name":"string","percentage":0},"variants":[{"name":"string","uuid":"095be615-a8ad-4c33-8e9c-c7612fbf6c9f","percentage":0,"ai":{"controlVariant":true,"varietyFactor":0.5,"varietyGroupSize":1,"redistributionFrequencyFactor":0.5,"popularityBoosting":1},"limits":{"limitPerDay":6,"limitExceptions":[{"dayOfWeek":5,"limitPerDay":8}],"limitsPerBasket":[{"basketSize":12,"basketValue":30.5,"condition":"AND"}],"limitExclusion":[{"catalogId":22424,"products":["UGG-BB-PUR-06"],"filters":["7c1fbdf6-dd27-11ea-87d0-0242ac130003"]}]},"activity":{"lastingType":"RELATIVE","lasting":{"unit":"HOURS","value":24},"cronWeekdays":[0,1,6],"cronTime":"12:34","lastingAt":"2019-08-24T14:15:22Z","timeExclusions":{"uuid":"6a177f3e-748f-44d4-ac30-a457a5199685"}},"printout":{"template":"|#{promotion.name};#{promotion.discountType == 'EXACT_PRICE' ? 'Price':'Discount'} #{promotion.discountValue} #{promotion.discountType == 'PERCENT'? '%' : 'USD'};Valid for;#{moment.utc(coupon.createdAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')} - #{moment.utc(coupon.lastingAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!","maxLineLength":18,"newLineDelimiter":";"},"filterIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"types":["MEMBERS_ONLY","HANDBILL"],"excludeByAvailableProducts":true,"slotFilters":{"order":"GIVEN","slots":[{"filterId":"aff0ee0f-f371-4b82-82c6-dc3b96f05c91","limit":5}]}}]}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/promotions/handbill")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"channel\":\"MOBILE\",\"status\":\"DRAFT\",\"name\":\"string\",\"description\":\"string\",\"controlGroup\":{\"name\":\"string\",\"percentage\":0},\"variants\":[{\"name\":\"string\",\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"percentage\":0,\"ai\":{\"controlVariant\":true,\"varietyFactor\":0.5,\"varietyGroupSize\":1,\"redistributionFrequencyFactor\":0.5,\"popularityBoosting\":1},\"limits\":{\"limitPerDay\":6,\"limitExceptions\":[{\"dayOfWeek\":5,\"limitPerDay\":8}],\"limitsPerBasket\":[{\"basketSize\":12,\"basketValue\":30.5,\"condition\":\"AND\"}],\"limitExclusion\":[{\"catalogId\":22424,\"products\":[\"UGG-BB-PUR-06\"],\"filters\":[\"7c1fbdf6-dd27-11ea-87d0-0242ac130003\"]}]},\"activity\":{\"lastingType\":\"RELATIVE\",\"lasting\":{\"unit\":\"HOURS\",\"value\":24},\"cronWeekdays\":[0,1,6],\"cronTime\":\"12:34\",\"lastingAt\":\"2019-08-24T14:15:22Z\",\"timeExclusions\":{\"uuid\":\"6a177f3e-748f-44d4-ac30-a457a5199685\"}},\"printout\":{\"template\":\"|#{promotion.name};#{promotion.discountType == 'EXACT_PRICE' ? 'Price':'Discount'} #{promotion.discountValue} #{promotion.discountType == 'PERCENT'? '%' : 'USD'};Valid for;#{moment.utc(coupon.createdAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')} - #{moment.utc(coupon.lastingAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!\",\"maxLineLength\":18,\"newLineDelimiter\":\";\"},\"filterIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"types\":[\"MEMBERS_ONLY\",\"HANDBILL\"],\"excludeByAvailableProducts\":true,\"slotFilters\":{\"order\":\"GIVEN\",\"slots\":[{\"filterId\":\"aff0ee0f-f371-4b82-82c6-dc3b96f05c91\",\"limit\":5}]}}]}")
              .asString();
  /v4/promotions/handbill/{handbillUuid}:
    get:
      tags:
        - Handbills
      summary: Get handbill configuration
      description: |
        Retrieve the details of a single handbill configuration.

        ---

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

        **API key permission required:** `PROMOTIONS_HANDBILL_READ`

        **User role permission required:** `campaigns_personalised_promotions: read`
      operationId: getHandbillConfig_GET
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/promotions-pathHandbillUuid"
      responses:
        "200":
          description: Handbill configuration
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/promotions-handbillConfig"
                  message:
                    type: string
                    description: Status of the operation
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Handbills/operation/getHandbillConfig_GET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/promotions/handbill/%7BhandbillUuid%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

            conn.request("GET", "/v4/promotions/handbill/%7BhandbillUuid%7D", headers=headers)

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/v4/promotions/handbill/%7BhandbillUuid%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/handbill/%7BhandbillUuid%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/handbill/%7BhandbillUuid%7D');
            $request->setMethod(HTTP_METH_GET);

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/promotions/handbill/%7BhandbillUuid%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    patch:
      tags:
        - Handbills
      summary: Update handbill configuration
      description: |
        Update an existing handbill configuration.

        ---

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

        **API key permission required:** `PROMOTIONS_HANDBILL_UPDATE`

        **User role permission required:** `campaigns_personalised_promotions: update`
      operationId: updateHandbill_PATCH
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/promotions-pathHandbillUuid"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-handbillConfigUpdateRequest"
      responses:
        "200":
          description: Configuration updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/promotions-handbillConfig"
                  message:
                    type: string
                    description: Status of the operation
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Handbills/operation/updateHandbill_PATCH
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PATCH \
              --url https://api.synerise.com/v4/promotions/handbill/%7BhandbillUuid%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"channel":"MOBILE","status":"DRAFT","name":"string","description":"string","controlGroup":{"name":"string","percentage":0},"variants":[{"name":"string","uuid":"095be615-a8ad-4c33-8e9c-c7612fbf6c9f","percentage":0,"ai":{"controlVariant":true,"varietyFactor":0.5,"varietyGroupSize":1,"redistributionFrequencyFactor":0.5,"popularityBoosting":1},"limits":{"limitPerDay":6,"limitExceptions":[{"dayOfWeek":5,"limitPerDay":8}],"limitsPerBasket":[{"basketSize":12,"basketValue":30.5,"condition":"AND"}],"limitExclusion":[{"catalogId":22424,"products":["UGG-BB-PUR-06"],"filters":["7c1fbdf6-dd27-11ea-87d0-0242ac130003"]}]},"activity":{"lastingType":"RELATIVE","lasting":{"unit":"HOURS","value":24},"cronWeekdays":[0,1,6],"cronTime":"12:34","lastingAt":"2019-08-24T14:15:22Z","timeExclusions":{"uuid":"6a177f3e-748f-44d4-ac30-a457a5199685"}},"printout":{"template":"|#{promotion.name};#{promotion.discountType == '\''EXACT_PRICE'\'' ? '\''Price'\'':'\''Discount'\''} #{promotion.discountValue} #{promotion.discountType == '\''PERCENT'\''? '\''%'\'' : '\''USD'\''};Valid for;#{moment.utc(coupon.createdAt).tz('\''Europe/Warsaw'\'').format('\''DD.MM.YYYY HH:mm'\'')} - #{moment.utc(coupon.lastingAt).tz('\''Europe/Warsaw'\'').format('\''DD.MM.YYYY HH:mm'\'')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!","maxLineLength":18,"newLineDelimiter":";"},"filterIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"types":["MEMBERS_ONLY","HANDBILL"],"excludeByAvailableProducts":true,"slotFilters":{"order":"GIVEN","slots":[{"filterId":"aff0ee0f-f371-4b82-82c6-dc3b96f05c91","limit":5}]}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"channel\":\"MOBILE\",\"status\":\"DRAFT\",\"name\":\"string\",\"description\":\"string\",\"controlGroup\":{\"name\":\"string\",\"percentage\":0},\"variants\":[{\"name\":\"string\",\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"percentage\":0,\"ai\":{\"controlVariant\":true,\"varietyFactor\":0.5,\"varietyGroupSize\":1,\"redistributionFrequencyFactor\":0.5,\"popularityBoosting\":1},\"limits\":{\"limitPerDay\":6,\"limitExceptions\":[{\"dayOfWeek\":5,\"limitPerDay\":8}],\"limitsPerBasket\":[{\"basketSize\":12,\"basketValue\":30.5,\"condition\":\"AND\"}],\"limitExclusion\":[{\"catalogId\":22424,\"products\":[\"UGG-BB-PUR-06\"],\"filters\":[\"7c1fbdf6-dd27-11ea-87d0-0242ac130003\"]}]},\"activity\":{\"lastingType\":\"RELATIVE\",\"lasting\":{\"unit\":\"HOURS\",\"value\":24},\"cronWeekdays\":[0,1,6],\"cronTime\":\"12:34\",\"lastingAt\":\"2019-08-24T14:15:22Z\",\"timeExclusions\":{\"uuid\":\"6a177f3e-748f-44d4-ac30-a457a5199685\"}},\"printout\":{\"template\":\"|#{promotion.name};#{promotion.discountType == 'EXACT_PRICE' ? 'Price':'Discount'} #{promotion.discountValue} #{promotion.discountType == 'PERCENT'? '%' : 'USD'};Valid for;#{moment.utc(coupon.createdAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')} - #{moment.utc(coupon.lastingAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!\",\"maxLineLength\":18,\"newLineDelimiter\":\";\"},\"filterIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"types\":[\"MEMBERS_ONLY\",\"HANDBILL\"],\"excludeByAvailableProducts\":true,\"slotFilters\":{\"order\":\"GIVEN\",\"slots\":[{\"filterId\":\"aff0ee0f-f371-4b82-82c6-dc3b96f05c91\",\"limit\":5}]}}]}"

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

            conn.request("PATCH", "/v4/promotions/handbill/%7BhandbillUuid%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "channel": "MOBILE",
              "status": "DRAFT",
              "name": "string",
              "description": "string",
              "controlGroup": {
                "name": "string",
                "percentage": 0
              },
              "variants": [
                {
                  "name": "string",
                  "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
                  "percentage": 0,
                  "ai": {
                    "controlVariant": true,
                    "varietyFactor": 0.5,
                    "varietyGroupSize": 1,
                    "redistributionFrequencyFactor": 0.5,
                    "popularityBoosting": 1
                  },
                  "limits": {
                    "limitPerDay": 6,
                    "limitExceptions": [
                      {
                        "dayOfWeek": 5,
                        "limitPerDay": 8
                      }
                    ],
                    "limitsPerBasket": [
                      {
                        "basketSize": 12,
                        "basketValue": 30.5,
                        "condition": "AND"
                      }
                    ],
                    "limitExclusion": [
                      {
                        "catalogId": 22424,
                        "products": [
                          "UGG-BB-PUR-06"
                        ],
                        "filters": [
                          "7c1fbdf6-dd27-11ea-87d0-0242ac130003"
                        ]
                      }
                    ]
                  },
                  "activity": {
                    "lastingType": "RELATIVE",
                    "lasting": {
                      "unit": "HOURS",
                      "value": 24
                    },
                    "cronWeekdays": [
                      0,
                      1,
                      6
                    ],
                    "cronTime": "12:34",
                    "lastingAt": "2019-08-24T14:15:22Z",
                    "timeExclusions": {
                      "uuid": "6a177f3e-748f-44d4-ac30-a457a5199685"
                    }
                  },
                  "printout": {
                    "template": "|#{promotion.name};#{promotion.discountType == 'EXACT_PRICE' ? 'Price':'Discount'} #{promotion.discountValue} #{promotion.discountType == 'PERCENT'? '%' : 'USD'};Valid for;#{moment.utc(coupon.createdAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')} - #{moment.utc(coupon.lastingAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!",
                    "maxLineLength": 18,
                    "newLineDelimiter": ";"
                  },
                  "filterIds": [
                    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
                  ],
                  "types": [
                    "MEMBERS_ONLY",
                    "HANDBILL"
                  ],
                  "excludeByAvailableProducts": true,
                  "slotFilters": {
                    "order": "GIVEN",
                    "slots": [
                      {
                        "filterId": "aff0ee0f-f371-4b82-82c6-dc3b96f05c91",
                        "limit": 5
                      }
                    ]
                  }
                }
              ]
            });

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

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

            xhr.open("PATCH", "https://api.synerise.com/v4/promotions/handbill/%7BhandbillUuid%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "PATCH",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/handbill/%7BhandbillUuid%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({
              channel: 'MOBILE',
              status: 'DRAFT',
              name: 'string',
              description: 'string',
              controlGroup: {name: 'string', percentage: 0},
              variants: [
                {
                  name: 'string',
                  uuid: '095be615-a8ad-4c33-8e9c-c7612fbf6c9f',
                  percentage: 0,
                  ai: {
                    controlVariant: true,
                    varietyFactor: 0.5,
                    varietyGroupSize: 1,
                    redistributionFrequencyFactor: 0.5,
                    popularityBoosting: 1
                  },
                  limits: {
                    limitPerDay: 6,
                    limitExceptions: [{dayOfWeek: 5, limitPerDay: 8}],
                    limitsPerBasket: [{basketSize: 12, basketValue: 30.5, condition: 'AND'}],
                    limitExclusion: [
                      {
                        catalogId: 22424,
                        products: ['UGG-BB-PUR-06'],
                        filters: ['7c1fbdf6-dd27-11ea-87d0-0242ac130003']
                      }
                    ]
                  },
                  activity: {
                    lastingType: 'RELATIVE',
                    lasting: {unit: 'HOURS', value: 24},
                    cronWeekdays: [0, 1, 6],
                    cronTime: '12:34',
                    lastingAt: '2019-08-24T14:15:22Z',
                    timeExclusions: {uuid: '6a177f3e-748f-44d4-ac30-a457a5199685'}
                  },
                  printout: {
                    template: '|#{promotion.name};#{promotion.discountType == \'EXACT_PRICE\' ? \'Price\':\'Discount\'} #{promotion.discountValue} #{promotion.discountType == \'PERCENT\'? \'%\' : \'USD\'};Valid for;#{moment.utc(coupon.createdAt).tz(\'Europe/Warsaw\').format(\'DD.MM.YYYY HH:mm\')} - #{moment.utc(coupon.lastingAt).tz(\'Europe/Warsaw\').format(\'DD.MM.YYYY HH:mm\')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!',
                    maxLineLength: 18,
                    newLineDelimiter: ';'
                  },
                  filterIds: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],
                  types: ['MEMBERS_ONLY', 'HANDBILL'],
                  excludeByAvailableProducts: true,
                  slotFilters: {
                    order: 'GIVEN',
                    slots: [{filterId: 'aff0ee0f-f371-4b82-82c6-dc3b96f05c91', limit: 5}]
                  }
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            HttpRequest::methodRegister('PATCH');
            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/handbill/%7BhandbillUuid%7D');
            $request->setMethod(HttpRequest::HTTP_METH_PATCH);

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

            $request->setBody('{"channel":"MOBILE","status":"DRAFT","name":"string","description":"string","controlGroup":{"name":"string","percentage":0},"variants":[{"name":"string","uuid":"095be615-a8ad-4c33-8e9c-c7612fbf6c9f","percentage":0,"ai":{"controlVariant":true,"varietyFactor":0.5,"varietyGroupSize":1,"redistributionFrequencyFactor":0.5,"popularityBoosting":1},"limits":{"limitPerDay":6,"limitExceptions":[{"dayOfWeek":5,"limitPerDay":8}],"limitsPerBasket":[{"basketSize":12,"basketValue":30.5,"condition":"AND"}],"limitExclusion":[{"catalogId":22424,"products":["UGG-BB-PUR-06"],"filters":["7c1fbdf6-dd27-11ea-87d0-0242ac130003"]}]},"activity":{"lastingType":"RELATIVE","lasting":{"unit":"HOURS","value":24},"cronWeekdays":[0,1,6],"cronTime":"12:34","lastingAt":"2019-08-24T14:15:22Z","timeExclusions":{"uuid":"6a177f3e-748f-44d4-ac30-a457a5199685"}},"printout":{"template":"|#{promotion.name};#{promotion.discountType == 'EXACT_PRICE' ? 'Price':'Discount'} #{promotion.discountValue} #{promotion.discountType == 'PERCENT'? '%' : 'USD'};Valid for;#{moment.utc(coupon.createdAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')} - #{moment.utc(coupon.lastingAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!","maxLineLength":18,"newLineDelimiter":";"},"filterIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"types":["MEMBERS_ONLY","HANDBILL"],"excludeByAvailableProducts":true,"slotFilters":{"order":"GIVEN","slots":[{"filterId":"aff0ee0f-f371-4b82-82c6-dc3b96f05c91","limit":5}]}}]}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.patch("https://api.synerise.com/v4/promotions/handbill/%7BhandbillUuid%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"channel\":\"MOBILE\",\"status\":\"DRAFT\",\"name\":\"string\",\"description\":\"string\",\"controlGroup\":{\"name\":\"string\",\"percentage\":0},\"variants\":[{\"name\":\"string\",\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"percentage\":0,\"ai\":{\"controlVariant\":true,\"varietyFactor\":0.5,\"varietyGroupSize\":1,\"redistributionFrequencyFactor\":0.5,\"popularityBoosting\":1},\"limits\":{\"limitPerDay\":6,\"limitExceptions\":[{\"dayOfWeek\":5,\"limitPerDay\":8}],\"limitsPerBasket\":[{\"basketSize\":12,\"basketValue\":30.5,\"condition\":\"AND\"}],\"limitExclusion\":[{\"catalogId\":22424,\"products\":[\"UGG-BB-PUR-06\"],\"filters\":[\"7c1fbdf6-dd27-11ea-87d0-0242ac130003\"]}]},\"activity\":{\"lastingType\":\"RELATIVE\",\"lasting\":{\"unit\":\"HOURS\",\"value\":24},\"cronWeekdays\":[0,1,6],\"cronTime\":\"12:34\",\"lastingAt\":\"2019-08-24T14:15:22Z\",\"timeExclusions\":{\"uuid\":\"6a177f3e-748f-44d4-ac30-a457a5199685\"}},\"printout\":{\"template\":\"|#{promotion.name};#{promotion.discountType == 'EXACT_PRICE' ? 'Price':'Discount'} #{promotion.discountValue} #{promotion.discountType == 'PERCENT'? '%' : 'USD'};Valid for;#{moment.utc(coupon.createdAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')} - #{moment.utc(coupon.lastingAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!\",\"maxLineLength\":18,\"newLineDelimiter\":\";\"},\"filterIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"types\":[\"MEMBERS_ONLY\",\"HANDBILL\"],\"excludeByAvailableProducts\":true,\"slotFilters\":{\"order\":\"GIVEN\",\"slots\":[{\"filterId\":\"aff0ee0f-f371-4b82-82c6-dc3b96f05c91\",\"limit\":5}]}}]}")
              .asString();
  /v4/promotions/promotion/get-for-client/handbill/{handbillUuid}:
    get:
      tags:
        - Handbills
      summary: Generate handbill for Profile
      description: |
        Assign handbill promotions to a Profile. They can be randomized or suggested by the AI engine.

        **IMPORTANT**: 
        - The endpoint is limited to 1000 requests per minute (per workspace).
        - The algorithm that selects promotions for assignment candidates applies all the following filters:
            - Promotions must be of the specified type, assigned to a handbill campaign, and with the `PUBLISH` or `HIDDEN` status.
            - Promotions must be available for the entire duration of the handbill assignment, considering `startAt` and `expireAt` dates. For example, when generating assignments on May 1, 2024 at 9:00 a.m. that are expected to last 3 hours, the algorithm will consider promotions whose `startAt` date is equal to or earlier than May 1, 2024 9:00 a.m. and `expireAt` date is equal to or later than May 1, 2024 12:00 p.m. 
            - Promotions can't currently be assigned within another handbill campaign.
            - Promotions must match the filter for the slot (if applicable). Promotions are handled by the `binoculars` service and identified by UUID.
            - Promotions are deduplicated. First they are sorted by priority, then the algorithm rejects promotions with at least one product that occurred earlier. In a special case, if a promotion with a high priority has an extensive catalog of products covering other promotions, it could exclude all promotions with a lower priority.
            - If `excludeByAvailableProducts` is set to `true`, the algorithm rejects promotions for items that are available as part of other promotions (regardless of their type)
            - After sorting promotions by priority, the algorithm rejects promotions for segments that occur after the 100th unique segment is encountered. (only 100 segments can be checked per handbill assignment, consider limiting the number of segments and reusing them).
            - After checking the first 100 unique segments, the algorithm rejects promotions for segments that don't match the user.
            - To ensure the correctness of promotion usage and redemption, the algorithm rejects promotions that are currently in the `ACTIVE` or `REDEEMED` status.
            - When using AI engine, the promotion candidate list is sorted by priority and truncated to 2500 items before applying the recommendation engine.


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>
      operationId: getHandbillForClient_GET
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/promotions-pathHandbillUuid"
        - $ref: "#/components/parameters/promotions-queryLimit"
        - $ref: "#/components/parameters/promotions-queryPage"
        - $ref: "#/components/parameters/promotions-queryPromotionFields"
      responses:
        "200":
          description: A list of handbill-type promotions assigned to this profile
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: An array of promotions
                    items:
                      $ref: "#/components/schemas/promotions-promotionClientDataResponse"
                  meta:
                    $ref: "#/components/schemas/promotions-responseMeta"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Handbills/operation/getHandbillForClient_GET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/promotions/promotion/get-for-client/handbill/%7BhandbillUuid%7D?limit=100&page=4&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

            conn.request("GET", "/v4/promotions/promotion/get-for-client/handbill/%7BhandbillUuid%7D?limit=100&page=4&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt", headers=headers)

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/v4/promotions/promotion/get-for-client/handbill/%7BhandbillUuid%7D?limit=100&page=4&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/promotion/get-for-client/handbill/%7BhandbillUuid%7D?limit=100&page=4&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/get-for-client/handbill/%7BhandbillUuid%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'limit' => '100',
              'page' => '4',
              'fields' => 'uuid,requireRedeemedPoints,requireRedeemedPoints,possibleRedeems,status,currentRedeemedQuantity,lastingAt'
            ]);

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/promotions/promotion/get-for-client/handbill/%7BhandbillUuid%7D?limit=100&page=4&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/promotion/get-for-client/handbills:
    get:
      tags:
        - Handbills
      summary: Generate batch of handbills for Profile
      description: |
        Assign a batch of handbill promotions to a Profile. They can be randomized or suggested by the AI engine.

        **IMPORTANT**: 
        - The endpoint is limited to 1000 requests per minute (per workspace).
        - The algorithm that selects promotions for assignment candidates applies all the following filters:
            - Promotions must be of the specified type, assigned to a handbill campaign, and with the `PUBLISH` or `HIDDEN` status.
            - Promotions must be available for the entire duration of the handbill assignment, considering `startAt` and `expireAt` dates. For example, when generating assignments on May 1, 2024 at 9:00 a.m. that are expected to last 3 hours, the algorithm will consider promotions whose `startAt` date is equal to or earlier than May 1, 2024 9:00 a.m. and `expireAt` date is equal to or later than May 1, 2024 12:00 p.m. 
            - Promotions can't currently be assigned within another handbill campaign.
            - Promotions must match the filter for the slot (if applicable). Promotions are handled by the `binoculars` service and identified by UUID.
            - Promotions are deduplicated. First they are sorted by priority, then the algorithm rejects promotions with at least one product that occurred earlier. In a special case, if a promotion with a high priority has an extensive catalog of products covering other promotions, it could exclude all promotions with a lower priority.
            - If `excludeByAvailableProducts` is set to `true`, the algorithm rejects promotions for items that are available as part of other promotions (regardless of their type)
            - After sorting promotions by priority, the algorithm rejects promotions for segments that occur after the 100th unique segment is encountered. (only 100 segments can be checked per handbill assignment, consider limiting the number of segments and reusing them).
            - After checking the first 100 unique segments, the algorithm rejects promotions for segments that don't match the user.
            - To ensure the correctness of promotion usage and redemption, the algorithm rejects promotions that are currently in the `ACTIVE` or `REDEEMED` status.
            - When using AI engine, the promotion candidate list is sorted by priority and truncated to 2500 items before applying the recommendation engine.


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>
      operationId: getBatchHandbillForClient_GET
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/promotions-queryHandbillUuid"
        - $ref: "#/components/parameters/promotions-queryPage"
        - $ref: "#/components/parameters/promotions-queryLimit"
        - $ref: "#/components/parameters/promotions-queryIncludeMeta"
        - $ref: "#/components/parameters/promotions-queryPromotionFields"
      responses:
        "200":
          description: A list of handbill-type promotions assigned to this profile
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: An array of promotions
                    items:
                      $ref: "#/components/schemas/promotions-promotionClientDataResponse"
                  meta:
                    $ref: "#/components/schemas/promotions-responseMeta"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Handbills/operation/getBatchHandbillForClient_GET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/promotions/promotion/get-for-client/handbills?handbillUuid=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

            conn.request("GET", "/v4/promotions/promotion/get-for-client/handbills?handbillUuid=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt", headers=headers)

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/v4/promotions/promotion/get-for-client/handbills?handbillUuid=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/promotion/get-for-client/handbills?handbillUuid=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/get-for-client/handbills');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'handbillUuid' => 'SOME_ARRAY_VALUE',
              'page' => '4',
              'limit' => '100',
              'includeMeta' => 'false',
              'fields' => 'uuid,requireRedeemedPoints,requireRedeemedPoints,possibleRedeems,status,currentRedeemedQuantity,lastingAt'
            ]);

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/promotions/promotion/get-for-client/handbills?handbillUuid=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/promotion/get-for-client/{identifierType}/{identifierValue}/handbill/{handbillUuid}:
    get:
      tags:
        - Handbills
      summary: Generate handbill for Profile and get Profile promotions
      description: |
        
        Assign a handbill to a Profile and retrieve a list of promotions assigned to the Profile.

        **IMPORTANT**:  
        - The endpoint is limited to 1000 requests per minute (per workspace).
        - The algorithm that selects promotions for assignment candidates applies all the following filters:
            - Promotions must be of the specified type, assigned to a handbill campaign, and with the `PUBLISH` or `HIDDEN` status.
            - Promotions must be available for the entire duration of the handbill assignment, considering `startAt` and `expireAt` dates. For example, when generating assignments on May 1, 2024 at 9:00 a.m. that are expected to last 3 hours, the algorithm will consider promotions whose `startAt` date is equal to or earlier than May 1, 2024 9:00 a.m. and `expireAt` date is equal to or later than May 1, 2024 12:00 p.m. 
            - Promotions can't currently be assigned within another handbill campaign.
            - Promotions must match the filter for the slot (if applicable). Promotions are handled by the `binoculars` service and identified by UUID.
            - Promotions are deduplicated. First they are sorted by priority, then the algorithm rejects promotions with at least one product that occurred earlier. In a special case, if a promotion with a high priority has an extensive catalog of products covering other promotions, it could exclude all promotions with a lower priority.
            - If `excludeByAvailableProducts` is set to `true`, the algorithm rejects promotions for items that are available as part of other promotions (regardless of their type)
            - After sorting promotions by priority, the algorithm rejects promotions for segments that occur after the 100th unique segment is encountered. (only 100 segments can be checked per handbill assignment, consider limiting the number of segments and reusing them).
            - After checking the first 100 unique segments, the algorithm rejects promotions for segments that don't match the user.
            - To ensure the correctness of promotion usage and redemption, the algorithm rejects promotions that are currently in the `ACTIVE` or `REDEEMED` status.
            - When using AI engine, the promotion candidate list is sorted by priority and truncated to 2500 items before applying the recommendation engine.


        ---

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

        **API key permission required:** `PROMOTIONS_FOR_CLIENT_HANDBILL_READ`

        **User role permission required:** `campaigns_personalised_promotions: read`
      operationId: getAssignHandbillForClient_GET
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
        - $ref: "#/components/parameters/promotions-pathHandbillUuid"
        - $ref: "#/components/parameters/promotions-queryPromotionType"
        - $ref: "#/components/parameters/promotions-queryPromotionStatus"
        - $ref: "#/components/parameters/promotions-queryVisibilityStatus"
        - $ref: "#/components/parameters/promotions-queryTagNames"
        - $ref: "#/components/parameters/promotions-queryTarget"
        - $ref: "#/components/parameters/promotions-queryPromotionPresentOnly"
        - $ref: "#/components/parameters/promotions-queryLastingOnly"
        - $ref: "#/components/parameters/promotions-queryPage"
        - $ref: "#/components/parameters/promotions-queryLimit"
        - $ref: "#/components/parameters/promotions-queryHandbillSort"
        - $ref: "#/components/parameters/promotions-queryIncludeMeta"
        - $ref: "#/components/parameters/promotions-queryPromotionFields"
      responses:
        "200":
          description: A list of promotions assigned to this profile
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: An array of promotions
                    items:
                      $ref: "#/components/schemas/promotions-promotionClientDataResponse"
                  meta:
                    $ref: "#/components/schemas/promotions-responseMeta"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Handbills/operation/getAssignHandbillForClient_GET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?type=SOME_ARRAY_VALUE&status=SOME_ARRAY_VALUE&visibilityStatus=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&page=4&limit=100&sort=createdAt%2Cdesc&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

            conn.request("GET", "/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?type=SOME_ARRAY_VALUE&status=SOME_ARRAY_VALUE&visibilityStatus=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&page=4&limit=100&sort=createdAt%2Cdesc&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt", headers=headers)

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?type=SOME_ARRAY_VALUE&status=SOME_ARRAY_VALUE&visibilityStatus=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&page=4&limit=100&sort=createdAt%2Cdesc&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?type=SOME_ARRAY_VALUE&status=SOME_ARRAY_VALUE&visibilityStatus=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&page=4&limit=100&sort=createdAt%2Cdesc&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'type' => 'SOME_ARRAY_VALUE',
              'status' => 'SOME_ARRAY_VALUE',
              'visibilityStatus' => 'SOME_ARRAY_VALUE',
              'tagNames' => 'SOME_ARRAY_VALUE',
              'target' => 'SOME_ARRAY_VALUE',
              'presentOnly' => 'true',
              'lastingOnly' => 'true',
              'page' => '4',
              'limit' => '100',
              'sort' => 'createdAt,desc',
              'includeMeta' => 'false',
              'fields' => 'uuid,requireRedeemedPoints,requireRedeemedPoints,possibleRedeems,status,currentRedeemedQuantity,lastingAt'
            ]);

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?type=SOME_ARRAY_VALUE&status=SOME_ARRAY_VALUE&visibilityStatus=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&page=4&limit=100&sort=createdAt%2Cdesc&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/v2/promotion/get-for-client/{identifierType}/{identifierValue}/handbill/{handbillUuid}:
    get:
      tags:
        - Handbills
      summary: Generate handbill for Profile (v2)
      description: |
        Assign handbill promotions to a Profile. They can be randomized or suggested by the AI engine.

        **IMPORTANT**: 
        - The endpoint is limited to 1000 requests per minute (per workspace).
        - The algorithm that selects promotions for assignment candidates applies all the following filters:
            - Promotions must be of the specified type, assigned to a handbill campaign, and with the `PUBLISH` or `HIDDEN` status.
            - Promotions must be available for the entire duration of the handbill assignment, considering `startAt` and `expireAt` dates. For example, when generating assignments on May 1, 2024 at 9:00 a.m. that are expected to last 3 hours, the algorithm will consider promotions whose `startAt` date is equal to or earlier than May 1, 2024 9:00 a.m. and `expireAt` date is equal to or later than May 1, 2024 12:00 p.m. 
            - Promotions can't currently be assigned within another handbill campaign.
            - Promotions must match the filter for the slot (if applicable). Promotions are handled by the `binoculars` service and identified by UUID.
            - Promotions are deduplicated. First they are sorted by priority, then the algorithm rejects promotions with at least one product that occurred earlier. In a special case, if a promotion with a high priority has an extensive catalog of products covering other promotions, it could exclude all promotions with a lower priority.
            - If `excludeByAvailableProducts` is set to `true`, the algorithm rejects promotions for items that are available as part of other promotions (regardless of their type)
            - After sorting promotions by priority, the algorithm rejects promotions for segments that occur after the 100th unique segment is encountered. (only 100 segments can be checked per handbill assignment, consider limiting the number of segments and reusing them).
            - After checking the first 100 unique segments, the algorithm rejects promotions for segments that don't match the user.
            - To ensure the correctness of promotion usage and redemption, the algorithm rejects promotions that are currently in the `ACTIVE` or `REDEEMED` status.
            - When using AI engine, the promotion candidate list is sorted by priority and truncated to 2500 items before applying the recommendation engine.


        ---

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

        **API key permission required:** `PROMOTIONS_FOR_CLIENT_HANDBILL_READ`

        **User role permission required:** `campaigns_personalised_promotions: read`
      operationId: getHandbillForClientV2_GET
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
        - $ref: "#/components/parameters/promotions-pathHandbillUuid"
        - $ref: "#/components/parameters/promotions-queryLimit"
        - $ref: "#/components/parameters/promotions-queryPage"
      responses:
        "200":
          description: A list of handbill-type promotions assigned to this profile
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: An array of promotions
                    items:
                      $ref: "#/components/schemas/promotions-promotionClientDataResponse"
                  meta:
                    $ref: "#/components/schemas/promotions-responseMeta"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Handbills/operation/getHandbillForClientV2_GET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?limit=100&page=4' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

            conn.request("GET", "/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?limit=100&page=4", headers=headers)

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?limit=100&page=4");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?limit=100&page=4",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'limit' => '100',
              'page' => '4'
            ]);

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?limit=100&page=4")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/promotion/get-for-client/{identifierType}/{identifierValue}/with-handbills:
    get:
      tags:
        - Handbills
      summary: Generate batch handbill for Profile and get Profile promotions
      description: |
        
        Assign a batch handbill to a Profile and retrieve a list of promotions assigned to the Profile.

        **IMPORTANT**: 
        - The endpoint is limited to 1000 requests per minute (per workspace).
        - The algorithm that selects promotions for assignment candidates applies all the following filters:
            - Promotions must be of the specified type, assigned to a handbill campaign, and with the `PUBLISH` or `HIDDEN` status.
            - Promotions must be available for the entire duration of the handbill assignment, considering `startAt` and `expireAt` dates. For example, when generating assignments on May 1, 2024 at 9:00 a.m. that are expected to last 3 hours, the algorithm will consider promotions whose `startAt` date is equal to or earlier than May 1, 2024 9:00 a.m. and `expireAt` date is equal to or later than May 1, 2024 12:00 p.m. 
            - Promotions can't currently be assigned within another handbill campaign.
            - Promotions must match the filter for the slot (if applicable). Promotions are handled by the `binoculars` service and identified by UUID.
            - Promotions are deduplicated. First they are sorted by priority, then the algorithm rejects promotions with at least one product that occurred earlier. In a special case, if a promotion with a high priority has an extensive catalog of products covering other promotions, it could exclude all promotions with a lower priority.
            - If `excludeByAvailableProducts` is set to `true`, the algorithm rejects promotions for items that are available as part of other promotions (regardless of their type)
            - After sorting promotions by priority, the algorithm rejects promotions for segments that occur after the 100th unique segment is encountered. (only 100 segments can be checked per handbill assignment, consider limiting the number of segments and reusing them).
            - After checking the first 100 unique segments, the algorithm rejects promotions for segments that don't match the user.
            - To ensure the correctness of promotion usage and redemption, the algorithm rejects promotions that are currently in the `ACTIVE` or `REDEEMED` status.
            - When using AI engine, the promotion candidate list is sorted by priority and truncated to 2500 items before applying the recommendation engine.


        ---

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

        **API key permission required:** `PROMOTIONS_FOR_CLIENT_HANDBILL_READ`

        **User role permission required:** `campaigns_personalised_promotions: read`
      operationId: getAssignHandbillsForClient_GET
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
        - $ref: "#/components/parameters/promotions-queryHandbillUuid"
        - $ref: "#/components/parameters/promotions-queryPromotionType"
        - $ref: "#/components/parameters/promotions-queryPage"
        - $ref: "#/components/parameters/promotions-queryLimit"
        - $ref: "#/components/parameters/promotions-queryIncludeMeta"
        - $ref: "#/components/parameters/promotions-queryPromotionStatus"
        - $ref: "#/components/parameters/promotions-queryPromotionFields"
      responses:
        "200":
          description: A list of promotions assigned to this profile
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: An array of promotions
                    items:
                      $ref: "#/components/schemas/promotions-promotionClientDataResponse"
                  meta:
                    $ref: "#/components/schemas/promotions-responseMeta"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Handbills/operation/getAssignHandbillsForClient_GET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/with-handbills?handbillUuid=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&status=SOME_ARRAY_VALUE&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

            conn.request("GET", "/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/with-handbills?handbillUuid=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&status=SOME_ARRAY_VALUE&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt", headers=headers)

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/with-handbills?handbillUuid=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&status=SOME_ARRAY_VALUE&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/with-handbills?handbillUuid=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&status=SOME_ARRAY_VALUE&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/with-handbills');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'handbillUuid' => 'SOME_ARRAY_VALUE',
              'type' => 'SOME_ARRAY_VALUE',
              'page' => '4',
              'limit' => '100',
              'includeMeta' => 'false',
              'status' => 'SOME_ARRAY_VALUE',
              'fields' => 'uuid,requireRedeemedPoints,requireRedeemedPoints,possibleRedeems,status,currentRedeemedQuantity,lastingAt'
            ]);

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/with-handbills?handbillUuid=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&status=SOME_ARRAY_VALUE&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/settings:
    get:
      tags:
        - Promotion settings
      summary: Get settings for current Workspace
      operationId: endpointSettingsGetSettingsGET
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-promotionsSettingsBody"
              example:
                data:
                  expression: xxxxxxx-d047-40fd-99c8-yyyyxxxxyyy
                  blockTag: BLOCK_PROMOTIONS
                  checkoutSettings:
                    handbilUuids:
                      - 1eb6c8f0-dc7a-4d9c-9e0e-bb995ee87699
                  cashbackSettings:
                    exchangeRate: 10
                    limits:
                      minPoints: 10
                      maxPoints: 100
                      maxTransactionAmount: 80
                      maxTransactionPercentage: 60
                  promotionListSettings:
                    fields:
                      - code
                      - possibleRedeems
                      - lastingAt
                      - vouchers
                    sort: NONE
                    limit: 200
                    where:
                      status:
                        - ASSIGNED
                        - ACTIVE
                      type:
                        - CUSTOM
                        - MEMBERS_ONLY
                        - HANDBILL
                      target:
                        - ALL
                        - SEGMENT
                      tagNames: null
                      lastingOnly: true
                      presentOnly: true
                      statusByType:
                        CUSTOM:
                          - ACTIVE
                        HANDBILL:
                          - ASSIGNED
                      targetByType:
                        CUSTOM:
                          - ALL
                        HANDBILL:
                          - ALL
                        MEMBERS_ONLY:
                          - SEGMENT
                      visibilityStatus:
                        - PUBLISH
                        - HIDDEN
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotion-settings/operation/endpointSettingsGetSettingsGET
      description: |
        

        ---

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

        **API key permission required:** `PROMOTIONS_SETTINGS_PROMOTIONS_READ`

        **User role permission required:** `campaigns_personalised_promotions: read`
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/promotions/settings
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            conn.request("GET", "/v4/promotions/settings")

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/v4/promotions/settings");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/settings",
              "headers": {}
            };

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

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

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

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

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/promotions/settings")
              .asString();
    put:
      tags:
        - Promotion settings
      summary: Update settings for current Workspace
      description: |
        This method overrides all current settings. If you do not send a setting that currently exists, it will be reverted to default value.

        ---

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

        **API key permission required:** `PROMOTIONS_SETTINGS_PROMOTIONS_UPDATE`

        **User role permission required:** `campaigns_personalised_promotions: update`
      operationId: endpointSettingsUpdateSettingsPUT
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/promotions-promotionsSettingsBody"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      saleSettings:
                        $ref: "#/components/schemas/promotions-saleSettings"
                    additionalProperties:
                      description: More settings
                    default: {}
              example:
                application/json:
                  data:
                    expression: xxxxxxx-d047-40fd-99c8-yyyyxxxxyyy
                    blockTag: BLOCK_PROMOTIONS
                    promotionListSettings:
                      fields:
                        - code
                        - possibleRedeems
                        - lastingAt
                        - vouchers
                      sort: NONE
                      limit: 200
                      where:
                        status:
                          - ASSIGNED
                          - ACTIVE
                        type:
                          - CUSTOM
                          - MEMBERS_ONLY
                          - HANDBILL
                        target:
                          - ALL
                          - SEGMENT
                        tagNames: null
                        lastingOnly: true
                        presentOnly: true
                        statusByType:
                          CUSTOM:
                            - ACTIVE
                          HANDBILL:
                            - ASSIGNED
                        targetByType:
                          CUSTOM:
                            - ALL
                          HANDBILL:
                            - ALL
                          MEMBERS_ONLY:
                            - SEGMENT
                        visibilityStatus:
                          - PUBLISH
                          - HIDDEN
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotion-settings/operation/endpointSettingsUpdateSettingsPUT
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/v4/promotions/settings \
              --header 'content-type: application/json' \
              --data '{"checkoutSettings":{"handbillUuidsForCheckout":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"codeGeneration":{"prefix":"string","length":36,"crc":true}},"enableCodeGeneration":true,"codePrefix":"SYN","blockTag":"BLOCKED","expression":"8e30707e-988c-498c-a88e-47375a3dcfb5","promotionListSettings":{"setFieldsValues":{},"where":{"excludeIds":[3],"handbillPromotionIds":[3],"visibilityStatus":["DRAFT"],"status":["ASSIGNED"],"statusByType":{"GENERAL":["ASSIGNED"],"CUSTOM":["ASSIGNED"],"MEMBERS_ONLY":["ASSIGNED"],"HANDBILL":["ASSIGNED"]},"target":["ALL"],"targetByType":{"GENERAL":["ALL"],"CUSTOM":["ALL"],"MEMBERS_ONLY":["ALL"],"HANDBILL":["ALL"]},"type":["MEMBERS_ONLY"],"presentOnly":true,"lastingOnly":true,"displayableOnly":true,"checkExistsInTarget":true,"tagNames":["string"]},"fields":["string"],"sort":{"forDBQuery":[{"field":"headerName","direction":"asc"}],"forPaginator":"DISCOUNT_VALUE"},"page":0,"limit":0},"promotionAssignmentSettings":{"setFieldsValues":{},"where":{"excludeIds":[3],"handbillPromotionIds":[3],"visibilityStatus":["DRAFT"],"status":["ASSIGNED"],"statusByType":{"GENERAL":["ASSIGNED"],"CUSTOM":["ASSIGNED"],"MEMBERS_ONLY":["ASSIGNED"],"HANDBILL":["ASSIGNED"]},"target":["ALL"],"targetByType":{"GENERAL":["ALL"],"CUSTOM":["ALL"],"MEMBERS_ONLY":["ALL"],"HANDBILL":["ALL"]},"type":["MEMBERS_ONLY"],"presentOnly":true,"lastingOnly":true,"displayableOnly":true,"checkExistsInTarget":true,"tagNames":["string"]},"fields":["string"],"sort":{"forDBQuery":[{"field":"headerName","direction":"asc"}],"forPaginator":"DISCOUNT_VALUE"},"page":0,"limit":0},"restorePointsOnProfileDeactivation":true,"allowRedeemCompletionWhenBlocked":false,"saleSettings":{"discountSourceType":0,"clientIdCardType":0,"handbillCheckout":"04845f2a-86bf-4319-89c4-1f24d4e1f58e","priceValueBaseStrategy":"CONSTANT","combineBasketDiscounts":false,"discountOrder":{"strategy":"DISCOUNT_VALUE","direction":"asc"},"returnFields":["string"]},"lockSettings":{"promotionRequestedLockTtl":null,"processSalePromotionActivationLockWaitTime":null,"lockPromotionRequestByIdentifier":true},"transferSettings":[{"expression":"2395fc33-f2f0-420c-8e7b-0ac63c3454de","recipient":{"segments":["string"]},"sender":{"segments":["string"]}}],"cashbackSettings":{"exchangeRate":0.01,"limits":{"minPoints":10,"maxPoints":1000,"maxTransactionAmount":20,"maxTransactionPercentage":50}}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"checkoutSettings\":{\"handbillUuidsForCheckout\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"codeGeneration\":{\"prefix\":\"string\",\"length\":36,\"crc\":true}},\"enableCodeGeneration\":true,\"codePrefix\":\"SYN\",\"blockTag\":\"BLOCKED\",\"expression\":\"8e30707e-988c-498c-a88e-47375a3dcfb5\",\"promotionListSettings\":{\"setFieldsValues\":{},\"where\":{\"excludeIds\":[3],\"handbillPromotionIds\":[3],\"visibilityStatus\":[\"DRAFT\"],\"status\":[\"ASSIGNED\"],\"statusByType\":{\"GENERAL\":[\"ASSIGNED\"],\"CUSTOM\":[\"ASSIGNED\"],\"MEMBERS_ONLY\":[\"ASSIGNED\"],\"HANDBILL\":[\"ASSIGNED\"]},\"target\":[\"ALL\"],\"targetByType\":{\"GENERAL\":[\"ALL\"],\"CUSTOM\":[\"ALL\"],\"MEMBERS_ONLY\":[\"ALL\"],\"HANDBILL\":[\"ALL\"]},\"type\":[\"MEMBERS_ONLY\"],\"presentOnly\":true,\"lastingOnly\":true,\"displayableOnly\":true,\"checkExistsInTarget\":true,\"tagNames\":[\"string\"]},\"fields\":[\"string\"],\"sort\":{\"forDBQuery\":[{\"field\":\"headerName\",\"direction\":\"asc\"}],\"forPaginator\":\"DISCOUNT_VALUE\"},\"page\":0,\"limit\":0},\"promotionAssignmentSettings\":{\"setFieldsValues\":{},\"where\":{\"excludeIds\":[3],\"handbillPromotionIds\":[3],\"visibilityStatus\":[\"DRAFT\"],\"status\":[\"ASSIGNED\"],\"statusByType\":{\"GENERAL\":[\"ASSIGNED\"],\"CUSTOM\":[\"ASSIGNED\"],\"MEMBERS_ONLY\":[\"ASSIGNED\"],\"HANDBILL\":[\"ASSIGNED\"]},\"target\":[\"ALL\"],\"targetByType\":{\"GENERAL\":[\"ALL\"],\"CUSTOM\":[\"ALL\"],\"MEMBERS_ONLY\":[\"ALL\"],\"HANDBILL\":[\"ALL\"]},\"type\":[\"MEMBERS_ONLY\"],\"presentOnly\":true,\"lastingOnly\":true,\"displayableOnly\":true,\"checkExistsInTarget\":true,\"tagNames\":[\"string\"]},\"fields\":[\"string\"],\"sort\":{\"forDBQuery\":[{\"field\":\"headerName\",\"direction\":\"asc\"}],\"forPaginator\":\"DISCOUNT_VALUE\"},\"page\":0,\"limit\":0},\"restorePointsOnProfileDeactivation\":true,\"allowRedeemCompletionWhenBlocked\":false,\"saleSettings\":{\"discountSourceType\":0,\"clientIdCardType\":0,\"handbillCheckout\":\"04845f2a-86bf-4319-89c4-1f24d4e1f58e\",\"priceValueBaseStrategy\":\"CONSTANT\",\"combineBasketDiscounts\":false,\"discountOrder\":{\"strategy\":\"DISCOUNT_VALUE\",\"direction\":\"asc\"},\"returnFields\":[\"string\"]},\"lockSettings\":{\"promotionRequestedLockTtl\":null,\"processSalePromotionActivationLockWaitTime\":null,\"lockPromotionRequestByIdentifier\":true},\"transferSettings\":[{\"expression\":\"2395fc33-f2f0-420c-8e7b-0ac63c3454de\",\"recipient\":{\"segments\":[\"string\"]},\"sender\":{\"segments\":[\"string\"]}}],\"cashbackSettings\":{\"exchangeRate\":0.01,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}}"

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

            conn.request("PUT", "/v4/promotions/settings", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "checkoutSettings": {
                "handbillUuidsForCheckout": [
                  "497f6eca-6276-4993-bfeb-53cbbbba6f08"
                ],
                "codeGeneration": {
                  "prefix": "string",
                  "length": 36,
                  "crc": true
                }
              },
              "enableCodeGeneration": true,
              "codePrefix": "SYN",
              "blockTag": "BLOCKED",
              "expression": "8e30707e-988c-498c-a88e-47375a3dcfb5",
              "promotionListSettings": {
                "setFieldsValues": {},
                "where": {
                  "excludeIds": [
                    3
                  ],
                  "handbillPromotionIds": [
                    3
                  ],
                  "visibilityStatus": [
                    "DRAFT"
                  ],
                  "status": [
                    "ASSIGNED"
                  ],
                  "statusByType": {
                    "GENERAL": [
                      "ASSIGNED"
                    ],
                    "CUSTOM": [
                      "ASSIGNED"
                    ],
                    "MEMBERS_ONLY": [
                      "ASSIGNED"
                    ],
                    "HANDBILL": [
                      "ASSIGNED"
                    ]
                  },
                  "target": [
                    "ALL"
                  ],
                  "targetByType": {
                    "GENERAL": [
                      "ALL"
                    ],
                    "CUSTOM": [
                      "ALL"
                    ],
                    "MEMBERS_ONLY": [
                      "ALL"
                    ],
                    "HANDBILL": [
                      "ALL"
                    ]
                  },
                  "type": [
                    "MEMBERS_ONLY"
                  ],
                  "presentOnly": true,
                  "lastingOnly": true,
                  "displayableOnly": true,
                  "checkExistsInTarget": true,
                  "tagNames": [
                    "string"
                  ]
                },
                "fields": [
                  "string"
                ],
                "sort": {
                  "forDBQuery": [
                    {
                      "field": "headerName",
                      "direction": "asc"
                    }
                  ],
                  "forPaginator": "DISCOUNT_VALUE"
                },
                "page": 0,
                "limit": 0
              },
              "promotionAssignmentSettings": {
                "setFieldsValues": {},
                "where": {
                  "excludeIds": [
                    3
                  ],
                  "handbillPromotionIds": [
                    3
                  ],
                  "visibilityStatus": [
                    "DRAFT"
                  ],
                  "status": [
                    "ASSIGNED"
                  ],
                  "statusByType": {
                    "GENERAL": [
                      "ASSIGNED"
                    ],
                    "CUSTOM": [
                      "ASSIGNED"
                    ],
                    "MEMBERS_ONLY": [
                      "ASSIGNED"
                    ],
                    "HANDBILL": [
                      "ASSIGNED"
                    ]
                  },
                  "target": [
                    "ALL"
                  ],
                  "targetByType": {
                    "GENERAL": [
                      "ALL"
                    ],
                    "CUSTOM": [
                      "ALL"
                    ],
                    "MEMBERS_ONLY": [
                      "ALL"
                    ],
                    "HANDBILL": [
                      "ALL"
                    ]
                  },
                  "type": [
                    "MEMBERS_ONLY"
                  ],
                  "presentOnly": true,
                  "lastingOnly": true,
                  "displayableOnly": true,
                  "checkExistsInTarget": true,
                  "tagNames": [
                    "string"
                  ]
                },
                "fields": [
                  "string"
                ],
                "sort": {
                  "forDBQuery": [
                    {
                      "field": "headerName",
                      "direction": "asc"
                    }
                  ],
                  "forPaginator": "DISCOUNT_VALUE"
                },
                "page": 0,
                "limit": 0
              },
              "restorePointsOnProfileDeactivation": true,
              "allowRedeemCompletionWhenBlocked": false,
              "saleSettings": {
                "discountSourceType": 0,
                "clientIdCardType": 0,
                "handbillCheckout": "04845f2a-86bf-4319-89c4-1f24d4e1f58e",
                "priceValueBaseStrategy": "CONSTANT",
                "combineBasketDiscounts": false,
                "discountOrder": {
                  "strategy": "DISCOUNT_VALUE",
                  "direction": "asc"
                },
                "returnFields": [
                  "string"
                ]
              },
              "lockSettings": {
                "promotionRequestedLockTtl": null,
                "processSalePromotionActivationLockWaitTime": null,
                "lockPromotionRequestByIdentifier": true
              },
              "transferSettings": [
                {
                  "expression": "2395fc33-f2f0-420c-8e7b-0ac63c3454de",
                  "recipient": {
                    "segments": [
                      "string"
                    ]
                  },
                  "sender": {
                    "segments": [
                      "string"
                    ]
                  }
                }
              ],
              "cashbackSettings": {
                "exchangeRate": 0.01,
                "limits": {
                  "minPoints": 10,
                  "maxPoints": 1000,
                  "maxTransactionAmount": 20,
                  "maxTransactionPercentage": 50
                }
              }
            });

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

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

            xhr.open("PUT", "https://api.synerise.com/v4/promotions/settings");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/settings",
              "headers": {
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({
              checkoutSettings: {
                handbillUuidsForCheckout: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],
                codeGeneration: {prefix: 'string', length: 36, crc: true}
              },
              enableCodeGeneration: true,
              codePrefix: 'SYN',
              blockTag: 'BLOCKED',
              expression: '8e30707e-988c-498c-a88e-47375a3dcfb5',
              promotionListSettings: {
                setFieldsValues: {},
                where: {
                  excludeIds: [3],
                  handbillPromotionIds: [3],
                  visibilityStatus: ['DRAFT'],
                  status: ['ASSIGNED'],
                  statusByType: {
                    GENERAL: ['ASSIGNED'],
                    CUSTOM: ['ASSIGNED'],
                    MEMBERS_ONLY: ['ASSIGNED'],
                    HANDBILL: ['ASSIGNED']
                  },
                  target: ['ALL'],
                  targetByType: {GENERAL: ['ALL'], CUSTOM: ['ALL'], MEMBERS_ONLY: ['ALL'], HANDBILL: ['ALL']},
                  type: ['MEMBERS_ONLY'],
                  presentOnly: true,
                  lastingOnly: true,
                  displayableOnly: true,
                  checkExistsInTarget: true,
                  tagNames: ['string']
                },
                fields: ['string'],
                sort: {
                  forDBQuery: [{field: 'headerName', direction: 'asc'}],
                  forPaginator: 'DISCOUNT_VALUE'
                },
                page: 0,
                limit: 0
              },
              promotionAssignmentSettings: {
                setFieldsValues: {},
                where: {
                  excludeIds: [3],
                  handbillPromotionIds: [3],
                  visibilityStatus: ['DRAFT'],
                  status: ['ASSIGNED'],
                  statusByType: {
                    GENERAL: ['ASSIGNED'],
                    CUSTOM: ['ASSIGNED'],
                    MEMBERS_ONLY: ['ASSIGNED'],
                    HANDBILL: ['ASSIGNED']
                  },
                  target: ['ALL'],
                  targetByType: {GENERAL: ['ALL'], CUSTOM: ['ALL'], MEMBERS_ONLY: ['ALL'], HANDBILL: ['ALL']},
                  type: ['MEMBERS_ONLY'],
                  presentOnly: true,
                  lastingOnly: true,
                  displayableOnly: true,
                  checkExistsInTarget: true,
                  tagNames: ['string']
                },
                fields: ['string'],
                sort: {
                  forDBQuery: [{field: 'headerName', direction: 'asc'}],
                  forPaginator: 'DISCOUNT_VALUE'
                },
                page: 0,
                limit: 0
              },
              restorePointsOnProfileDeactivation: true,
              allowRedeemCompletionWhenBlocked: false,
              saleSettings: {
                discountSourceType: 0,
                clientIdCardType: 0,
                handbillCheckout: '04845f2a-86bf-4319-89c4-1f24d4e1f58e',
                priceValueBaseStrategy: 'CONSTANT',
                combineBasketDiscounts: false,
                discountOrder: {strategy: 'DISCOUNT_VALUE', direction: 'asc'},
                returnFields: ['string']
              },
              lockSettings: {
                promotionRequestedLockTtl: null,
                processSalePromotionActivationLockWaitTime: null,
                lockPromotionRequestByIdentifier: true
              },
              transferSettings: [
                {
                  expression: '2395fc33-f2f0-420c-8e7b-0ac63c3454de',
                  recipient: {segments: ['string']},
                  sender: {segments: ['string']}
                }
              ],
              cashbackSettings: {
                exchangeRate: 0.01,
                limits: {
                  minPoints: 10,
                  maxPoints: 1000,
                  maxTransactionAmount: 20,
                  maxTransactionPercentage: 50
                }
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"checkoutSettings":{"handbillUuidsForCheckout":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"codeGeneration":{"prefix":"string","length":36,"crc":true}},"enableCodeGeneration":true,"codePrefix":"SYN","blockTag":"BLOCKED","expression":"8e30707e-988c-498c-a88e-47375a3dcfb5","promotionListSettings":{"setFieldsValues":{},"where":{"excludeIds":[3],"handbillPromotionIds":[3],"visibilityStatus":["DRAFT"],"status":["ASSIGNED"],"statusByType":{"GENERAL":["ASSIGNED"],"CUSTOM":["ASSIGNED"],"MEMBERS_ONLY":["ASSIGNED"],"HANDBILL":["ASSIGNED"]},"target":["ALL"],"targetByType":{"GENERAL":["ALL"],"CUSTOM":["ALL"],"MEMBERS_ONLY":["ALL"],"HANDBILL":["ALL"]},"type":["MEMBERS_ONLY"],"presentOnly":true,"lastingOnly":true,"displayableOnly":true,"checkExistsInTarget":true,"tagNames":["string"]},"fields":["string"],"sort":{"forDBQuery":[{"field":"headerName","direction":"asc"}],"forPaginator":"DISCOUNT_VALUE"},"page":0,"limit":0},"promotionAssignmentSettings":{"setFieldsValues":{},"where":{"excludeIds":[3],"handbillPromotionIds":[3],"visibilityStatus":["DRAFT"],"status":["ASSIGNED"],"statusByType":{"GENERAL":["ASSIGNED"],"CUSTOM":["ASSIGNED"],"MEMBERS_ONLY":["ASSIGNED"],"HANDBILL":["ASSIGNED"]},"target":["ALL"],"targetByType":{"GENERAL":["ALL"],"CUSTOM":["ALL"],"MEMBERS_ONLY":["ALL"],"HANDBILL":["ALL"]},"type":["MEMBERS_ONLY"],"presentOnly":true,"lastingOnly":true,"displayableOnly":true,"checkExistsInTarget":true,"tagNames":["string"]},"fields":["string"],"sort":{"forDBQuery":[{"field":"headerName","direction":"asc"}],"forPaginator":"DISCOUNT_VALUE"},"page":0,"limit":0},"restorePointsOnProfileDeactivation":true,"allowRedeemCompletionWhenBlocked":false,"saleSettings":{"discountSourceType":0,"clientIdCardType":0,"handbillCheckout":"04845f2a-86bf-4319-89c4-1f24d4e1f58e","priceValueBaseStrategy":"CONSTANT","combineBasketDiscounts":false,"discountOrder":{"strategy":"DISCOUNT_VALUE","direction":"asc"},"returnFields":["string"]},"lockSettings":{"promotionRequestedLockTtl":null,"processSalePromotionActivationLockWaitTime":null,"lockPromotionRequestByIdentifier":true},"transferSettings":[{"expression":"2395fc33-f2f0-420c-8e7b-0ac63c3454de","recipient":{"segments":["string"]},"sender":{"segments":["string"]}}],"cashbackSettings":{"exchangeRate":0.01,"limits":{"minPoints":10,"maxPoints":1000,"maxTransactionAmount":20,"maxTransactionPercentage":50}}}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.put("https://api.synerise.com/v4/promotions/settings")
              .header("content-type", "application/json")
              .body("{\"checkoutSettings\":{\"handbillUuidsForCheckout\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"codeGeneration\":{\"prefix\":\"string\",\"length\":36,\"crc\":true}},\"enableCodeGeneration\":true,\"codePrefix\":\"SYN\",\"blockTag\":\"BLOCKED\",\"expression\":\"8e30707e-988c-498c-a88e-47375a3dcfb5\",\"promotionListSettings\":{\"setFieldsValues\":{},\"where\":{\"excludeIds\":[3],\"handbillPromotionIds\":[3],\"visibilityStatus\":[\"DRAFT\"],\"status\":[\"ASSIGNED\"],\"statusByType\":{\"GENERAL\":[\"ASSIGNED\"],\"CUSTOM\":[\"ASSIGNED\"],\"MEMBERS_ONLY\":[\"ASSIGNED\"],\"HANDBILL\":[\"ASSIGNED\"]},\"target\":[\"ALL\"],\"targetByType\":{\"GENERAL\":[\"ALL\"],\"CUSTOM\":[\"ALL\"],\"MEMBERS_ONLY\":[\"ALL\"],\"HANDBILL\":[\"ALL\"]},\"type\":[\"MEMBERS_ONLY\"],\"presentOnly\":true,\"lastingOnly\":true,\"displayableOnly\":true,\"checkExistsInTarget\":true,\"tagNames\":[\"string\"]},\"fields\":[\"string\"],\"sort\":{\"forDBQuery\":[{\"field\":\"headerName\",\"direction\":\"asc\"}],\"forPaginator\":\"DISCOUNT_VALUE\"},\"page\":0,\"limit\":0},\"promotionAssignmentSettings\":{\"setFieldsValues\":{},\"where\":{\"excludeIds\":[3],\"handbillPromotionIds\":[3],\"visibilityStatus\":[\"DRAFT\"],\"status\":[\"ASSIGNED\"],\"statusByType\":{\"GENERAL\":[\"ASSIGNED\"],\"CUSTOM\":[\"ASSIGNED\"],\"MEMBERS_ONLY\":[\"ASSIGNED\"],\"HANDBILL\":[\"ASSIGNED\"]},\"target\":[\"ALL\"],\"targetByType\":{\"GENERAL\":[\"ALL\"],\"CUSTOM\":[\"ALL\"],\"MEMBERS_ONLY\":[\"ALL\"],\"HANDBILL\":[\"ALL\"]},\"type\":[\"MEMBERS_ONLY\"],\"presentOnly\":true,\"lastingOnly\":true,\"displayableOnly\":true,\"checkExistsInTarget\":true,\"tagNames\":[\"string\"]},\"fields\":[\"string\"],\"sort\":{\"forDBQuery\":[{\"field\":\"headerName\",\"direction\":\"asc\"}],\"forPaginator\":\"DISCOUNT_VALUE\"},\"page\":0,\"limit\":0},\"restorePointsOnProfileDeactivation\":true,\"allowRedeemCompletionWhenBlocked\":false,\"saleSettings\":{\"discountSourceType\":0,\"clientIdCardType\":0,\"handbillCheckout\":\"04845f2a-86bf-4319-89c4-1f24d4e1f58e\",\"priceValueBaseStrategy\":\"CONSTANT\",\"combineBasketDiscounts\":false,\"discountOrder\":{\"strategy\":\"DISCOUNT_VALUE\",\"direction\":\"asc\"},\"returnFields\":[\"string\"]},\"lockSettings\":{\"promotionRequestedLockTtl\":null,\"processSalePromotionActivationLockWaitTime\":null,\"lockPromotionRequestByIdentifier\":true},\"transferSettings\":[{\"expression\":\"2395fc33-f2f0-420c-8e7b-0ac63c3454de\",\"recipient\":{\"segments\":[\"string\"]},\"sender\":{\"segments\":[\"string\"]}}],\"cashbackSettings\":{\"exchangeRate\":0.01,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}}")
              .asString();
  /v4/promotions/lock/create-points-lock-for-client/{identifierType}/{identifierValue}:
    post:
      tags:
        - Promotion locks
      summary: Create point lock for profile
      description: |
        Create a point lock for a profile. That profile cannot activate or de-activate promotions based on loyalty points until the lock is released. The profile can still redeem promotions.  
        This lock is released with the ["Release point lock for profile" endpoint](#operation/endpointLockReleaseLockForClientPOST) or when its TTL (defined in the query parameters) expires.


        ---

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

        **API key permission required:** `PROMOTIONS_LOCK_UPDATE`

        **User role permission required:** `campaigns_promotions: update`
      operationId: endpointLockCreateLockForClientPOST
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/promotions-queryLockTtlSec"
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
      responses:
        "200":
          description: Lock created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-createLockRes"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          $ref: "#/components/responses/promotions-ClientNotFoundError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotion-locks/operation/endpointLockCreateLockForClientPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api.synerise.com/v4/promotions/lock/create-points-lock-for-client/email/%7BidentifierValue%7D?lockTtlSec=SOME_NUMBER_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

            conn.request("POST", "/v4/promotions/lock/create-points-lock-for-client/email/%7BidentifierValue%7D?lockTtlSec=SOME_NUMBER_VALUE", headers=headers)

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

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

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

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

            xhr.open("POST", "https://api.synerise.com/v4/promotions/lock/create-points-lock-for-client/email/%7BidentifierValue%7D?lockTtlSec=SOME_NUMBER_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/lock/create-points-lock-for-client/email/%7BidentifierValue%7D?lockTtlSec=SOME_NUMBER_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/lock/create-points-lock-for-client/email/%7BidentifierValue%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setQueryData([
              'lockTtlSec' => 'SOME_NUMBER_VALUE'
            ]);

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/promotions/lock/create-points-lock-for-client/email/%7BidentifierValue%7D?lockTtlSec=SOME_NUMBER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/lock/release-points-lock-for-client/{identifierType}/{identifierValue}/{lockIdentifier}:
    post:
      tags:
        - Promotion locks
      summary: Release point lock for profile
      description: |
        Release a [point lock](#operation/endpointLockCreateLockForClientPOST) from a profile. That profile can now activate and de-activate promotions based on loyalty points.


        ---

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

        **API key permission required:** `PROMOTIONS_LOCK_UPDATE`

        **User role permission required:** `campaigns_promotions: update`
      operationId: endpointLockReleaseLockForClientPOST
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/promotions-pathLockIdentifier"
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
      responses:
        "200":
          description: Lock released
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-releaseLockRes"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          $ref: "#/components/responses/promotions-ClientNotFoundError"
        "409":
          $ref: "#/components/responses/promotions-LockAlreadyExistsError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotion-locks/operation/endpointLockReleaseLockForClientPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/lock/release-points-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119 \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

            conn.request("POST", "/v4/promotions/lock/release-points-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119", headers=headers)

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

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

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

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

            xhr.open("POST", "https://api.synerise.com/v4/promotions/lock/release-points-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/lock/release-points-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/lock/release-points-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119');
            $request->setMethod(HTTP_METH_POST);

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/promotions/lock/release-points-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/lock/release-promotion-requested-lock-for-client/{identifierType}/{identifierValue}/{lockIdentifier}:
    post:
      tags:
        - Promotion locks
      summary: Release "promotion requested" lock from profile
      description: |
        Release a "promotion requested" lock from a profile. That profile can now fetch promotion lists. This kind of lock can be applied when using the [Get Profile promotions by a custom filter](#operation/GetClientPromotionsByACustomFilter) endpoint.

        ---

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

        **API key permission required:** `PROMOTIONS_LOCK_UPDATE`

        **User role permission required:** `campaigns_promotions: update`
      operationId: endpointLockReleasePromotionRequestedLockForClientPOST
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/promotions-pathLockIdentifier"
        - $ref: "#/components/parameters/promotions-pathClientIdentifierType"
        - $ref: "#/components/parameters/promotions-pathIdentifierValue"
      responses:
        "200":
          description: Lock released
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/promotions-releaseLockRes"
        "400":
          $ref: "#/components/responses/promotions-400"
        "401":
          $ref: "#/components/responses/promotions-401"
        "403":
          $ref: "#/components/responses/promotions-403"
        "404":
          description: Not found
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: "#/components/schemas/promotions-ProfileNotFoundErrorV1"
                  - $ref: "#/components/schemas/promotions-LockNotFoundErrorV1"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotion-locks/operation/endpointLockReleasePromotionRequestedLockForClientPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/lock/release-promotion-requested-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119 \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

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

            conn.request("POST", "/v4/promotions/lock/release-promotion-requested-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119", headers=headers)

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

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

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

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

            xhr.open("POST", "https://api.synerise.com/v4/promotions/lock/release-promotion-requested-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/lock/release-promotion-requested-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/lock/release-promotion-requested-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119');
            $request->setMethod(HTTP_METH_POST);

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/promotions/lock/release-promotion-requested-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/promotions/v2/points/transfer:
    post:
      tags:
        - Promotions points
      summary: Transfer points to another profile
      description: |
        With this method, a profile can send some of their points to another profile.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>
      operationId: PointsTransfer
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              required:
                - pointsAmount
                - recipient
              properties:
                pointsAmount:
                  type: integer
                  description: How many points to send
                  minimum: 1
                recipient:
                  type: object
                  description: Identifier of the recipient
                  required:
                    - clientKey
                    - clientKeyValue
                  properties:
                    clientKey:
                      $ref: "#/components/schemas/promotions-clientKey"
                    clientKeyValue:
                      $ref: "#/components/schemas/promotions-clientKeyValue"
                    name:
                      $ref: "#/components/schemas/promotions-recipientName"
                sender:
                  type: object
                  description: Information about the sender
                  properties:
                    name:
                      $ref: "#/components/schemas/promotions-senderName"
                message:
                  type: string
                  description: A message that the recipient will receive with the points
                  maxLength: 256
      responses:
        "202":
          description: Point transfer scheduled
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Point transfer scheduled
        "400":
          $ref: "#/components/responses/promotions-InvalidDataErrorResponseV2"
        "404":
          $ref: "#/components/responses/promotions-ClientNotFoundErrorResponseV2"
        "422":
          description: Unprocessable point transfer
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: "#/components/schemas/promotions-ClientNotHaveRequiredPointsError"
                  - $ref: "#/components/schemas/promotions-ClientPointsSenderNotInSegmentError"
                  - $ref: "#/components/schemas/promotions-ClientPointsRecipientNotInSegmentError"
        "423":
          $ref: "#/components/responses/promotions-ClientPointsLockErrorResponseV2"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotions-points/operation/PointsTransfer
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/v2/points/transfer \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"pointsAmount":1,"recipient":{"clientKey":"clientId","clientKeyValue":"434428563","name":"string"},"sender":{"name":"string"},"message":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"pointsAmount\":1,\"recipient\":{\"clientKey\":\"clientId\",\"clientKeyValue\":\"434428563\",\"name\":\"string\"},\"sender\":{\"name\":\"string\"},\"message\":\"string\"}"

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

            conn.request("POST", "/v4/promotions/v2/points/transfer", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "pointsAmount": 1,
              "recipient": {
                "clientKey": "clientId",
                "clientKeyValue": "434428563",
                "name": "string"
              },
              "sender": {
                "name": "string"
              },
              "message": "string"
            });

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

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

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

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

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

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

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

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

            req.write(JSON.stringify({
              pointsAmount: 1,
              recipient: {clientKey: 'clientId', clientKeyValue: '434428563', name: 'string'},
              sender: {name: 'string'},
              message: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"pointsAmount":1,"recipient":{"clientKey":"clientId","clientKeyValue":"434428563","name":"string"},"sender":{"name":"string"},"message":"string"}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/promotions/v2/points/transfer")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"pointsAmount\":1,\"recipient\":{\"clientKey\":\"clientId\",\"clientKeyValue\":\"434428563\",\"name\":\"string\"},\"sender\":{\"name\":\"string\"},\"message\":\"string\"}")
              .asString();
  /schema-service/v3/screen-views/{feedSlug}/generate:
    get:
      tags:
        - Screen views
      summary: Generate screen view from feed
      description: |
        When this method is called, the Synerise backend finds all screen view campaigns applicable to the JWT context and returns the screen view with the highest priority (1). Inserts are processed. If an insert can't be processed, the returned `data` is empty.

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

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


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>, <span title="Available only on mobile SDKs">Incognito Profile</span>

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

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

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

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

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

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

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

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

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

            xhr.open("GET", "https://api.synerise.com/schema-service/v3/screen-views/%7BfeedSlug%7D/generate");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v3/screen-views/%7BfeedSlug%7D/generate",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

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

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

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

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

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

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/schema-service/v3/screen-views/%7BfeedSlug%7D/generate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - Screen views
      summary: Generate screen view from feed
      description: |
        When this method is called, the Synerise backend finds all screen view campaigns applicable to the JWT context and returns the screen view with the highest priority (1). Inserts are processed. If an insert can't be processed, the returned `data` is empty.

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

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


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>, <span title="Available only on mobile SDKs">Incognito Profile</span>

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

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

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

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

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

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

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

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

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

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

            xhr.open("POST", "https://api.synerise.com/schema-service/v3/screen-views/%7BfeedSlug%7D/generate");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v3/screen-views/%7BfeedSlug%7D/generate",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

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

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

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

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/schema-service/v3/screen-views/%7BfeedSlug%7D/generate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"property1\":\"string\",\"property2\":\"string\"}")
              .asString();
  /schema-service/screen-views/create:
    post:
      tags:
        - Screen views
      summary: Create screen view
      description: |
        Create a screen view.

        ---

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

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

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

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

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

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

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

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

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

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

            xhr.open("POST", "https://api.synerise.com/schema-service/screen-views/create");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/screen-views/create",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

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

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

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

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

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

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

        ---

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

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

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

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

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

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

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

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

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

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

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

            xhr.open("POST", "https://api.synerise.com/schema-service/v2/screen-views/createNew");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

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

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

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

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

            req.write(JSON.stringify({name: 'string', directory: '5277859d-f92c-478c-acab-7680a97fea68'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

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

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/schema-service/v2/screen-views/createNew")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\",\"directory\":\"5277859d-f92c-478c-acab-7680a97fea68\"}")
              .asString();
  /schema-service/v2/screen-views/{screenViewId}/content:
    post:
      tags:
        - Screen views
      summary: Add content to screen view
      description: |
        Add content to a screen view. This overwrites any existing content.

        ---

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

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

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

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

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

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

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

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "json": {
                "property1": null,
                "property2": null
              },
              "documents": [
                "string"
              ],
              "data": [
                {
                  "slug": "basket"
                }
              ],
              "groups": [
                "43c97b25-4a10-45d0-99b7-d472eea2bb24"
              ],
              "groupsOrder": false
            });

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

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

            xhr.open("POST", "https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/content");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/screen-views/%7BscreenViewId%7D/content",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({
              json: {property1: null, property2: null},
              documents: ['string'],
              data: [{slug: 'basket'}],
              groups: ['43c97b25-4a10-45d0-99b7-d472eea2bb24'],
              groupsOrder: false
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"json":{"property1":null,"property2":null},"documents":["string"],"data":[{"slug":"basket"}],"groups":["43c97b25-4a10-45d0-99b7-d472eea2bb24"],"groupsOrder":false}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/content")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"json\":{\"property1\":null,\"property2\":null},\"documents\":[\"string\"],\"data\":[{\"slug\":\"basket\"}],\"groups\":[\"43c97b25-4a10-45d0-99b7-d472eea2bb24\"],\"groupsOrder\":false}")
              .asString();
  /schema-service/v2/screen-views/{screenViewId}/audience:
    post:
      tags:
        - Screen views
      summary: Add audience to screen view
      description: |
        Define the audience for a screen view.

        ---

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

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

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

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

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

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

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

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

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

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

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

            xhr.open("POST", "https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/audience");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

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

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/screen-views/%7BscreenViewId%7D/audience",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

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

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

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

            req.write(JSON.stringify({
              targetType: 'SEGMENT',
              segments: ['string'],
              query: '{"analysis":{"title":"Unnamed segmentation","description":"","unique":true,"segments":[{"title":"Segmentation A","description":"","filter":{"matching":true,"expressions":[{"_id":"a9b76c8e-34bd-4ac3-be8f-f37041d126bd","name":"","type":"FUNNEL","matching":true,"funnel":{"_id":"5c759d73-49c6-409f-96a3-b569dff8f8ff","title":"Unnamed","completedWithin":null,"dateFilter":{"type":"RELATIVE","offset":{"type":"DAYS","value":0},"duration":{"type":"DAYS","value":30}},"steps":[{"_id":"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff","title":"","action":{"id":944,"name":"page.visit"},"eventName":"page.visit","expressions":[]}],"exact":false}}]}}]}}'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

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

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

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

        ---

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

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

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

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

            payload = "99"

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

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

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

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

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("PUT", "https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/priority");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/screen-views/%7BscreenViewId%7D/priority",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify(99));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/priority');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('99');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.put("https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/priority")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("99")
              .asString();
  /schema-service/v2/screen-views/{screenViewId}/name:
    put:
      tags:
        - Screen views
      summary: Rename screen view
      description: |
        Update the name of a screen view. You can update the names of active screen views.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: updateNameOfScreenView
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: update screenview name
              type: string
              description: New name for the screen view
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/updateNameOfScreenView
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/name \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '"string"'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "\"string\""

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("PUT", "/schema-service/v2/screen-views/%7BscreenViewId%7D/name", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify("string");

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("PUT", "https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/name");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/screen-views/%7BscreenViewId%7D/name",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify('string'));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/name');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('"string"');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.put("https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/name")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("\"string\"")
              .asString();
  /schema-service/v2/screen-views/{feedSlug}/generate/by/{identifierType}:
    post:
      tags:
        - Screen views
      summary: Preview screen view with a profile context
      description: |
        This endpoint can be used to preview a generated document as a Workspace or Synerise User. To generate the output as a profile (client), use one of the following methods:
        - [POST `/v3/screen-views/{feedSlug}/generate`](#operation/generateScreenViewByFeedPostV2)
        - [GET `/v3/screen-views/{feedSlug}/generate`](#operation/generateScreenViewByFeedGetV2)


        When this method is called, the Synerise backend finds all screen view campaigns in the requested feed which are applicable to the profile and returns the screen view with the highest priority (1). Inserts are processed. If an insert can't be processed, the returned `data` is empty.


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`

        **User role permission required:** `assets_docs: read`
      operationId: generateScreenViewByIdentifierPostV2
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathFeedSlug"
        - $ref: "#/components/parameters/schema-service-pathIdentifierType"
      requestBody:
        content:
          application/json:
            schema:
              title: Generate Screen View Request Data
              type: object
              required:
                - identifierValue
              properties:
                identifierValue:
                  $ref: "#/components/schemas/schema-service-identifierValue"
                params:
                  type: object
                  description: Additional parameters
                  additionalProperties:
                    $ref: "#/components/schemas/schema-service-additionalPropertiesForGenerate"
      responses:
        "200":
          description: Processed JSON content
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-GenerateResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/generateScreenViewByIdentifierPostV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/screen-views/%7BfeedSlug%7D/generate/by/%7BidentifierType%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"identifierValue":"string","params":{"property1":"string","property2":"string"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"identifierValue\":\"string\",\"params\":{\"property1\":\"string\",\"property2\":\"string\"}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/schema-service/v2/screen-views/%7BfeedSlug%7D/generate/by/%7BidentifierType%7D", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "identifierValue": "string",
              "params": {
                "property1": "string",
                "property2": "string"
              }
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/schema-service/v2/screen-views/%7BfeedSlug%7D/generate/by/%7BidentifierType%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/screen-views/%7BfeedSlug%7D/generate/by/%7BidentifierType%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({identifierValue: 'string', params: {property1: 'string', property2: 'string'}}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BfeedSlug%7D/generate/by/%7BidentifierType%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"identifierValue":"string","params":{"property1":"string","property2":"string"}}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/schema-service/v2/screen-views/%7BfeedSlug%7D/generate/by/%7BidentifierType%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"identifierValue\":\"string\",\"params\":{\"property1\":\"string\",\"property2\":\"string\"}}")
              .asString();
  /schema-service/v2/screen-views/feeds:
    get:
      tags:
        - Screen views
      summary: List screen view feeds
      description: |
        Returns a list of screen view feeds.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: feed-list
      security:
        - JWT: []
      responses:
        "200":
          description: List of feeds
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/schema-service-Feed"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/feed-list
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/v2/screen-views/feeds \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/schema-service/v2/screen-views/feeds", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/schema-service/v2/screen-views/feeds");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/screen-views/feeds",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/feeds');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/schema-service/v2/screen-views/feeds")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - Screen views
      summary: Create screen view feed
      description: |
        Create a new screen view feed.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: add-feed
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-ScreenViewFeed"
      responses:
        "200":
          description: Feed created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-Feed"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/add-feed
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/screen-views/feeds \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"slug":"string","name":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"slug\":\"string\",\"name\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/schema-service/v2/screen-views/feeds", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "slug": "string",
              "name": "string"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/schema-service/v2/screen-views/feeds");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/screen-views/feeds",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({slug: 'string', name: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/feeds');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"slug":"string","name":"string"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/schema-service/v2/screen-views/feeds")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"slug\":\"string\",\"name\":\"string\"}")
              .asString();
  /schema-service/v2/screen-views:
    get:
      tags:
        - Screen views
      summary: List screen views
      description: |
        Returns a paginated list of screen views.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-queryPage"
        - $ref: "#/components/parameters/schema-service-queryLimit"
        - $ref: "#/components/parameters/schema-service-querySearch"
        - $ref: "#/components/parameters/schema-service-queryDirectoryId"
        - $ref: "#/components/parameters/schema-service-queryStatus"
        - $ref: "#/components/parameters/schema-service-queryFeedId"
      responses:
        "200":
          description: List of screen views
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-ScreenViewsListResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      operationId: screen-views-list
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/screen-views-list
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/schema-service/v2/screen-views?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&status=SOME_STRING_VALUE&feedId=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/schema-service/v2/screen-views?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&status=SOME_STRING_VALUE&feedId=SOME_STRING_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/schema-service/v2/screen-views?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&status=SOME_STRING_VALUE&feedId=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/screen-views?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&status=SOME_STRING_VALUE&feedId=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_NUMBER_VALUE',
              'limit' => 'SOME_NUMBER_VALUE',
              'search' => 'SOME_STRING_VALUE',
              'directoryId' => 'SOME_STRING_VALUE',
              'status' => 'SOME_STRING_VALUE',
              'feedId' => 'SOME_STRING_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/schema-service/v2/screen-views?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&status=SOME_STRING_VALUE&feedId=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/screen-views/{screenViewId}:
    get:
      tags:
        - Screen views
      summary: Get screen view
      description: |
        Retrieve the details of a screen view.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`

        **User role permission required:** `assets_docs: read`
      operationId: get-screen-view
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
      responses:
        "200":
          description: Details of the screen view
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-screenView"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/get-screen-view
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/schema-service/v2/screen-views/%7BscreenViewId%7D", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/screen-views/%7BscreenViewId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    delete:
      tags:
        - Screen views
      summary: Delete screen view
      description: |
        Delete a screen view.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_DELETE`

        **User role permission required:** `assets_docs: delete`
      operationId: delete-screen-view
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
      responses:
        "200":
          description: Screen view deleted
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/delete-screen-view
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("DELETE", "/schema-service/v2/screen-views/%7BscreenViewId%7D", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("DELETE", "https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/screen-views/%7BscreenViewId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/screen-views/{screenViewId}/copy:
    post:
      tags:
        - Screen views
      summary: Copy screen view
      description: |
        Copy a screen view. The copy receives the DRAFT status, regardless of the status of the original screen view.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: copy-screen-view
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
      responses:
        "200":
          description: Data of the created copy
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-screenViewMetadata"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/copy-screen-view
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/copy \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("POST", "/schema-service/v2/screen-views/%7BscreenViewId%7D/copy", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/copy");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/screen-views/%7BscreenViewId%7D/copy",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/copy');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/copy")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/screen-views/{screenViewId}/predecessors:
    get:
      tags:
        - Screen views
      summary: Get predecessors for screen view
      description: |
        Retrieve information about documents or screen views that refer **to** the requested screen view.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`

        **User role permission required:** `assets_docs: read`
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
      responses:
        "200":
          description: Entities which refer to the requested screen view
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/schema-service-GraphObject"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      operationId: screenview-predecessors-get
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/screenview-predecessors-get
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/predecessors \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/schema-service/v2/screen-views/%7BscreenViewId%7D/predecessors", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/predecessors");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/screen-views/%7BscreenViewId%7D/predecessors",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/predecessors');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/predecessors")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/screen-views/{screenViewId}/successors:
    get:
      tags:
        - Screen views
      summary: Get successors for screen view
      description: |
        Retrieve information about documents referenced **from** the requested screen view.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`

        **User role permission required:** `assets_docs: read`
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
      responses:
        "200":
          description: Documents referenced from the requested screen view
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/schema-service-GraphObject"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      operationId: screenview-successors-get
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/screenview-successors-get
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/successors \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/schema-service/v2/screen-views/%7BscreenViewId%7D/successors", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/successors");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/screen-views/%7BscreenViewId%7D/successors",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/successors');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/successors")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/screen-views/directory:
    get:
      tags:
        - Screen views
      summary: List screen view directories
      description: |
        Returns a list of screen view directories.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      security:
        - JWT: []
      responses:
        "200":
          description: List of directories
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/schema-service-Directory"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      operationId: directory-list
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/directory-list
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/v2/screen-views/directory \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/schema-service/v2/screen-views/directory", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/schema-service/v2/screen-views/directory");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/screen-views/directory",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/directory');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/schema-service/v2/screen-views/directory")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - Screen views
      summary: Add screen view directory
      description: |
        Create a directory for screen views.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: add-directory
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-NewDirectory"
      responses:
        "200":
          description: Directory created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-Directory"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/add-directory
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/screen-views/directory \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"name\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/schema-service/v2/screen-views/directory", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "name": "string"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/schema-service/v2/screen-views/directory");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/screen-views/directory",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({name: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/directory');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"name":"string"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/schema-service/v2/screen-views/directory")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\"}")
              .asString();
  /schema-service/v2/screen-views/directory/{directoryId}:
    post:
      tags:
        - Screen views
      summary: Rename screen view directory
      description: |
        Update the name of a screen view directory.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_DELETE`

        **User role permission required:** `assets_docs: delete`
      operationId: update-name-directory
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathDirectoryId"
      requestBody:
        content:
          application/json:
            schema:
              title: update screenview directory name
              type: object
              required:
                - name
              properties:
                name:
                  type: string
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-Directory"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/update-name-directory
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/screen-views/directory/%7BdirectoryId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"name\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/schema-service/v2/screen-views/directory/%7BdirectoryId%7D", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "name": "string"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/schema-service/v2/screen-views/directory/%7BdirectoryId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/screen-views/directory/%7BdirectoryId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({name: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/directory/%7BdirectoryId%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"name":"string"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/schema-service/v2/screen-views/directory/%7BdirectoryId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\"}")
              .asString();
    delete:
      tags:
        - Screen views
      summary: Delete screen view directory
      description: |
        Delete a screen view directory. The contents are moved into the default directory.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_DELETE`

        **User role permission required:** `assets_docs: delete`
      operationId: deleteDirectory
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathDirectoryId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-Directory"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/deleteDirectory
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/schema-service/v2/screen-views/directory/%7BdirectoryId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("DELETE", "/schema-service/v2/screen-views/directory/%7BdirectoryId%7D", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("DELETE", "https://api.synerise.com/schema-service/v2/screen-views/directory/%7BdirectoryId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/screen-views/directory/%7BdirectoryId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/directory/%7BdirectoryId%7D');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/schema-service/v2/screen-views/directory/%7BdirectoryId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/screen-views/{screenViewId}/directory/{directoryId}/attach:
    post:
      tags:
        - Screen views
      summary: Assign screen view to directory
      description: |
        Assign a screen view to a directory. A screen view can only belong to one directory and using this endpoint overwrites the current assignment.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_DELETE`

        **User role permission required:** `assets_docs: delete`
      operationId: attach-screen-views-to-directory
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
        - $ref: "#/components/parameters/schema-service-pathDirectoryId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-DocumentMetadata"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/attach-screen-views-to-directory
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/directory/%7BdirectoryId%7D/attach \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("POST", "/schema-service/v2/screen-views/%7BscreenViewId%7D/directory/%7BdirectoryId%7D/attach", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/directory/%7BdirectoryId%7D/attach");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/screen-views/%7BscreenViewId%7D/directory/%7BdirectoryId%7D/attach",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/directory/%7BdirectoryId%7D/attach');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/directory/%7BdirectoryId%7D/attach")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/screen-views/{screenViewId}/feed:
    post:
      tags:
        - Screen views
      summary: Assign screen view to feed
      description: |
        Assign a screen view to a feed.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: create-screen-view-feed
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
      requestBody:
        content:
          application/json:
            schema:
              type: string
              format: uuid
              description: UUID of the feed to which you want to assign the screen view
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/create-screen-view-feed
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/feed \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '"497f6eca-6276-4993-bfeb-53cbbbba6f08"'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "\"497f6eca-6276-4993-bfeb-53cbbbba6f08\""

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/schema-service/v2/screen-views/%7BscreenViewId%7D/feed", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify("497f6eca-6276-4993-bfeb-53cbbbba6f08");

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/feed");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/screen-views/%7BscreenViewId%7D/feed",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify('497f6eca-6276-4993-bfeb-53cbbbba6f08'));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/feed');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('"497f6eca-6276-4993-bfeb-53cbbbba6f08"');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/feed")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"")
              .asString();
  /schema-service/v2/screen-views/feeds/{feedId}:
    post:
      tags:
        - Screen views
      summary: Rename screen view feed
      description: |
        Update the name of a screen view feed.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: update-name-feed
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathFeedId"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  description: New name of the feed
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-Directory"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/update-name-feed
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/screen-views/feeds/%7BfeedId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"name\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/schema-service/v2/screen-views/feeds/%7BfeedId%7D", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "name": "string"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/schema-service/v2/screen-views/feeds/%7BfeedId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/screen-views/feeds/%7BfeedId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({name: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/feeds/%7BfeedId%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"name":"string"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/schema-service/v2/screen-views/feeds/%7BfeedId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\"}")
              .asString();
    delete:
      tags:
        - Screen views
      summary: Delete screen view feed
      description: |
        Delete a screen view feed. The screen views currently in this feed are moved to the default feed.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_DELETE`

        **User role permission required:** `assets_docs: delete`
      operationId: deleteFeed
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathFeedId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-Feed"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/deleteFeed
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/schema-service/v2/screen-views/feeds/%7BfeedId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("DELETE", "/schema-service/v2/screen-views/feeds/%7BfeedId%7D", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("DELETE", "https://api.synerise.com/schema-service/v2/screen-views/feeds/%7BfeedId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/screen-views/feeds/%7BfeedId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/feeds/%7BfeedId%7D');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/schema-service/v2/screen-views/feeds/%7BfeedId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/scheduler/entry:
    post:
      tags:
        - Screen views
      summary: Schedule object
      description: |
        Add a schedule to a document or screen view.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: schedule-object
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-SchedulerRequest"
      responses:
        "200":
          description: Schedule added
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-SchedulerResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/schedule-object
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/scheduler/entry \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"externalId":"3200d382-adfe-4314-ab30-798cdd0fcdb5","type":"SCREENVIEW","schedule":{"enabled":true,"endDate":"2019-08-24T14:15:22Z","endType":"NEVER","parts":[{"startDay":1,"startTime":"08:18:03","endDay":1,"endTime":44283}],"periodType":"ENTIRE","startDate":"2019-08-24T14:15:22Z","startType":"NOW","timezone":"Europe/Warsaw"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"externalId\":\"3200d382-adfe-4314-ab30-798cdd0fcdb5\",\"type\":\"SCREENVIEW\",\"schedule\":{\"enabled\":true,\"endDate\":\"2019-08-24T14:15:22Z\",\"endType\":\"NEVER\",\"parts\":[{\"startDay\":1,\"startTime\":\"08:18:03\",\"endDay\":1,\"endTime\":44283}],\"periodType\":\"ENTIRE\",\"startDate\":\"2019-08-24T14:15:22Z\",\"startType\":\"NOW\",\"timezone\":\"Europe/Warsaw\"}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/schema-service/scheduler/entry", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "externalId": "3200d382-adfe-4314-ab30-798cdd0fcdb5",
              "type": "SCREENVIEW",
              "schedule": {
                "enabled": true,
                "endDate": "2019-08-24T14:15:22Z",
                "endType": "NEVER",
                "parts": [
                  {
                    "startDay": 1,
                    "startTime": "08:18:03",
                    "endDay": 1,
                    "endTime": 44283
                  }
                ],
                "periodType": "ENTIRE",
                "startDate": "2019-08-24T14:15:22Z",
                "startType": "NOW",
                "timezone": "Europe/Warsaw"
              }
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/schema-service/scheduler/entry");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/scheduler/entry",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              externalId: '3200d382-adfe-4314-ab30-798cdd0fcdb5',
              type: 'SCREENVIEW',
              schedule: {
                enabled: true,
                endDate: '2019-08-24T14:15:22Z',
                endType: 'NEVER',
                parts: [{startDay: 1, startTime: '08:18:03', endDay: 1, endTime: 44283}],
                periodType: 'ENTIRE',
                startDate: '2019-08-24T14:15:22Z',
                startType: 'NOW',
                timezone: 'Europe/Warsaw'
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/scheduler/entry');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"externalId":"3200d382-adfe-4314-ab30-798cdd0fcdb5","type":"SCREENVIEW","schedule":{"enabled":true,"endDate":"2019-08-24T14:15:22Z","endType":"NEVER","parts":[{"startDay":1,"startTime":"08:18:03","endDay":1,"endTime":44283}],"periodType":"ENTIRE","startDate":"2019-08-24T14:15:22Z","startType":"NOW","timezone":"Europe/Warsaw"}}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/schema-service/scheduler/entry")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"externalId\":\"3200d382-adfe-4314-ab30-798cdd0fcdb5\",\"type\":\"SCREENVIEW\",\"schedule\":{\"enabled\":true,\"endDate\":\"2019-08-24T14:15:22Z\",\"endType\":\"NEVER\",\"parts\":[{\"startDay\":1,\"startTime\":\"08:18:03\",\"endDay\":1,\"endTime\":44283}],\"periodType\":\"ENTIRE\",\"startDate\":\"2019-08-24T14:15:22Z\",\"startType\":\"NOW\",\"timezone\":\"Europe/Warsaw\"}}")
              .asString();
  /schema-service/scheduler/entry/{objectType}/{objectId}:
    get:
      tags:
        - Screen views
      summary: Get schedule the schedule of an object
      description: |
        Get schedule object.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: getschedule-object
      security:
        - JWT: []
      parameters:
        - name: objectId
          in: path
          required: true
          description: Screen view or document ID
          schema:
            type: string
            format: uuid
        - name: objectType
          in: path
          required: true
          description: Object type
          schema:
            type: string
            description: Type of the scheduled object
            enum:
              - SCREENVIEW
              - DOCUMENT
      responses:
        "200":
          description: Schedule details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-SchedulerResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          description: Object has no schedule; or an exception occurred.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-ErrorSchemaService"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/getschedule-object
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/scheduler/entry/%7BobjectType%7D/%7BobjectId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/schema-service/scheduler/entry/%7BobjectType%7D/%7BobjectId%7D", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/schema-service/scheduler/entry/%7BobjectType%7D/%7BobjectId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/scheduler/entry/%7BobjectType%7D/%7BobjectId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/scheduler/entry/%7BobjectType%7D/%7BobjectId%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/schema-service/scheduler/entry/%7BobjectType%7D/%7BobjectId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/screen-views/{screenViewId}/status/finish:
    post:
      tags:
        - Screen views
      summary: Finish screen view
      description: |
        Finish a screen view. A finished document is no longer displayed.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: finish-screen-view
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/finish-screen-view
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/finish \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("POST", "/schema-service/v2/screen-views/%7BscreenViewId%7D/status/finish", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/finish");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/screen-views/%7BscreenViewId%7D/status/finish",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/finish');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/finish")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/screen-views/{screenViewId}/status/resume:
    post:
      tags:
        - Screen views
      summary: Resume screen view
      description: |
        Resume a screen view that was paused.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: resume-screen-view
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/resume-screen-view
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/resume \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("POST", "/schema-service/v2/screen-views/%7BscreenViewId%7D/status/resume", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/resume");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/screen-views/%7BscreenViewId%7D/status/resume",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/resume');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/resume")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/screen-views/{screenViewId}/status/activate:
    post:
      tags:
        - Screen views
      summary: Activate screen view
      description: |
        Activate a screen view. It can be displayed to customers.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: activate-screen-view
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/activate-screen-view
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/activate \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("POST", "/schema-service/v2/screen-views/%7BscreenViewId%7D/status/activate", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/activate");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/screen-views/%7BscreenViewId%7D/status/activate",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/activate');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/activate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/screen-views/{screenViewId}/status/pause:
    post:
      tags:
        - Screen views
      summary: Pause screen view
      description: |
        Pause a screen view. Until resumed, it can't be displayed to customers.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: pause-screen-view
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/pause-screen-view
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/pause \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("POST", "/schema-service/v2/screen-views/%7BscreenViewId%7D/status/pause", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/pause");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/screen-views/%7BscreenViewId%7D/status/pause",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/pause');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/pause")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/screenViews:
    get:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Get all screen views
      description: |
        Retrieve a paginated list of all screen view campaigns in the workspace.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`

        **User role permission required:** `assets_docs: read`
      operationId: listOfScreenViews
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-QueryLimitRequired"
        - $ref: "#/components/parameters/schema-service-QueryPageRequired"
        - name: status
          in: query
          required: false
          schema:
            type: string
            enum:
              - DRAFT
              - ACTIVE
              - SCHEDULED
              - PAUSED
              - FINISHED
          description: Filter the results by screen view status
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-paginatedScreenViews"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/listOfScreenViews
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/schema-service/screenViews?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&status=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/schema-service/screenViews?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&status=SOME_STRING_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/schema-service/screenViews?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&status=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/screenViews?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&status=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/screenViews');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'limit' => 'SOME_STRING_VALUE',
              'page' => 'SOME_INTEGER_VALUE',
              'status' => 'SOME_STRING_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/schema-service/screenViews?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&status=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/screenViews/byKeys:
    post:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Get screen views by keys
      description: |
        Retrieve list of screen view campaigns by keys in the workspace.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_docs: read`
      operationId: listOfScreenViewsByKeys
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              title: get screenviews by keys
              type: array
              items:
                type: string
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-paginatedScreenViews"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/listOfScreenViewsByKeys
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/screenViews/byKeys \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '["string"]'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "[\"string\"]"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/schema-service/screenViews/byKeys", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              "string"
            ]);

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/schema-service/screenViews/byKeys");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/screenViews/byKeys",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify(['string']));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/screenViews/byKeys');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('["string"]');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/schema-service/screenViews/byKeys")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[\"string\"]")
              .asString();
  /schema-service/screenViews/single/{screenViewId}/{screenViewVersion}:
    get:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Get screen view
      description: |
        Retrieve the details of a single screen view campaign.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`

        **User role permission required:** `assets_docs: read`
      operationId: getScreenViewByVersion
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
        - $ref: "#/components/parameters/schema-service-pathScreenViewVersion"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-screenViewLegacy"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/getScreenViewByVersion
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/screenViews/versions/{screenViewId}:
    get:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Get screen view versions
      description: |
        Retrieve all versions of a screen view campaign.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`

        **User role permission required:** `assets_docs: read`
      operationId: listOfScreenViewVersions
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
        - $ref: "#/components/parameters/schema-service-QueryLimitRequired"
        - $ref: "#/components/parameters/schema-service-QueryPageRequired"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-versionsOfScreenView"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/listOfScreenViewVersions
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/schema-service/screenViews/versions/%7BscreenViewId%7D?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/schema-service/screenViews/versions/%7BscreenViewId%7D?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/schema-service/screenViews/versions/%7BscreenViewId%7D?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/screenViews/versions/%7BscreenViewId%7D?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/screenViews/versions/%7BscreenViewId%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'limit' => 'SOME_STRING_VALUE',
              'page' => 'SOME_INTEGER_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/schema-service/screenViews/versions/%7BscreenViewId%7D?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/screenViews/generate:
    get:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Generate screen view
      description: |
        When this method is called, the Synerise backend finds all screen view campaigns applicable to the profile and returns the screen view with the highest priority (1).

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: generateScreenViewGet
      security:
        - JWT: []
      responses:
        "200":
          description: Processed JSON content
          content:
            application/json:
              schema:
                type: object
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/generateScreenViewGet
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/screenViews/generate \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/schema-service/screenViews/generate", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/schema-service/screenViews/generate");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/screenViews/generate",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/screenViews/generate');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/schema-service/screenViews/generate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/screenViews/generate:
    get:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Generate screen view
      description: |
        When this method is called, the Synerise backend finds all screen view campaigns applicable to the profile and returns the screen view with the highest priority (1).

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: generateScreenViewWithAdditionalDataGet
      security:
        - JWT: []
      responses:
        "200":
          description: Processed JSON content
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-GenerateScreenViewResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/generateScreenViewWithAdditionalDataGet
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/v2/screenViews/generate \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/schema-service/v2/screenViews/generate", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/schema-service/v2/screenViews/generate");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/screenViews/generate",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screenViews/generate');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/schema-service/v2/screenViews/generate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/screenViews/createNew:
    post:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Initialize screen view
      description: |
        Create a new screen view campaign. It is created as a blank, without any conditions.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_docs: create`
      operationId: initializeScreenViewPost
      security:
        - JWT: []
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-screenViewMetadata"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/initializeScreenViewPost
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/screenViews/createNew \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("POST", "/schema-service/screenViews/createNew", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/schema-service/screenViews/createNew");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/screenViews/createNew",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/screenViews/createNew');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/schema-service/screenViews/createNew")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/screenViews/content/{screenViewId}/{screenViewVersion}/copyFromExistingScreenView:
    post:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Copy content
      description: |
        Copy content to a screen view draft from another screen view.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_docs: create`
      operationId: copyContent
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
        - $ref: "#/components/parameters/schema-service-pathScreenViewVersion"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-versionedScreenViewKey"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/copyContent
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D/copyFromExistingScreenView \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"screenViewId":"481855c5-f86e-453f-a0fa-d34b5a2be745","screenViewVersion":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"screenViewId\":\"481855c5-f86e-453f-a0fa-d34b5a2be745\",\"screenViewVersion\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D/copyFromExistingScreenView", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "screenViewId": "481855c5-f86e-453f-a0fa-d34b5a2be745",
              "screenViewVersion": "string"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D/copyFromExistingScreenView");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D/copyFromExistingScreenView",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              screenViewId: '481855c5-f86e-453f-a0fa-d34b5a2be745',
              screenViewVersion: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D/copyFromExistingScreenView');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"screenViewId":"481855c5-f86e-453f-a0fa-d34b5a2be745","screenViewVersion":"string"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D/copyFromExistingScreenView")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"screenViewId\":\"481855c5-f86e-453f-a0fa-d34b5a2be745\",\"screenViewVersion\":\"string\"}")
              .asString();
  /schema-service/screenViews/content/{screenViewId}/{screenViewVersion}:
    post:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Add content
      description: |
        Add content to a screen view draft.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_docs: create`
      operationId: createContent
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
        - $ref: "#/components/parameters/schema-service-pathScreenViewVersion"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-ScreenViewContent"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/createContent
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"json":{"property1":null,"property2":null},"documents":["string"],"data":[{"slug":"basket"}],"groups":["43c97b25-4a10-45d0-99b7-d472eea2bb24"],"groupsOrder":false}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"json\":{\"property1\":null,\"property2\":null},\"documents\":[\"string\"],\"data\":[{\"slug\":\"basket\"}],\"groups\":[\"43c97b25-4a10-45d0-99b7-d472eea2bb24\"],\"groupsOrder\":false}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "json": {
                "property1": null,
                "property2": null
              },
              "documents": [
                "string"
              ],
              "data": [
                {
                  "slug": "basket"
                }
              ],
              "groups": [
                "43c97b25-4a10-45d0-99b7-d472eea2bb24"
              ],
              "groupsOrder": false
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              json: {property1: null, property2: null},
              documents: ['string'],
              data: [{slug: 'basket'}],
              groups: ['43c97b25-4a10-45d0-99b7-d472eea2bb24'],
              groupsOrder: false
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"json":{"property1":null,"property2":null},"documents":["string"],"data":[{"slug":"basket"}],"groups":["43c97b25-4a10-45d0-99b7-d472eea2bb24"],"groupsOrder":false}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"json\":{\"property1\":null,\"property2\":null},\"documents\":[\"string\"],\"data\":[{\"slug\":\"basket\"}],\"groups\":[\"43c97b25-4a10-45d0-99b7-d472eea2bb24\"],\"groupsOrder\":false}")
              .asString();
  /schema-service/screenViews/audience/{screenViewId}/{screenViewVersion}:
    post:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Add audience
      description: |
        Define the audience for a screen view draft.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_docs: create`
      operationId: createAudience
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
        - $ref: "#/components/parameters/schema-service-pathScreenViewVersion"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-Audience"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/createAudience
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/screenViews/audience/%7BscreenViewId%7D/%7BscreenViewVersion%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"targetType":"SEGMENT","segments":["string"],"query":"{\"analysis\":{\"title\":\"Unnamed segmentation\",\"description\":\"\",\"unique\":true,\"segments\":[{\"title\":\"Segmentation A\",\"description\":\"\",\"filter\":{\"matching\":true,\"expressions\":[{\"_id\":\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\",\"name\":\"\",\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"_id\":\"5c759d73-49c6-409f-96a3-b569dff8f8ff\",\"title\":\"Unnamed\",\"completedWithin\":null,\"dateFilter\":{\"type\":\"RELATIVE\",\"offset\":{\"type\":\"DAYS\",\"value\":0},\"duration\":{\"type\":\"DAYS\",\"value\":30}},\"steps\":[{\"_id\":\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\",\"title\":\"\",\"action\":{\"id\":944,\"name\":\"page.visit\"},\"eventName\":\"page.visit\",\"expressions\":[]}],\"exact\":false}}]}}]}}"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"targetType\":\"SEGMENT\",\"segments\":[\"string\"],\"query\":\"{\\\"analysis\\\":{\\\"title\\\":\\\"Unnamed segmentation\\\",\\\"description\\\":\\\"\\\",\\\"unique\\\":true,\\\"segments\\\":[{\\\"title\\\":\\\"Segmentation A\\\",\\\"description\\\":\\\"\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"_id\\\":\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"FUNNEL\\\",\\\"matching\\\":true,\\\"funnel\\\":{\\\"_id\\\":\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\",\\\"title\\\":\\\"Unnamed\\\",\\\"completedWithin\\\":null,\\\"dateFilter\\\":{\\\"type\\\":\\\"RELATIVE\\\",\\\"offset\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":0},\\\"duration\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":30}},\\\"steps\\\":[{\\\"_id\\\":\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\",\\\"title\\\":\\\"\\\",\\\"action\\\":{\\\"id\\\":944,\\\"name\\\":\\\"page.visit\\\"},\\\"eventName\\\":\\\"page.visit\\\",\\\"expressions\\\":[]}],\\\"exact\\\":false}}]}}]}}\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/schema-service/screenViews/audience/%7BscreenViewId%7D/%7BscreenViewVersion%7D", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "targetType": "SEGMENT",
              "segments": [
                "string"
              ],
              "query": "{\"analysis\":{\"title\":\"Unnamed segmentation\",\"description\":\"\",\"unique\":true,\"segments\":[{\"title\":\"Segmentation A\",\"description\":\"\",\"filter\":{\"matching\":true,\"expressions\":[{\"_id\":\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\",\"name\":\"\",\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"_id\":\"5c759d73-49c6-409f-96a3-b569dff8f8ff\",\"title\":\"Unnamed\",\"completedWithin\":null,\"dateFilter\":{\"type\":\"RELATIVE\",\"offset\":{\"type\":\"DAYS\",\"value\":0},\"duration\":{\"type\":\"DAYS\",\"value\":30}},\"steps\":[{\"_id\":\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\",\"title\":\"\",\"action\":{\"id\":944,\"name\":\"page.visit\"},\"eventName\":\"page.visit\",\"expressions\":[]}],\"exact\":false}}]}}]}}"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/schema-service/screenViews/audience/%7BscreenViewId%7D/%7BscreenViewVersion%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/screenViews/audience/%7BscreenViewId%7D/%7BscreenViewVersion%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              targetType: 'SEGMENT',
              segments: ['string'],
              query: '{"analysis":{"title":"Unnamed segmentation","description":"","unique":true,"segments":[{"title":"Segmentation A","description":"","filter":{"matching":true,"expressions":[{"_id":"a9b76c8e-34bd-4ac3-be8f-f37041d126bd","name":"","type":"FUNNEL","matching":true,"funnel":{"_id":"5c759d73-49c6-409f-96a3-b569dff8f8ff","title":"Unnamed","completedWithin":null,"dateFilter":{"type":"RELATIVE","offset":{"type":"DAYS","value":0},"duration":{"type":"DAYS","value":30}},"steps":[{"_id":"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff","title":"","action":{"id":944,"name":"page.visit"},"eventName":"page.visit","expressions":[]}],"exact":false}}]}}]}}'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/screenViews/audience/%7BscreenViewId%7D/%7BscreenViewVersion%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"targetType":"SEGMENT","segments":["string"],"query":"{\\"analysis\\":{\\"title\\":\\"Unnamed segmentation\\",\\"description\\":\\"\\",\\"unique\\":true,\\"segments\\":[{\\"title\\":\\"Segmentation A\\",\\"description\\":\\"\\",\\"filter\\":{\\"matching\\":true,\\"expressions\\":[{\\"_id\\":\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\",\\"name\\":\\"\\",\\"type\\":\\"FUNNEL\\",\\"matching\\":true,\\"funnel\\":{\\"_id\\":\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\",\\"title\\":\\"Unnamed\\",\\"completedWithin\\":null,\\"dateFilter\\":{\\"type\\":\\"RELATIVE\\",\\"offset\\":{\\"type\\":\\"DAYS\\",\\"value\\":0},\\"duration\\":{\\"type\\":\\"DAYS\\",\\"value\\":30}},\\"steps\\":[{\\"_id\\":\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\",\\"title\\":\\"\\",\\"action\\":{\\"id\\":944,\\"name\\":\\"page.visit\\"},\\"eventName\\":\\"page.visit\\",\\"expressions\\":[]}],\\"exact\\":false}}]}}]}}"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/schema-service/screenViews/audience/%7BscreenViewId%7D/%7BscreenViewVersion%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"targetType\":\"SEGMENT\",\"segments\":[\"string\"],\"query\":\"{\\\"analysis\\\":{\\\"title\\\":\\\"Unnamed segmentation\\\",\\\"description\\\":\\\"\\\",\\\"unique\\\":true,\\\"segments\\\":[{\\\"title\\\":\\\"Segmentation A\\\",\\\"description\\\":\\\"\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"_id\\\":\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"FUNNEL\\\",\\\"matching\\\":true,\\\"funnel\\\":{\\\"_id\\\":\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\",\\\"title\\\":\\\"Unnamed\\\",\\\"completedWithin\\\":null,\\\"dateFilter\\\":{\\\"type\\\":\\\"RELATIVE\\\",\\\"offset\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":0},\\\"duration\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":30}},\\\"steps\\\":[{\\\"_id\\\":\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\",\\\"title\\\":\\\"\\\",\\\"action\\\":{\\\"id\\\":944,\\\"name\\\":\\\"page.visit\\\"},\\\"eventName\\\":\\\"page.visit\\\",\\\"expressions\\\":[]}],\\\"exact\\\":false}}]}}]}}\"}")
              .asString();
  /schema-service/screenViews/publish/{screenViewId}/{screenViewVersion}:
    post:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Publish screen view
      description: |
        Make the screen view accessible to customers.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_docs: create`
      operationId: publishScreenView
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
        - $ref: "#/components/parameters/schema-service-pathScreenViewVersion"
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-publishRequest"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/publishScreenView
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/screenViews/publish/%7BscreenViewId%7D/%7BscreenViewVersion%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"overwrite":true}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"overwrite\":true}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/schema-service/screenViews/publish/%7BscreenViewId%7D/%7BscreenViewVersion%7D", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "overwrite": true
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/schema-service/screenViews/publish/%7BscreenViewId%7D/%7BscreenViewVersion%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/screenViews/publish/%7BscreenViewId%7D/%7BscreenViewVersion%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({overwrite: true}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/screenViews/publish/%7BscreenViewId%7D/%7BscreenViewVersion%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"overwrite":true}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/schema-service/screenViews/publish/%7BscreenViewId%7D/%7BscreenViewVersion%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"overwrite\":true}")
              .asString();
  /schema-service/screenViews/copyDraftFromExistingScreenView:
    post:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Copy draft from existing screen view
      description: |
        Copy a duplicate of an active screen view. The duplicate is in draft status.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_docs: create`
      operationId: copyDraftFromExistingScreenView
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-versionedScreenViewKey"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-screenViewMetadata"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/copyDraftFromExistingScreenView
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/screenViews/copyDraftFromExistingScreenView \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"screenViewId":"481855c5-f86e-453f-a0fa-d34b5a2be745","screenViewVersion":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"screenViewId\":\"481855c5-f86e-453f-a0fa-d34b5a2be745\",\"screenViewVersion\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/schema-service/screenViews/copyDraftFromExistingScreenView", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "screenViewId": "481855c5-f86e-453f-a0fa-d34b5a2be745",
              "screenViewVersion": "string"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/schema-service/screenViews/copyDraftFromExistingScreenView");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/screenViews/copyDraftFromExistingScreenView",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              screenViewId: '481855c5-f86e-453f-a0fa-d34b5a2be745',
              screenViewVersion: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/screenViews/copyDraftFromExistingScreenView');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"screenViewId":"481855c5-f86e-453f-a0fa-d34b5a2be745","screenViewVersion":"string"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/schema-service/screenViews/copyDraftFromExistingScreenView")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"screenViewId\":\"481855c5-f86e-453f-a0fa-d34b5a2be745\",\"screenViewVersion\":\"string\"}")
              .asString();
  /schema-service/screenViews/createDraftFromExistingScreenView:
    post:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Create draft from existing screen view
      description: |
        Create a duplicate of an active screen view. The duplicate is in draft status.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_docs: create`
      operationId: createDraftFromExistingScreenView
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-versionedScreenViewKey"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-screenViewMetadata"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/createDraftFromExistingScreenView
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/screenViews/createDraftFromExistingScreenView \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"screenViewId":"481855c5-f86e-453f-a0fa-d34b5a2be745","screenViewVersion":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"screenViewId\":\"481855c5-f86e-453f-a0fa-d34b5a2be745\",\"screenViewVersion\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/schema-service/screenViews/createDraftFromExistingScreenView", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "screenViewId": "481855c5-f86e-453f-a0fa-d34b5a2be745",
              "screenViewVersion": "string"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/schema-service/screenViews/createDraftFromExistingScreenView");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/screenViews/createDraftFromExistingScreenView",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              screenViewId: '481855c5-f86e-453f-a0fa-d34b5a2be745',
              screenViewVersion: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/screenViews/createDraftFromExistingScreenView');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"screenViewId":"481855c5-f86e-453f-a0fa-d34b5a2be745","screenViewVersion":"string"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/schema-service/screenViews/createDraftFromExistingScreenView")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"screenViewId\":\"481855c5-f86e-453f-a0fa-d34b5a2be745\",\"screenViewVersion\":\"string\"}")
              .asString();
  /schema-service/screenViews/single/{screenViewId}/{screenViewVersion}/description:
    put:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Update screen view description
      description: |
        Update the description of a screen view. You can update the descriptions of active screen views.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_docs: create`
      operationId: updateDescriptionOfScreenView
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
        - $ref: "#/components/parameters/schema-service-pathScreenViewVersion"
      requestBody:
        required: false
        content:
          application/json:
            schema:
              title: update screenview description
              type: string
              description: New description of the screen view
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/updateDescriptionOfScreenView
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/description \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '"string"'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "\"string\""

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("PUT", "/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/description", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify("string");

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("PUT", "https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/description");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/description",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify('string'));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/description');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('"string"');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.put("https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/description")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("\"string\"")
              .asString();
  /schema-service/screenViews/single/{screenViewId}/{screenViewVersion}/priority:
    put:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Update screen view priority
      description: |
        Update the priority of a screen view. You can update the priorities of active screen views.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_docs: create`
      operationId: updatePriorityOfScreenView
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
        - $ref: "#/components/parameters/schema-service-pathScreenViewVersion"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: update screenview priority
              type: integer
              description: New priority of the screen view
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/updatePriorityOfScreenView
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/priority \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data 0
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "0"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("PUT", "/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/priority", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify(0);

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("PUT", "https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/priority");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/priority",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/priority');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('0');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.put("https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/priority")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("0")
              .asString();
  /schema-service/screenViews/discardChanges/{screenViewId}/{screenViewVersion}:
    post:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Discard changes
      description: |
        Discard the changes made in a version of a screen view.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_docs: create`
      operationId: discardChanges
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
        - $ref: "#/components/parameters/schema-service-pathScreenViewVersion"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-screenViewLegacy"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/discardChanges
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/screenViews/discardChanges/%7BscreenViewId%7D/%7BscreenViewVersion%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("POST", "/schema-service/screenViews/discardChanges/%7BscreenViewId%7D/%7BscreenViewVersion%7D", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/schema-service/screenViews/discardChanges/%7BscreenViewId%7D/%7BscreenViewVersion%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/screenViews/discardChanges/%7BscreenViewId%7D/%7BscreenViewVersion%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/screenViews/discardChanges/%7BscreenViewId%7D/%7BscreenViewVersion%7D');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/schema-service/screenViews/discardChanges/%7BscreenViewId%7D/%7BscreenViewVersion%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/screenViews/delete/{screenViewId}:
    delete:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Delete screen view
      description: |
        Delete a screen view and all its versions. This operation is irreversible.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_docs: delete`
      operationId: deleteScreenView
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/deleteScreenView
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/schema-service/screenViews/delete/%7BscreenViewId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("DELETE", "/schema-service/screenViews/delete/%7BscreenViewId%7D", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("DELETE", "https://api.synerise.com/schema-service/screenViews/delete/%7BscreenViewId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/screenViews/delete/%7BscreenViewId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/screenViews/delete/%7BscreenViewId%7D');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/schema-service/screenViews/delete/%7BscreenViewId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/screenViews/single/delete/{screenViewId}/{screenViewVersion}:
    delete:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Delete screen view version
      description: |
        Delete a version of a screen view.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_docs: delete`
      operationId: deleteSingleScreenView
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
        - $ref: "#/components/parameters/schema-service-pathScreenViewVersion"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/deleteSingleScreenView
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/schema-service/screenViews/single/delete/%7BscreenViewId%7D/%7BscreenViewVersion%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("DELETE", "/schema-service/screenViews/single/delete/%7BscreenViewId%7D/%7BscreenViewVersion%7D", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("DELETE", "https://api.synerise.com/schema-service/screenViews/single/delete/%7BscreenViewId%7D/%7BscreenViewVersion%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/screenViews/single/delete/%7BscreenViewId%7D/%7BscreenViewVersion%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/screenViews/single/delete/%7BscreenViewId%7D/%7BscreenViewVersion%7D');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/schema-service/screenViews/single/delete/%7BscreenViewId%7D/%7BscreenViewVersion%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/vouchers/item/assign:
    post:
      tags:
        - Vouchers
      summary: Assign a voucher from a pool to Profile
      description: |
        Assign a voucher code from an existing pool to a Profile.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>, <span title="Available only on mobile SDKs">Incognito Profile</span>

        **User role permission required:** `assets_code_pool: create`
      operationId: AssignAVoucherFromAPoolToAClient
      parameters:
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/vouchers-voucherActionRequestAsClientReq"
        required: true
      responses:
        "201":
          description: Code assigned
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    default: Code assigned with success
                  data:
                    $ref: "#/components/schemas/vouchers-data"
        "416":
          description: Range Not Satisfiable
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-voucherResponseMessage"
              example:
                message: Out of scope. Pool is empty.
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/AssignAVoucherFromAPoolToAClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/vouchers/item/assign \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE' \
              --header 'content-type: application/json' \
              --data '{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientUuid":"17243772-008a-42e1-ba37-c3807cebde8f"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"17243772-008a-42e1-ba37-c3807cebde8f\"}"

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/vouchers/item/assign", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "poolUuid": "faec32b0-c343-4362-ba32-c6148c649da4",
              "clientUuid": "17243772-008a-42e1-ba37-c3807cebde8f"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/v4/vouchers/item/assign");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/vouchers/item/assign",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              poolUuid: 'faec32b0-c343-4362-ba32-c6148c649da4',
              clientUuid: '17243772-008a-42e1-ba37-c3807cebde8f'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item/assign');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientUuid":"17243772-008a-42e1-ba37-c3807cebde8f"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/vouchers/item/assign")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"17243772-008a-42e1-ba37-c3807cebde8f\"}")
              .asString();
  /v4/vouchers/item/get-assigned:
    get:
      tags:
        - Vouchers
      summary: Get assigned vouchers
      description: |
        Retrieve all vouchers assigned to a Profile.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>, <span title="Available only on mobile SDKs">Incognito Profile</span>

        **User role permission required:** `assets_code_pool: read`
      operationId: GetAssignedVouchers
      parameters:
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      responses:
        "200":
          description: An array of vouchers
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-vouchersDataList"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/GetAssignedVouchers
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/vouchers/item/get-assigned \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/vouchers/item/get-assigned", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/v4/vouchers/item/get-assigned");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/vouchers/item/get-assigned",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item/get-assigned');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/vouchers/item/get-assigned")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/vouchers/item/get-or-assign:
    post:
      tags:
        - Vouchers
      summary: Get or assign and get voucher as Profile
      description: |
        Retrieve the code assigned to a Profile. If no code was assigned earlier, the method assigns one.


        For each Profile, the same code is retrieved every time. This can be used, for example, to retrieve unique codes used to identify a Profile.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>, <span title="Available only on mobile SDKs">Incognito Profile</span>

        **User role permission required:** `assets_code_pool: read`
      operationId: GetOrAssignAndGetVoucherAsClient
      parameters:
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/vouchers-voucherActionRequestAsClientReq"
        required: true
      responses:
        "200":
          description: Details of the code
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    default: Code found with success
                  data:
                    $ref: "#/components/schemas/vouchers-getOrAssignAndGetVoucherDataRes"
        "416":
          description: Range Not Satisfiable
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-voucherResponseMessage"
              example:
                message: Out of scope. Pool is empty.
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/GetOrAssignAndGetVoucherAsClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/vouchers/item/get-or-assign \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE' \
              --header 'content-type: application/json' \
              --data '{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientUuid":"17243772-008a-42e1-ba37-c3807cebde8f"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"17243772-008a-42e1-ba37-c3807cebde8f\"}"

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/vouchers/item/get-or-assign", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "poolUuid": "faec32b0-c343-4362-ba32-c6148c649da4",
              "clientUuid": "17243772-008a-42e1-ba37-c3807cebde8f"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/v4/vouchers/item/get-or-assign");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/vouchers/item/get-or-assign",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              poolUuid: 'faec32b0-c343-4362-ba32-c6148c649da4',
              clientUuid: '17243772-008a-42e1-ba37-c3807cebde8f'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item/get-or-assign');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientUuid":"17243772-008a-42e1-ba37-c3807cebde8f"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/vouchers/item/get-or-assign")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"17243772-008a-42e1-ba37-c3807cebde8f\"}")
              .asString();
  /v4/vouchers/item:
    post:
      tags:
        - Vouchers
      summary: Create a voucher
      description: |
        Create a single code and store it in a pool.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `VOUCHERS_ITEM_CREATE`

        **User role permission required:** `assets_code_pool: create`
      operationId: CreateAVoucher
      parameters:
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/vouchers-voucherData"
        required: true
      responses:
        "201":
          description: Voucher created
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    default: Create object with success
                  data:
                    $ref: "#/components/schemas/vouchers-data"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/CreateAVoucher
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/vouchers/item \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE' \
              --header 'content-type: application/json' \
              --data '{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientUuid":"07243772-008a-42e1-ba37-c3807cebde8f","clientId":0,"code":"code123","expireIn":"2019-08-24T14:15:22Z","redeemAt":"2019-08-24T14:15:22Z","assignedAt":"2019-08-24T14:15:22Z","status":"ASSIGNED","createdAt":"2019-08-24T14:15:22Z","updatedAt":"2019-08-24T14:15:22Z"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"clientId\":0,\"code\":\"code123\",\"expireIn\":\"2019-08-24T14:15:22Z\",\"redeemAt\":\"2019-08-24T14:15:22Z\",\"assignedAt\":\"2019-08-24T14:15:22Z\",\"status\":\"ASSIGNED\",\"createdAt\":\"2019-08-24T14:15:22Z\",\"updatedAt\":\"2019-08-24T14:15:22Z\"}"

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/vouchers/item", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "poolUuid": "faec32b0-c343-4362-ba32-c6148c649da4",
              "clientUuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "clientId": 0,
              "code": "code123",
              "expireIn": "2019-08-24T14:15:22Z",
              "redeemAt": "2019-08-24T14:15:22Z",
              "assignedAt": "2019-08-24T14:15:22Z",
              "status": "ASSIGNED",
              "createdAt": "2019-08-24T14:15:22Z",
              "updatedAt": "2019-08-24T14:15:22Z"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/v4/vouchers/item");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/vouchers/item",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              poolUuid: 'faec32b0-c343-4362-ba32-c6148c649da4',
              clientUuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              clientId: 0,
              code: 'code123',
              expireIn: '2019-08-24T14:15:22Z',
              redeemAt: '2019-08-24T14:15:22Z',
              assignedAt: '2019-08-24T14:15:22Z',
              status: 'ASSIGNED',
              createdAt: '2019-08-24T14:15:22Z',
              updatedAt: '2019-08-24T14:15:22Z'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientUuid":"07243772-008a-42e1-ba37-c3807cebde8f","clientId":0,"code":"code123","expireIn":"2019-08-24T14:15:22Z","redeemAt":"2019-08-24T14:15:22Z","assignedAt":"2019-08-24T14:15:22Z","status":"ASSIGNED","createdAt":"2019-08-24T14:15:22Z","updatedAt":"2019-08-24T14:15:22Z"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/vouchers/item")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"clientId\":0,\"code\":\"code123\",\"expireIn\":\"2019-08-24T14:15:22Z\",\"redeemAt\":\"2019-08-24T14:15:22Z\",\"assignedAt\":\"2019-08-24T14:15:22Z\",\"status\":\"ASSIGNED\",\"createdAt\":\"2019-08-24T14:15:22Z\",\"updatedAt\":\"2019-08-24T14:15:22Z\"}")
              .asString();
  /v4/vouchers/item/bulk-create:
    post:
      tags:
        - Vouchers
      summary: Bulk create vouchers
      description: |
        Create a number of codes and add them to a pool.

        <span style="color:red"><strong>WARNING:</strong></span> The request body cannot contain more than 10 000 items or exceed 10 MB in size.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `VOUCHERS_ITEM_BULK_CREATE`

        **User role permission required:** `assets_code_pool: create`
      operationId: BulkCreateVouchers
      parameters:
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/vouchers-bulkCreateVouchersReq"
      responses:
        "201":
          description: Vouchers created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/vouchers-bulkCreateResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-voucher-HTTP400Res"
              example:
                message: Data format is not valid
                error:
                  - field: code
                    message: code must be unique
                    validatorKey: not_unique
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/BulkCreateVouchers
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/vouchers/item/bulk-create \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE' \
              --header 'content-type: application/json' \
              --data '{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","codeList":"3845734682364756454534;384574634564545456;567868678345234346748"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"codeList\":\"3845734682364756454534;384574634564545456;567868678345234346748\"}"

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/vouchers/item/bulk-create", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "poolUuid": "faec32b0-c343-4362-ba32-c6148c649da4",
              "codeList": "3845734682364756454534;384574634564545456;567868678345234346748"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/v4/vouchers/item/bulk-create");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/vouchers/item/bulk-create",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              poolUuid: 'faec32b0-c343-4362-ba32-c6148c649da4',
              codeList: '3845734682364756454534;384574634564545456;567868678345234346748'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item/bulk-create');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","codeList":"3845734682364756454534;384574634564545456;567868678345234346748"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/vouchers/item/bulk-create")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"codeList\":\"3845734682364756454534;384574634564545456;567868678345234346748\"}")
              .asString();
  /v4/vouchers/item/list:
    get:
      tags:
        - Vouchers
      summary: List all vouchers
      description: |
        Retrieve all vouchers for a Workspace. You can customize the search.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `VOUCHERS_ITEM_LIST_READ`

        **User role permission required:** `assets_code_pool: read`
      operationId: ListVouchers
      parameters:
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
        - $ref: "#/components/parameters/vouchers-queryLimit"
        - $ref: "#/components/parameters/vouchers-queryPage"
        - $ref: "#/components/parameters/vouchers-queryIncludeMeta"
      responses:
        "200":
          description: An array of vouchers
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-listVouchersSuccessRes"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/ListVouchers
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/vouchers/item/list?limit=100&page=4&includeMeta=false' \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/vouchers/item/list?limit=100&page=4&includeMeta=false", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/v4/vouchers/item/list?limit=100&page=4&includeMeta=false");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/vouchers/item/list?limit=100&page=4&includeMeta=false",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item/list');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'limit' => '100',
              'page' => '4',
              'includeMeta' => 'false'
            ]);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/vouchers/item/list?limit=100&page=4&includeMeta=false")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/vouchers/item/{voucherUuid}:
    get:
      tags:
        - Vouchers
      summary: View voucher details
      description: |
        Retrieve all details of a single code.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `VOUCHERS_ITEM_READ`

        **User role permission required:** `assets_code_pool: read`
      operationId: ViewVoucherDetails
      parameters:
        - $ref: "#/components/parameters/vouchers-pathVoucherUuid"
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      responses:
        "200":
          description: Details of a voucher
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/vouchers-voucherData"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/ViewVoucherDetails
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173 \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    put:
      tags:
        - Vouchers
      summary: Update a voucher
      description: |
        Update an existing code.


        If you don't want to change a field, omit it entirely. Sending a null-value field replaces an existing value.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `VOUCHERS_ITEM_UPDATE`

        **User role permission required:** `assets_code_pool: update`
      operationId: UpdateAVoucher
      parameters:
        - $ref: "#/components/parameters/vouchers-pathVoucherUuid"
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/vouchers-voucherData"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    default: Update object with success
                  data:
                    $ref: "#/components/schemas/vouchers-data"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-voucher-HTTP400Res"
              example:
                message: Data format is not valid
                error:
                  - field: status
                    message: Validation isIn on status failed
                    validatorKey: isIn
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/UpdateAVoucher
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173 \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE' \
              --header 'content-type: application/json' \
              --data '{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientUuid":"07243772-008a-42e1-ba37-c3807cebde8f","clientId":0,"code":"code123","expireIn":"2019-08-24T14:15:22Z","redeemAt":"2019-08-24T14:15:22Z","assignedAt":"2019-08-24T14:15:22Z","status":"ASSIGNED","createdAt":"2019-08-24T14:15:22Z","updatedAt":"2019-08-24T14:15:22Z"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"clientId\":0,\"code\":\"code123\",\"expireIn\":\"2019-08-24T14:15:22Z\",\"redeemAt\":\"2019-08-24T14:15:22Z\",\"assignedAt\":\"2019-08-24T14:15:22Z\",\"status\":\"ASSIGNED\",\"createdAt\":\"2019-08-24T14:15:22Z\",\"updatedAt\":\"2019-08-24T14:15:22Z\"}"

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("PUT", "/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "poolUuid": "faec32b0-c343-4362-ba32-c6148c649da4",
              "clientUuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "clientId": 0,
              "code": "code123",
              "expireIn": "2019-08-24T14:15:22Z",
              "redeemAt": "2019-08-24T14:15:22Z",
              "assignedAt": "2019-08-24T14:15:22Z",
              "status": "ASSIGNED",
              "createdAt": "2019-08-24T14:15:22Z",
              "updatedAt": "2019-08-24T14:15:22Z"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("PUT", "https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              poolUuid: 'faec32b0-c343-4362-ba32-c6148c649da4',
              clientUuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              clientId: 0,
              code: 'code123',
              expireIn: '2019-08-24T14:15:22Z',
              redeemAt: '2019-08-24T14:15:22Z',
              assignedAt: '2019-08-24T14:15:22Z',
              status: 'ASSIGNED',
              createdAt: '2019-08-24T14:15:22Z',
              updatedAt: '2019-08-24T14:15:22Z'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientUuid":"07243772-008a-42e1-ba37-c3807cebde8f","clientId":0,"code":"code123","expireIn":"2019-08-24T14:15:22Z","redeemAt":"2019-08-24T14:15:22Z","assignedAt":"2019-08-24T14:15:22Z","status":"ASSIGNED","createdAt":"2019-08-24T14:15:22Z","updatedAt":"2019-08-24T14:15:22Z"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.put("https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"clientId\":0,\"code\":\"code123\",\"expireIn\":\"2019-08-24T14:15:22Z\",\"redeemAt\":\"2019-08-24T14:15:22Z\",\"assignedAt\":\"2019-08-24T14:15:22Z\",\"status\":\"ASSIGNED\",\"createdAt\":\"2019-08-24T14:15:22Z\",\"updatedAt\":\"2019-08-24T14:15:22Z\"}")
              .asString();
    delete:
      tags:
        - Vouchers
      summary: Delete a voucher
      description: |
        Delete an existing code.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `VOUCHERS_ITEM_DELETE`

        **User role permission required:** `assets_code_pool: delete`
      operationId: DeleteAVoucher
      parameters:
        - $ref: "#/components/parameters/vouchers-pathVoucherUuid"
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      responses:
        "200":
          description: Voucher deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    default: Delete object with success
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/DeleteAVoucher
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173 \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("DELETE", "/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("DELETE", "https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/vouchers/item/{searchKey}/{searchValue}:
    get:
      tags:
        - Vouchers
      summary: View voucher details by search key
      description: |
        Retrieve all details of a single voucher. As the key (identifier), you can use the promotion's code or UUID.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `VOUCHERS_ITEM_BY_SEARCH_KEY_READ`

        **User role permission required:** `assets_code_pool: read`
      operationId: ViewVoucherDetailsBySearchKey
      parameters:
        - $ref: "#/components/parameters/vouchers-pathVoucherSearchKey"
        - $ref: "#/components/parameters/vouchers-pathVoucherSearchValue"
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      responses:
        "200":
          description: Details of a voucher
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/vouchers-voucherData"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/ViewVoucherDetailsBySearchKey
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/vouchers/item/code/29392878-d43f-402e-8297-f63d465cf173 \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/vouchers/item/code/29392878-d43f-402e-8297-f63d465cf173", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/v4/vouchers/item/code/29392878-d43f-402e-8297-f63d465cf173");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/vouchers/item/code/29392878-d43f-402e-8297-f63d465cf173",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item/code/29392878-d43f-402e-8297-f63d465cf173');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/vouchers/item/code/29392878-d43f-402e-8297-f63d465cf173")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/vouchers/item/assign-for-client:
    post:
      tags:
        - Vouchers
      summary: Assign a voucher to a Profile
      description: |
        Assign a code to a Profile and retrieve it. Every time this method is used, a different code is assigned.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `VOUCHERS_ITEM_ASSIGN_FOR_CLIENT_CREATE`

        **User role permission required:** `assets_code_pool: create`
      operationId: AssignAVoucherToAClient
      parameters:
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/vouchers-voucherActionRequestAsProfileReq"
        required: true
      responses:
        "201":
          description: Voucher assigned
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    default: Code assigned with success
                  data:
                    $ref: "#/components/schemas/vouchers-getOrAssignAndGetVoucherDataRes"
        "416":
          description: Pool empty, expired, not found, or Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-voucher-HTTP400Res"
              example:
                message: Pool does not exist or expired
                error:
                  message: Pool does not exist or expired
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/AssignAVoucherToAClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/vouchers/item/assign-for-client \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE' \
              --header 'content-type: application/json' \
              --data '{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientUuid":"07243772-008a-42e1-ba37-c3807cebde8f"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}"

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/vouchers/item/assign-for-client", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "poolUuid": "faec32b0-c343-4362-ba32-c6148c649da4",
              "clientUuid": "07243772-008a-42e1-ba37-c3807cebde8f"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/v4/vouchers/item/assign-for-client");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/vouchers/item/assign-for-client",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              poolUuid: 'faec32b0-c343-4362-ba32-c6148c649da4',
              clientUuid: '07243772-008a-42e1-ba37-c3807cebde8f'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item/assign-for-client');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientUuid":"07243772-008a-42e1-ba37-c3807cebde8f"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/vouchers/item/assign-for-client")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}")
              .asString();
  /v4/vouchers/item/get-assigned-for-client/{clientUuid}:
    get:
      deprecated: true
      tags:
        - Vouchers
      summary: Get vouchers assigned to a Profile
      description: |
        Get all codes assigned to a Profile.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `VOUCHERS_ITEM_ASSIGN_FOR_CLIENT_READ`

        **User role permission required:** `assets_code_pool: read`
      operationId: GetVouchersAssignedToAClient
      parameters:
        - $ref: "#/components/parameters/vouchers-pathClientUuid"
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      responses:
        "200":
          description: An array of vouchers
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-vouchersDataList"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/GetVouchersAssignedToAClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/vouchers/item/get-assigned-for-client/e9e6840b-b9d4-4c7b-8191-9c4f9e751c76 \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/vouchers/item/get-assigned-for-client/e9e6840b-b9d4-4c7b-8191-9c4f9e751c76", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/v4/vouchers/item/get-assigned-for-client/e9e6840b-b9d4-4c7b-8191-9c4f9e751c76");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/vouchers/item/get-assigned-for-client/e9e6840b-b9d4-4c7b-8191-9c4f9e751c76",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item/get-assigned-for-client/e9e6840b-b9d4-4c7b-8191-9c4f9e751c76');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/vouchers/item/get-assigned-for-client/e9e6840b-b9d4-4c7b-8191-9c4f9e751c76")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/vouchers/item/get-or-assign-for-client:
    post:
      deprecated: true
      tags:
        - Vouchers
      summary: Get or assign and get voucher as Workspace
      description: |
        Retrieve the code assigned to a profile. If no code was assigned earlier, the method assigns one.


        For each profile, the same code is retrieved every time. This can be used, for example, to retrieve unique codes used to identify a profile.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `VOUCHERS_ITEM_ASSIGN_FOR_CLIENT_CREATE`

        **User role permission required:** `assets_code_pool: create`
      operationId: GetOrAssignAndGetVoucherAsBusinessProfile
      parameters:
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/vouchers-voucherActionRequestAsProfileReq"
        required: true
      responses:
        "200":
          description: Details of a voucher
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/vouchers-getOrAssignAndGetVoucherDataRes"
        "416":
          description: Pool empty, expired, not found, or Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-voucher-HTTP400Res"
              example:
                message: Pool does not exist or expired
                error:
                  message: Pool does not exist or expired
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/GetOrAssignAndGetVoucherAsBusinessProfile
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/vouchers/item/get-or-assign-for-client \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE' \
              --header 'content-type: application/json' \
              --data '{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientUuid":"07243772-008a-42e1-ba37-c3807cebde8f"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}"

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/vouchers/item/get-or-assign-for-client", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "poolUuid": "faec32b0-c343-4362-ba32-c6148c649da4",
              "clientUuid": "07243772-008a-42e1-ba37-c3807cebde8f"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/v4/vouchers/item/get-or-assign-for-client");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/vouchers/item/get-or-assign-for-client",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              poolUuid: 'faec32b0-c343-4362-ba32-c6148c649da4',
              clientUuid: '07243772-008a-42e1-ba37-c3807cebde8f'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item/get-or-assign-for-client');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientUuid":"07243772-008a-42e1-ba37-c3807cebde8f"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/vouchers/item/get-or-assign-for-client")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}")
              .asString();
  /v4/vouchers/item/get-assigned-for-client/by-identifier:
    get:
      tags:
        - Vouchers
      summary: Get vouchers assigned to a Profile by identifier
      description: |
        Get all codes assigned to a Profile.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `VOUCHERS_ITEM_ASSIGN_FOR_CLIENT_READ`

        **User role permission required:** `assets_code_pool: read`
      operationId: GetVouchersAssignedToAClientByIdentifier
      parameters:
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
        - $ref: "#/components/parameters/vouchers-queryClientIdentifierName"
        - $ref: "#/components/parameters/vouchers-queryClientIdentifierValue"
      responses:
        "200":
          description: An array of vouchers
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-vouchersDataList"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-voucher-HTTP400Res"
              example:
                message: Query params are not valid
        "416":
          description: Invalid parameter
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-voucher-HTTP400Res"
              example:
                message: Invalid parameter
                error:
                  message: Invalid parameter
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/GetVouchersAssignedToAClientByIdentifier
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/vouchers/item/get-assigned-for-client/by-identifier?clientIdentifierName=custom_identify&clientIdentifierValue=custom_identify_123456' \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/vouchers/item/get-assigned-for-client/by-identifier?clientIdentifierName=custom_identify&clientIdentifierValue=custom_identify_123456", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/v4/vouchers/item/get-assigned-for-client/by-identifier?clientIdentifierName=custom_identify&clientIdentifierValue=custom_identify_123456");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/vouchers/item/get-assigned-for-client/by-identifier?clientIdentifierName=custom_identify&clientIdentifierValue=custom_identify_123456",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item/get-assigned-for-client/by-identifier');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'clientIdentifierName' => 'custom_identify',
              'clientIdentifierValue' => 'custom_identify_123456'
            ]);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/vouchers/item/get-assigned-for-client/by-identifier?clientIdentifierName=custom_identify&clientIdentifierValue=custom_identify_123456")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/vouchers/item/get-or-assign-for-client/by-identifier:
    post:
      tags:
        - Vouchers
      summary: Get or assign and get voucher as Workspace
      description: |
        Retrieve the code assigned to a profile. If no code was assigned earlier, the method assigns one (it uses the provided profile identifier).

        For each profile, the same code is retrieved every time. This can be used, for example, to retrieve unique codes used to identify a profile.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `VOUCHERS_ITEM_ASSIGN_FOR_CLIENT_CREATE`

        **User role permission required:** `assets_code_pool: create`
      operationId: GetOrAssignAndGetVoucherByIdentifierAsBusinessProfile
      parameters:
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
        - $ref: "#/components/parameters/vouchers-queryClientIdentifierName"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/vouchers-voucherActionRequestByClientIdentifierAsProfileReq"
        required: true
      responses:
        "200":
          description: Details of a voucher
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/vouchers-getOrAssignAndGetVoucherDataRes"
        "416":
          description: Pool empty, expired, not found, or Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-voucher-HTTP400Res"
              example:
                message: Pool does not exist or expired
                error:
                  message: Pool does not exist or expired
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/GetOrAssignAndGetVoucherByIdentifierAsBusinessProfile
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api.synerise.com/v4/vouchers/item/get-or-assign-for-client/by-identifier?clientIdentifierName=custom_identify' \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE' \
              --header 'content-type: application/json' \
              --data '{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientIdentifierValue":"custom_identify_1234"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientIdentifierValue\":\"custom_identify_1234\"}"

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/vouchers/item/get-or-assign-for-client/by-identifier?clientIdentifierName=custom_identify", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "poolUuid": "faec32b0-c343-4362-ba32-c6148c649da4",
              "clientIdentifierValue": "custom_identify_1234"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/v4/vouchers/item/get-or-assign-for-client/by-identifier?clientIdentifierName=custom_identify");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/vouchers/item/get-or-assign-for-client/by-identifier?clientIdentifierName=custom_identify",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              poolUuid: 'faec32b0-c343-4362-ba32-c6148c649da4',
              clientIdentifierValue: 'custom_identify_1234'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item/get-or-assign-for-client/by-identifier');
            $request->setMethod(HTTP_METH_POST);

            $request->setQueryData([
              'clientIdentifierName' => 'custom_identify'
            ]);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientIdentifierValue":"custom_identify_1234"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/vouchers/item/get-or-assign-for-client/by-identifier?clientIdentifierName=custom_identify")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientIdentifierValue\":\"custom_identify_1234\"}")
              .asString();
  /v4/vouchers/item/assign-for-client/by-identifier:
    post:
      tags:
        - Vouchers
      summary: Assign and get voucher as Workspace
      description: |
        Assign a code to a profile and retrieve it. Every time this method is used, a different code is assigned.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `VOUCHERS_ITEM_ASSIGN_FOR_CLIENT_CREATE`

        **User role permission required:** `assets_code_pool: create`
      operationId: AssignAndGetVoucherByIdentifierAsBusinessProfile
      parameters:
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
        - $ref: "#/components/parameters/vouchers-queryClientIdentifierName"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/vouchers-voucherActionRequestByClientIdentifierAsProfileReq"
        required: true
      responses:
        "201":
          description: Voucher assigned
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/vouchers-getOrAssignAndGetVoucherDataRes"
        "416":
          description: Pool empty, expired, not found, or Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-voucher-HTTP400Res"
              example:
                message: Pool does not exist or expired
                error:
                  message: Pool does not exist or expired
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/AssignAndGetVoucherByIdentifierAsBusinessProfile
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api.synerise.com/v4/vouchers/item/assign-for-client/by-identifier?clientIdentifierName=custom_identify' \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE' \
              --header 'content-type: application/json' \
              --data '{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientIdentifierValue":"custom_identify_1234"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientIdentifierValue\":\"custom_identify_1234\"}"

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/vouchers/item/assign-for-client/by-identifier?clientIdentifierName=custom_identify", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "poolUuid": "faec32b0-c343-4362-ba32-c6148c649da4",
              "clientIdentifierValue": "custom_identify_1234"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/v4/vouchers/item/assign-for-client/by-identifier?clientIdentifierName=custom_identify");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/vouchers/item/assign-for-client/by-identifier?clientIdentifierName=custom_identify",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              poolUuid: 'faec32b0-c343-4362-ba32-c6148c649da4',
              clientIdentifierValue: 'custom_identify_1234'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item/assign-for-client/by-identifier');
            $request->setMethod(HTTP_METH_POST);

            $request->setQueryData([
              'clientIdentifierName' => 'custom_identify'
            ]);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"poolUuid":"faec32b0-c343-4362-ba32-c6148c649da4","clientIdentifierValue":"custom_identify_1234"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/vouchers/item/assign-for-client/by-identifier?clientIdentifierName=custom_identify")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientIdentifierValue\":\"custom_identify_1234\"}")
              .asString();
  /v4/vouchers/item/redeem:
    post:
      tags:
        - Vouchers
      summary: Redeem a voucher
      description: |
        Redeem a code.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `VOUCHERS_ITEM_REDEEM_CREATE`

        **User role permission required:** `assets_code_pool: create`
      operationId: RedeemAVoucher
      parameters:
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/vouchers-voucherRedeemReq"
        required: true
      responses:
        "200":
          description: Voucher redeemed
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    default: Code redeemed with success
                  data:
                    $ref: "#/components/schemas/vouchers-voucherDataRedeemed"
        "400":
          description: Data format is not valid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Param code is required
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/RedeemAVoucher
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/vouchers/item/redeem \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE' \
              --header 'content-type: application/json' \
              --data '{"code":"code123"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"code\":\"code123\"}"

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/vouchers/item/redeem", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "code": "code123"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/v4/vouchers/item/redeem");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/vouchers/item/redeem",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({code: 'code123'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item/redeem');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"code":"code123"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/vouchers/item/redeem")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"code\":\"code123\"}")
              .asString();
  /v4/vouchers/pool/list:
    get:
      tags:
        - Vouchers
      summary: List pools
      description: |
        Retrieve a list of voucher pools.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `VOUCHERS_POOL_LIST_READ`

        **User role permission required:** `assets_code_pool: read`
      operationId: ListPools
      parameters:
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
        - $ref: "#/components/parameters/vouchers-queryIncludeMeta"
        - $ref: "#/components/parameters/vouchers-querySortFieldName"
        - $ref: "#/components/parameters/vouchers-querySortingOrder"
        - $ref: "#/components/parameters/vouchers-queryFilter"
        - $ref: "#/components/parameters/vouchers-queryLimit"
        - $ref: "#/components/parameters/vouchers-queryPage"
      responses:
        "200":
          description: An array of voucher pools
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/vouchers-poolData"
                    description: An array of voucher pools
                  meta:
                    $ref: "#/components/schemas/vouchers-paginationMeta"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/ListPools
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/vouchers/pool/list?includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&limit=100&page=4' \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/vouchers/pool/list?includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&limit=100&page=4", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/v4/vouchers/pool/list?includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&limit=100&page=4");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/vouchers/pool/list?includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&limit=100&page=4",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/pool/list');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'includeMeta' => 'false',
              'orderFieldName' => 'SOME_STRING_VALUE',
              'order' => 'SOME_STRING_VALUE',
              'query' => 'SOME_STRING_VALUE',
              'limit' => '100',
              'page' => '4'
            ]);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/vouchers/pool/list?includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&limit=100&page=4")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/vouchers/pool:
    post:
      tags:
        - Vouchers
      summary: Create a voucher pool
      description: |
        Create a pool for voucher storage.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `VOUCHERS_POOL_CREATE`

        **User role permission required:** `assets_code_pool: create`
      operationId: CreateAVoucherPool
      parameters:
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/vouchers-createAVoucherPoolReq"
        required: true
      responses:
        "201":
          description: Pool created
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    default: Create object with success
                  data:
                    $ref: "#/components/schemas/vouchers-poolData"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/CreateAVoucherPool
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/vouchers/pool \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE' \
              --header 'content-type: application/json' \
              --data '{"name":"string","barcodeType":"NONE","description":"string","voucherPrefix":"0","poolLimit":0,"redeemedLimitPerClient":0,"startAt":"2019-08-24T14:15:22Z"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"name\":\"string\",\"barcodeType\":\"NONE\",\"description\":\"string\",\"voucherPrefix\":\"0\",\"poolLimit\":0,\"redeemedLimitPerClient\":0,\"startAt\":\"2019-08-24T14:15:22Z\"}"

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/vouchers/pool", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "name": "string",
              "barcodeType": "NONE",
              "description": "string",
              "voucherPrefix": "0",
              "poolLimit": 0,
              "redeemedLimitPerClient": 0,
              "startAt": "2019-08-24T14:15:22Z"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/v4/vouchers/pool");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/vouchers/pool",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              name: 'string',
              barcodeType: 'NONE',
              description: 'string',
              voucherPrefix: '0',
              poolLimit: 0,
              redeemedLimitPerClient: 0,
              startAt: '2019-08-24T14:15:22Z'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/pool');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"name":"string","barcodeType":"NONE","description":"string","voucherPrefix":"0","poolLimit":0,"redeemedLimitPerClient":0,"startAt":"2019-08-24T14:15:22Z"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/vouchers/pool")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\",\"barcodeType\":\"NONE\",\"description\":\"string\",\"voucherPrefix\":\"0\",\"poolLimit\":0,\"redeemedLimitPerClient\":0,\"startAt\":\"2019-08-24T14:15:22Z\"}")
              .asString();
  /v4/vouchers/pool/{poolUuid}:
    get:
      tags:
        - Vouchers
      summary: Get pool details
      description: |
        Retrieve the details of a single voucher pool.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `VOUCHERS_POOL_READ`

        **User role permission required:** `assets_code_pool: read`
      operationId: GetPoolDetails
      parameters:
        - $ref: "#/components/parameters/vouchers-pathPoolUuid"
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      responses:
        "200":
          description: Details of a voucher pool
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/vouchers-poolDataRes"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/GetPoolDetails
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115 \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    put:
      tags:
        - Vouchers
      summary: Update a voucher pool
      description: |
        Update an existing pool of vouchers. If you don't want to change a parameter, omit it entirely.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `VOUCHERS_POOL_UPDATE`

        **User role permission required:** `assets_code_pool: update`
      operationId: UpdateAVoucherPool
      parameters:
        - $ref: "#/components/parameters/vouchers-pathPoolUuid"
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/vouchers-createAVoucherPoolReq"
        required: true
      responses:
        "200":
          description: Voucher pool
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    default: Update object with success
                  data:
                    $ref: "#/components/schemas/vouchers-poolDataRes"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/UpdateAVoucherPool
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115 \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE' \
              --header 'content-type: application/json' \
              --data '{"name":"string","barcodeType":"NONE","description":"string","voucherPrefix":"0","poolLimit":0,"redeemedLimitPerClient":0,"startAt":"2019-08-24T14:15:22Z"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"name\":\"string\",\"barcodeType\":\"NONE\",\"description\":\"string\",\"voucherPrefix\":\"0\",\"poolLimit\":0,\"redeemedLimitPerClient\":0,\"startAt\":\"2019-08-24T14:15:22Z\"}"

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("PUT", "/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "name": "string",
              "barcodeType": "NONE",
              "description": "string",
              "voucherPrefix": "0",
              "poolLimit": 0,
              "redeemedLimitPerClient": 0,
              "startAt": "2019-08-24T14:15:22Z"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("PUT", "https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              name: 'string',
              barcodeType: 'NONE',
              description: 'string',
              voucherPrefix: '0',
              poolLimit: 0,
              redeemedLimitPerClient: 0,
              startAt: '2019-08-24T14:15:22Z'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"name":"string","barcodeType":"NONE","description":"string","voucherPrefix":"0","poolLimit":0,"redeemedLimitPerClient":0,"startAt":"2019-08-24T14:15:22Z"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.put("https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\",\"barcodeType\":\"NONE\",\"description\":\"string\",\"voucherPrefix\":\"0\",\"poolLimit\":0,\"redeemedLimitPerClient\":0,\"startAt\":\"2019-08-24T14:15:22Z\"}")
              .asString();
    delete:
      tags:
        - Vouchers
      summary: Delete a voucher pool
      description: |
        Delete an existing pool of vouchers.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `VOUCHERS_POOL_DELETE`

        **User role permission required:** `assets_code_pool: delete`
      operationId: DeleteAVoucherPool
      parameters:
        - $ref: "#/components/parameters/vouchers-pathPoolUuid"
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      responses:
        "200":
          description: Voucher pool deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    default: Delete object with success
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/DeleteAVoucherPool
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115 \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("DELETE", "/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("DELETE", "https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/vouchers/item/list/{poolUuid}:
    get:
      tags:
        - Vouchers
      summary: List vouchers from a pool
      description: |
        Retrieve vouchers from a single pool.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `VOUCHERS_ITEM_LIST_BY_POOL_READ`

        **User role permission required:** `assets_code_pool: read`
      operationId: ListVouchersFromPool
      parameters:
        - $ref: "#/components/parameters/vouchers-pathPoolUuid"
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
        - $ref: "#/components/parameters/vouchers-queryLimit"
        - $ref: "#/components/parameters/vouchers-queryPage"
        - $ref: "#/components/parameters/vouchers-queryIncludeMeta"
      responses:
        "200":
          description: An array of vouchers in the pool
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-listVouchersSuccessRes"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/ListVouchersFromPool
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115?limit=100&page=4&includeMeta=false' \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115?limit=100&page=4&includeMeta=false", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115?limit=100&page=4&includeMeta=false");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115?limit=100&page=4&includeMeta=false",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'limit' => '100',
              'page' => '4',
              'includeMeta' => 'false'
            ]);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115?limit=100&page=4&includeMeta=false")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    delete:
      tags:
        - Vouchers
      summary: Delete vouchers by poolUuid
      description: |
        Delete vouchers assigned to pool.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `VOUCHERS_ITEM_BY_POOL_DELETE`

        **User role permission required:** `assets_code_pool: delete`
      operationId: DeleteVouchersByPoolUuid
      parameters:
        - $ref: "#/components/parameters/vouchers-pathPoolUuid"
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      responses:
        "200":
          description: Vouchers deleted
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-voucherResponseMessage"
              example:
                message: Delete object with success
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/DeleteVouchersByPoolUuid
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115 \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("DELETE", "/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("DELETE", "https://api.synerise.com/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/vouchers/item/count/{poolUuid}:
    post:
      tags:
        - Vouchers
      summary: Count vouchers
      description: |
        Count (re-calculate) vouchers in a pool, group the results by status.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `VOUCHERS_ITEM_LIST_BY_POOL_READ`

        **User role permission required:** `assets_code_pool: read`
      operationId: getVouchersCount
      parameters:
        - $ref: "#/components/parameters/vouchers-pathPoolUuid"
        - $ref: "#/components/parameters/vouchers-acceptHeader"
        - $ref: "#/components/parameters/vouchers-contentTypeHeader"
        - $ref: "#/components/parameters/vouchers-apiVersionHeader"
      responses:
        "200":
          description: Set of counters
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/vouchers-getVouchersCountRes"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Vouchers/operation/getVouchersCount
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/vouchers/item/count/8465c240-d38e-42f8-af29-b9fa1ed05115 \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("POST", "/v4/vouchers/item/count/8465c240-d38e-42f8-af29-b9fa1ed05115", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/v4/vouchers/item/count/8465c240-d38e-42f8-af29-b9fa1ed05115");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/vouchers/item/count/8465c240-d38e-42f8-af29-b9fa1ed05115",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/vouchers/item/count/8465c240-d38e-42f8-af29-b9fa1ed05115');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/vouchers/item/count/8465c240-d38e-42f8-af29-b9fa1ed05115")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
components:
  securitySchemes:
    JWT:
      type: http
      scheme: bearer
      description: |-
        JWT Bearer token. The header looks like this: `Bearer {JWT}`

        Remember to include the space between 'Bearer' and the token.

        Generate a token via the **Authorization** endpoints.
    TrackerKey:
      type: apiKey
      name: token
      in: query
      description: Authorization by tracker key sent as a query parameter. This is the same key as used in the website tracking code.
  schemas:
    promotions-ErrorTimestamp:
      type: string
      description: Time when the error occurred
    promotions-ResponseErrorMessage:
      type: string
      description: Error details
    promotions-ResponseError:
      type: string
      description: Summary of the error
    promotions-ErrorCode:
      type: integer
      description: HTTP code of the problem
    promotions-ErrorObject:
      type: object
      title: JSON content issue
      properties:
        message:
          $ref: "#/components/schemas/promotions-ResponseError"
        error:
          description: Details of the error
          anyOf:
            - type: array
              description: An array of objects with error details
              items:
                type: object
                description: Details of an error
                properties:
                  message:
                    $ref: "#/components/schemas/promotions-ErrorV2Message"
                  additionalProperties:
                    description: Additional information, if applicable
            - type: string
              description: Description of the error
    promotions-ErrorV2Message:
      type: string
      description: Short description of the error
      example: Internal Error
    promotions-responseMeta:
      type: object
      description: Optional metadata
      properties:
        code:
          type: integer
          description: HTTP code
        limit:
          type: integer
          description: The number of items per page
        link:
          type: array
          description: Links to other pages
          items:
            type: object
            description: Link to another page on the list
            properties:
              rel:
                type: string
                enum:
                  - first
                  - last
                  - next
                  - prev
                description: The type of relationship to the current page
              url:
                type: string
                description: The URL of the page
        page:
          type: integer
          description: The current page
        totalCount:
          type: integer
          description: The total number of items on all pages
        totalPages:
          type: integer
          description: The total number of pages
    promotions-promotionClientDataResponse:
      type: object
      description: Details of a promotion
      properties:
        uuid:
          $ref: "#/components/schemas/promotions-promotionUuid"
        code:
          $ref: "#/components/schemas/promotions-promotionCode"
        status:
          $ref: "#/components/schemas/promotions-assignmentStatus"
        type:
          $ref: "#/components/schemas/promotions-promotionType"
        redeemLimitPerClient:
          $ref: "#/components/schemas/promotions-promotionRedeemLimitPerClient"
        redeemQuantityPerActivation:
          $ref: "#/components/schemas/promotions-promotionRedeemQuantity"
        currentRedeemedQuantity:
          $ref: "#/components/schemas/promotions-assignmentCurrentRedeemedQuantity"
        currentRedeemedLimit:
          $ref: "#/components/schemas/promotions-assignmentCurrentRedeemedLimit"
        activationCounter:
          $ref: "#/components/schemas/promotions-assignmentActivationCounter"
        possibleRedeems:
          $ref: "#/components/schemas/promotions-assignmentPossibleRedeems"
        details:
          $ref: "#/components/schemas/promotions-promotionDetailsShort"
        discountType:
          $ref: "#/components/schemas/promotions-promotionDiscountType"
        discountValue:
          $ref: "#/components/schemas/promotions-promotionDiscountValue"
        discountMode:
          $ref: "#/components/schemas/promotions-promotionDiscountMode"
        discountModeDetails:
          $ref: "#/components/schemas/promotions-promotionDiscountModeDetails"
        requireRedeemedPoints:
          $ref: "#/components/schemas/promotions-promotionRequirePoints"
        name:
          $ref: "#/components/schemas/promotions-promotionName"
        headline:
          $ref: "#/components/schemas/promotions-promotionHeadline"
        description:
          $ref: "#/components/schemas/promotions-promotionDescription"
        images:
          $ref: "#/components/schemas/promotions-promotionImages"
        tags:
          $ref: "#/components/schemas/promotions-promotionTags"
        startAt:
          $ref: "#/components/schemas/promotions-promotionStartAt"
        expireAt:
          $ref: "#/components/schemas/promotions-promotionExpireAt"
        displayFrom:
          $ref: "#/components/schemas/promotions-promotionDisplayFrom"
        displayTo:
          $ref: "#/components/schemas/promotions-promotionDisplayTo"
        assignedAt:
          $ref: "#/components/schemas/promotions-assignmentAssignedAt"
        lastingTime:
          $ref: "#/components/schemas/promotions-promotionLastingTime"
        lastingAt:
          $ref: "#/components/schemas/promotions-assignmentLastingAt"
        params:
          $ref: "#/components/schemas/promotions-promotionParams"
        catalogIndexItems:
          $ref: "#/components/schemas/promotions-promotionCatalogIndexItems"
        price:
          $ref: "#/components/schemas/promotions-promotionPrice"
        priority:
          $ref: "#/components/schemas/promotions-promotionPriority"
        itemScope:
          $ref: "#/components/schemas/promotions-promotionItemScope"
        minBasketValue:
          $ref: "#/components/schemas/promotions-promotionMinBasket"
        maxBasketValue:
          $ref: "#/components/schemas/promotions-promotionMaxBasket"
        vouchers:
          $ref: "#/components/schemas/promotions-VoucherList"
    promotions-VoucherList:
      type: array
      description: Vouchers redeemed succesfully
      items:
        $ref: "#/components/schemas/promotions-Voucher"
    promotions-Voucher:
      type: object
      required:
        - code
        - status
        - autoGenerated
        - lastingAt
        - redeemedAt
        - assignedAt
      properties:
        code:
          $ref: "#/components/schemas/promotions-voucherCode"
        status:
          $ref: "#/components/schemas/promotions-voucherStatus"
        autoGenerated:
          $ref: "#/components/schemas/promotions-voucherAutoGenerated"
        lastingAt:
          $ref: "#/components/schemas/promotions-voucherLastingAt"
        redeemedAt:
          $ref: "#/components/schemas/promotions-voucherRedeemedAt"
        assignedAt:
          $ref: "#/components/schemas/promotions-voucherAssignedAt"
    promotions-voucherAssignedAt:
      type: string
      nullable: true
      example: 2025-01-01
      format: date-time
      description: Time when the voucher was assigned.
    promotions-voucherRedeemedAt:
      type: string
      nullable: true
      example: null
      format: date-time
      description: Time when the voucher was redeemed.
    promotions-voucherLastingAt:
      type: string
      nullable: true
      example: 2026-01-01
      format: date-time
      description: Time when the voucher expires.
    promotions-voucherAutoGenerated:
      type: boolean
      example: false
      description: "`true` if the voucher was generated by an algorithm"
    promotions-voucherStatus:
      type: string
      description: Status of the voucher
      example: ASSIGNED
      enum:
        - ASSIGNED
        - REDEEMED
        - CANCELED
    promotions-voucherCode:
      type: string
      description: Voucher code
      example: 6f54671d-157f-4c4e-a577-11fac3111293
    promotions-promotionMaxBasket:
      type: number
      nullable: true
      default: null
      minimum: 0
      description: |
        
        The maximum basket value to apply the promotion to. Any amount above the maximum is not discounted. This is the basket value after calculating other promotions that apply to the items in the basket.

        `maxBasketValue` must be greater than `minBasketValue`

        **Example:**<br/>
        The maximum basket value is set to 500 USD. The discount is 10%. A basket's total is 700 USD. The discount is 50 USD.
    promotions-promotionMinBasket:
      type: number
      nullable: true
      default: null
      minimum: 0
      description: |
        Minimal basket value required to trigger the application of the promotion. This is the basket value after calculating other promotions that apply to the items in the basket. 

        `minBasketValue` must be lower than `maxBasketValue`.
    promotions-promotionItemScope:
      type: string
      description: |-
        The scope of of the promotion.
        * LINE_ITEM is a promotion used for certain items in the basket
        * BASKET is a promotion that applies to the entire basket
      enum:
        - LINE_ITEM
        - BASKET
      default: LINE_ITEM
    promotions-promotionPriority:
      description: Defines the priority of the promotion for display. `1` is the highest priority.
      type: integer
      minimum: 1
      maximum: 500
      default: 250
    promotions-promotionPrice:
      description: In single-item promotions, this is the price of the item in the smallest unit of currency. For example, if the currency is USD and `price` is 120, the price is 1 dollar and 20 cents.
      type: integer
      default: 0
      minimum: 0
      maximum: 2147483647
    promotions-promotionCatalogIndexItems:
      type: array
      items:
        type: string
      description: |
        
        'An array of items from the catalog to be included in the promotion if `catalogItemType` is set to `SELECTED`.


        If `catalogItemType` is set to `ALL`, set `catalogIndexItems` to null.'
      nullable: true
      example: []
    promotions-promotionParams:
      type: object
      description: A JSON object with any custom parameters of type string, object, array.
      nullable: true
      additionalProperties: true
    promotions-assignmentLastingAt:
      type: string
      nullable: true
      format: date-time
      description: Time when promotion becomes expire for the Profile.
    promotions-promotionLastingTime:
      type: integer
      format: int32
      nullable: true
      description: Duration of the promotion in seconds. This countdown starts when the profile activates a promotion and is individual for each profile.
      default: 0
    promotions-assignmentAssignedAt:
      type: string
      nullable: true
      format: date-time
      description: Time when promotion becomes active for the Profile.
    promotions-promotionDisplayTo:
      type: string
      nullable: true
      description: Time when the promotion stops being displayed for users. Defaults to null. Has to be greater than displayFrom.
    promotions-promotionDisplayFrom:
      type: string
      nullable: true
      description: Time when the promotion becomes displayable. Defaults to null.
    promotions-promotionExpireAt:
      type: string
      nullable: true
      format: date-time
      description: Time when the promotion ends for all profiles. Defaults to current time. Has to be greater than startAt
    promotions-promotionStartAt:
      type: string
      nullable: true
      format: date-time
      description: Time when the promotion becomes available. Defaults to current time.
    promotions-promotionTags:
      description: |
        An array of tags.

        **IMPORTANT:** To be able to use a tag for promotions, you must first assign the tag to a directory with `"type":"promotion"`. If the directory type does not exist, create it using [this endpoint](https://developers.synerise.com/AssetManagement/AssetManagement.html#operation/createDirectoryType). Then create a directory of that type and assign tags to it.
      type: array
      items:
        type: object
        properties:
          hash:
            type: string
            description: Hash ID of the tag
            example: 6f54671d-157f-4c4e-a577-11fac3111293
      nullable: true
    promotions-promotionImages:
      type: array
      nullable: true
      items:
        required:
          - url
          - type
        type: object
        properties:
          url:
            description: Image or thumbnail source
            type: string
            example: https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png
          type:
            type: string
            enum:
              - image
              - thumbnail
      description: Images and thumbnails for the promotion
    promotions-promotionDescription:
      type: string
      maxLength: 2048
      nullable: true
      description: Details of the promotion displayed to viewers
    promotions-promotionHeadline:
      type: string
      nullable: true
      description: Promotion headline displayed to viewers
    promotions-promotionName:
      type: string
      maxLength: 255
      description: Promotion name displayed to viewers
    promotions-promotionRequirePoints:
      type: number
      nullable: true
      format: int32
      description: How many loyalty points are needed to activate the promotion
    promotions-promotionDiscountModeDetails:
      type: object
      properties:
        discountSteps:
          type: array
          nullable: false
          items:
            required:
              - discountValue
              - usageThreshold
            type: object
            properties:
              discountValue:
                description: Discount value in given step
                type: number
              usageThreshold:
                description: Threshold after current step would apply
                type: number
        discountUsageTrigger:
          type: string
          enum:
            - TRANSACTION
            - REDEEM
          nullable: false
          description: Describe after what action new steps would be applied
      nullable: true
      description: 'Applies only when `"discountMode": "STATIC"`.'
    promotions-promotionDiscountMode:
      type: string
      description: Promotion discount mode
      enum:
        - STATIC
        - STEP
      default: STATIC
    promotions-promotionDiscountValue:
      type: number
      description: How much discount to apply
      default: 0
      minimum: 0
      maximum: 100
    promotions-promotionDiscountType:
      type: string
      description: The type of discount
      enum:
        - PERCENT
        - POINTS
        - AMOUNT
        - NONE
        - MULTIBUY
        - 2_FOR_1
        - EXACT_PRICE
        - DIGITAL_CASHBACK
      default: NONE
    promotions-promotionDetailsShort:
      type: object
      description: Promotion details
      required:
        - discountType
      nullable: true
      properties:
        discountType:
          $ref: "#/components/schemas/promotions-promotionDiscountTypeDetailsShort"
    promotions-promotionDiscountTypeDetailsShort:
      type: object
      description: Details that apply for specific discount type
      required:
        - name
        - outerScope
        - requiredItemsCount
        - discountedItemsCount
      properties:
        name:
          $ref: "#/components/schemas/promotions-promotionDiscountTypeDetailsName"
        outerScope:
          $ref: "#/components/schemas/promotions-promotionDiscountTypeDetailsOuterScope"
        requiredItemsCount:
          $ref: "#/components/schemas/promotions-promotionDiscountTypeDetailsRequiredItemsCount"
        discountedItemsCount:
          $ref: "#/components/schemas/promotions-promotionDiscountTypeDetailsDiscountedItemsCount"
    promotions-promotionDiscountTypeDetailsDiscountedItemsCount:
      description: Number of items to apply the discount to.
      type: integer
      format: int32
      example: 1
    promotions-promotionDiscountTypeDetailsRequiredItemsCount:
      description: Number of items that should be purchased to meet the promotion condition.
      type: integer
      format: int32
      example: 2
    promotions-promotionDiscountTypeDetailsOuterScope:
      type: boolean
      description: |
        This defines whether a defined promotion trigger for discount is based on different item scope.
        When set to
          * `false` it means items are from the same scope,
          * `true` it means items are from outer scope and `requiredItems` should be defined.
      default: false
      example: true
    promotions-promotionDiscountTypeDetailsName:
      type: string
      enum:
        - BOGO
      default: BOGO
    promotions-assignmentPossibleRedeems:
      type: integer
      description: Number of available redeems left
    promotions-assignmentActivationCounter:
      type: integer
      description: Number of promotion activation
    promotions-assignmentCurrentRedeemedLimit:
      type: integer
      description: Current redeem limit for the Profile.
    promotions-assignmentCurrentRedeemedQuantity:
      type: integer
      description: Current redeem quantity for the Profile.
    promotions-promotionRedeemQuantity:
      type: integer
      nullable: true
      description: How many times per activation a multibuy promotion can be redeemed
      minimum: 0
      maximum: 8388607
    promotions-promotionRedeemLimitPerClient:
      type: integer
      description: Limit how many times a Profile can redeem this promotion.
      default: 0
      minimum: 0
      maximum: 32767
      nullable: true
    promotions-promotionType:
      type: string
      description: Promotion type
      enum:
        - MEMBERS_ONLY
        - HANDBILL
        - CUSTOM
        - GENERAL
      default: GENERAL
    promotions-assignmentStatus:
      type: string
      description: Profile-oriented status of the promotion.
      enum:
        - ASSIGNED
        - ACTIVE
        - REDEEMED
    promotions-promotionCode:
      type: string
      maxLength: 64
      description: Unique code
    promotions-promotionUuid:
      type: string
      description: Unique UUIDv4.
    promotions-PromotionResponseMessage:
      type: object
      properties:
        message:
          type: string
          description: Short summary of the response
    promotions-promotionDataResponse:
      type: object
      description: Details of the promotion
      properties:
        uuid:
          $ref: "#/components/schemas/promotions-promotionUuid"
        code:
          $ref: "#/components/schemas/promotions-promotionCode"
        status:
          $ref: "#/components/schemas/promotions-promotionVisibility"
        type:
          $ref: "#/components/schemas/promotions-promotionType"
        redeemLimitPerClient:
          $ref: "#/components/schemas/promotions-promotionRedeemLimitPerClient"
        redeemQuantityPerActivation:
          $ref: "#/components/schemas/promotions-promotionRedeemQuantity"
        redeemLimitGlobal:
          $ref: "#/components/schemas/promotions-promotionRedeemLimitGlobal"
        activationLimitGlobalType:
          $ref: "#/components/schemas/promotions-activationLimitGlobalType"
        activationLimitGlobalLimit:
          $ref: "#/components/schemas/promotions-activationLimitGlobalLimit"
        activationLimitGlobalCounter:
          $ref: "#/components/schemas/promotions-activationLimitGlobalCounter"
        activationLimitGlobalRelativeMinutes:
          $ref: "#/components/schemas/promotions-activationLimitGlobalRelativeMinutes"
        activationLimitGlobalReached:
          $ref: "#/components/schemas/promotions-activationLimitGlobalReached"
        redeemType:
          $ref: "#/components/schemas/promotions-promotionRedeemType"
        discountType:
          $ref: "#/components/schemas/promotions-promotionDiscountType"
        details:
          $ref: "#/components/schemas/promotions-promotionDetails"
        discountValue:
          $ref: "#/components/schemas/promotions-promotionDiscountValue"
        discountMode:
          $ref: "#/components/schemas/promotions-promotionDiscountMode"
        discountModeDetails:
          $ref: "#/components/schemas/promotions-promotionDiscountModeDetails"
        preDiscountValue:
          $ref: "#/components/schemas/promotions-promotionPreDiscountValue"
        requireRedeemedPoints:
          $ref: "#/components/schemas/promotions-promotionRequirePoints"
        headerName:
          $ref: "#/components/schemas/promotions-promotionHeaderName"
        headerDescription:
          $ref: "#/components/schemas/promotions-promotionHeaderDescription"
        name:
          $ref: "#/components/schemas/promotions-promotionName"
        headline:
          $ref: "#/components/schemas/promotions-promotionHeadline"
        description:
          $ref: "#/components/schemas/promotions-promotionDescription"
        images:
          $ref: "#/components/schemas/promotions-promotionImages"
        tags:
          $ref: "#/components/schemas/promotions-promotionTags"
        createdAt:
          $ref: "#/components/schemas/promotions-objectCreatedAt"
        startAt:
          $ref: "#/components/schemas/promotions-promotionStartAt"
        expireAt:
          $ref: "#/components/schemas/promotions-promotionExpireAt"
        displayFrom:
          $ref: "#/components/schemas/promotions-promotionDisplayFrom"
        displayTo:
          $ref: "#/components/schemas/promotions-promotionDisplayTo"
        lastingTime:
          $ref: "#/components/schemas/promotions-promotionLastingTime"
        params:
          $ref: "#/components/schemas/promotions-promotionParams"
        itemScope:
          $ref: "#/components/schemas/promotions-promotionItemScope"
        minBasketValue:
          $ref: "#/components/schemas/promotions-promotionMinBasket"
        maxBasketValue:
          $ref: "#/components/schemas/promotions-promotionMaxBasket"
        catalog:
          $ref: "#/components/schemas/promotions-promotionCatalog"
        catalogItemType:
          $ref: "#/components/schemas/promotions-promotionCatalogItemType"
        catalogIndexItems:
          $ref: "#/components/schemas/promotions-promotionCatalogIndexItems"
        catalogFilterIds:
          $ref: "#/components/schemas/promotions-promotionCatalogFilterIds"
        storeCatalog:
          $ref: "#/components/schemas/promotions-promotionStoreCatalog"
        storeItemType:
          $ref: "#/components/schemas/promotions-promotionStoreItemType"
        storeIds:
          $ref: "#/components/schemas/promotions-promotionStoreIds"
        targetType:
          $ref: "#/components/schemas/promotions-promotionTargetType"
        targetSegment:
          $ref: "#/components/schemas/promotions-promotionTargetSegment"
        price:
          $ref: "#/components/schemas/promotions-promotionPrice"
        priority:
          $ref: "#/components/schemas/promotions-promotionPriority"
        metric:
          $ref: "#/components/schemas/promotions-promotionMetric"
        importHash:
          $ref: "#/components/schemas/promotions-promotionImportHash"
    promotions-promotionImportHash:
      type: string
      format: uuid
      nullable: true
      description: Hash of the import
    promotions-promotionMetric:
      nullable: true
      type: string
      maxLength: 64
      description: Currently unused
    promotions-promotionTargetSegment:
      type: array
      nullable: true
      description: This field applies only when `targetType` is set to "SEGMENT".
      items:
        type: string
        description: ID of the segmentation of profiles that can redeem this promotion
    promotions-promotionTargetType:
      type: string
      description: If this field is set to "SEGMENT", you must provide a list of segments in `targetSegment`.
      default: ALL
      enum:
        - ALL
        - SEGMENT
    promotions-promotionStoreIds:
      type: array
      items:
        type: string
      description: An array of stores from the store catalog where the promotion is available if `storeItemType` is set to `SELECTED`
      nullable: true
    promotions-promotionStoreItemType:
      type: string
      enum:
        - ALL
        - SELECTED
      description: Defines if the promotion is available for the entire store catalog or only certain stores (listed in `storeIds`).
      default: ALL
    promotions-promotionStoreCatalog:
      type: string
      description: ID of the store catalog that the promotion applies to
      nullable: true
    promotions-promotionCatalogFilterIds:
      type: array
      items:
        type: string
      description: |
        
        'An array of catalog filter IDs to be executed to fetch catalog items if `catalogItemType` is set to `FILTERED`.


        If `catalogItemType` is set to `ALL`, set `catalogFilterIds` to null.'
      nullable: true
      example:
        - f978b20f-7156-40ed-99c2-3af62b76af12
    promotions-promotionCatalogItemType:
      type: string
      enum:
        - ALL
        - SELECTED
        - FILTERED
      description: |
        
        - If set to "ALL", define the catalog in the `catalog` field and set `catalogIndexItems` to null.

        - If set to "SELECTED", define the catalog in the `catalog` field and provide a list of catalog items in `catalogIndexItems`.

        - If set to "FILTERED", define the catalog in the `catalog` field and provide a list of catalog filter ids in `catalogFilterIds`.
      default: ALL
      example: FILTERED
    promotions-promotionCatalog:
      type: string
      description: ID of the item catalog that the promotion applies to
      nullable: true
      example: "221"
    promotions-objectCreatedAt:
      type: string
      format: date-time
      description: Time when the object was created
    promotions-promotionHeaderDescription:
      type: string
      maxLength: 255
      description: Description displayed in Synerise Web UI
      nullable: true
    promotions-promotionHeaderName:
      type: string
      maxLength: 255
      description: Name displayed in Synerise Web UI
    promotions-promotionPreDiscountValue:
      type: number
      minimum: 0
      nullable: true
      default: 0
      description: In single-item promotions, this is the price of the item before the discount. This is in regular units of currency. For example, if the currency is USD and `preDiscountValue` is set to 1.2, the price before discount is 1 dollar and 20 cents.
    promotions-promotionDetails:
      type: object
      description: Promotion details
      nullable: true
      properties:
        discountType:
          $ref: "#/components/schemas/promotions-promotionDiscountTypeDetails"
        cashbackSettings:
          $ref: "#/components/schemas/promotions-cashbackSettings"
    promotions-cashbackSettings:
      type: object
      description: Settings for cashback mechanism
      nullable: true
      properties:
        exchangeRate:
          type: number
          minimum: 0.01
          description: Defines how much currency corresponds to one point. For example, if the currency is PLN and exchangeRate is 2, then 1 point equals 2 PLN.
        limits:
          $ref: "#/components/schemas/promotions-cashbackSettingsLimit"
    promotions-cashbackSettingsLimit:
      type: object
      description: Defines the limits on cashback usage
      properties:
        minPoints:
          type: integer
          nullable: true
          minimum: 1
          description: The minimum number of points required to spend for cashback. If null - there is no limit defined.
          example: 10
        maxPoints:
          type: integer
          nullable: true
          minimum: 1
          description: The maximum number of points allowed to spend for cashback. If null - there is no limit defined.
          example: 1000
        maxTransactionAmount:
          type: number
          nullable: true
          minimum: 0.01
          description: Maximum amount in local currency to redeem in a transaction. If null - there is no limit defined.
          example: 20
        maxTransactionPercentage:
          type: number
          nullable: true
          description: Defines how much (in percent) of the total transaction amount can be treated as cashback. If null - there is no limit defined.
          example: 50
          minimum: 0.01
          maximum: 100
    promotions-promotionDiscountTypeDetails:
      type: object
      description: Details that apply for specific discount type.
      required:
        - name
        - outerScope
        - requiredItemsCount
        - discountedItemsCount
      properties:
        name:
          $ref: "#/components/schemas/promotions-promotionDiscountTypeDetailsName"
        outerScope:
          $ref: "#/components/schemas/promotions-promotionDiscountTypeDetailsOuterScope"
        requiredItemsCount:
          $ref: "#/components/schemas/promotions-promotionDiscountTypeDetailsRequiredItemsCount"
        requiredItems:
          $ref: "#/components/schemas/promotions-promotionCatalogItemsDetails"
        discountedItemsCount:
          $ref: "#/components/schemas/promotions-promotionDiscountTypeDetailsDiscountedItemsCount"
    promotions-promotionCatalogItemsDetails:
      type: object
      description: Catalog items definition details
      required:
        - catalog
        - catalogItemType
      nullable: true
      properties:
        catalog:
          $ref: "#/components/schemas/promotions-promotionCatalog"
        catalogItemType:
          $ref: "#/components/schemas/promotions-promotionCatalogItemType"
        catalogIndexItems:
          $ref: "#/components/schemas/promotions-promotionCatalogIndexItems"
        catalogFilterIds:
          $ref: "#/components/schemas/promotions-promotionCatalogFilterIds"
    promotions-promotionRedeemType:
      type: string
      description: Promotion redemption type
      enum:
        - FULL
        - PARTIAL
    promotions-activationLimitGlobalReached:
      type: boolean
      nullable: true
      default: null
      description: Indicator to inform that limit is reached.
    promotions-activationLimitGlobalRelativeMinutes:
      type: integer
      format: int32
      nullable: true
      default: null
      minimum: 1
      maximum: 527040
      description: Used only when `type` is `RELATIVE`. Defines how many minutes back from the current time the limit applies.
    promotions-activationLimitGlobalCounter:
      type: integer
      format: int32
      description: Counter of the total of activations by all Profiles within given time unit.
      nullable: true
    promotions-activationLimitGlobalLimit:
      type: integer
      format: int32
      description: Limit the total of activations by all Profiles within given time unit.
      minimum: 1
      maximum: 2147483647
      nullable: true
    promotions-activationLimitGlobalType:
      type: string
      nullable: true
      default: LIFETIME
      description: |-
        Promotion activation limit type
        * `LIFETIME` – No additional configuration required. The limit applies to the entire lifespan of the promotion. * `RELATIVE` – Requires specifying a relative time window (number of minutes from the current time).
      enum:
        - RELATIVE
        - LIFETIME
    promotions-promotionRedeemLimitGlobal:
      type: integer
      deprecated: true
      format: int32
      description: Limit the total of redemptions by all Profiles
      default: 0
      minimum: 0
      maximum: 2147483647
      nullable: true
    promotions-promotionVisibility:
      type: string
      description: Profile-oriented status of the promotion.
      enum:
        - DRAFT
        - PUBLISH
        - HIDDEN
      default: DRAFT
    promotions-duplicatePromotionRequest:
      type: object
      properties:
        uuid:
          type: string
          description: Promotion UUID
        code:
          type: string
          description: Promotion code
    promotions-promotionActivation:
      required:
        - key
        - value
      type: object
      properties:
        key:
          type: string
          description: Type of promotion identifier
          enum:
            - uuid
            - code
        value:
          type: string
          description: Value of the selected identifier
        pointsToUse:
          nullable: true
          type: integer
          minimum: 0
          description: How many points should be converted to digital money and stored as ready to redeem in transactions in digital cashback promotions.
      example:
        key: code
        value: 7893467834GG
        pointsToUse: 100
    promotions-PromotionAlreadyRedeemedErrorV1:
      description: Promotion already redeemed
      properties:
        message:
          $ref: "#/components/schemas/promotions-ResponseErrorMessage"
      example:
        message: Promotion already redeemed
    promotions-PromotionRedeemLimitExceededErrorV1:
      description: Promotion redeem limit exceeded
      properties:
        message:
          $ref: "#/components/schemas/promotions-ResponseErrorMessage"
      example:
        message: Promotion redeem limit exceeded
    promotions-PromotionNotActivatedErrorV1:
      description: Promotion not activated
      properties:
        message:
          $ref: "#/components/schemas/promotions-ResponseErrorMessage"
      example:
        message: Promotion not activated
    promotions-PromotionNotFoundErrorV1:
      description: Promotion not found
      properties:
        message:
          $ref: "#/components/schemas/promotions-ResponseErrorMessage"
      example:
        message: Promotion not found
    promotions-ProfileNotFoundErrorV1:
      description: Profile not found
      properties:
        message:
          $ref: "#/components/schemas/promotions-ResponseErrorMessage"
      example:
        message: Profile not found
    promotions-RedeemPromotionsRequest:
      required:
        - code
        - clientKey
        - clientKeyValue
      type: object
      properties:
        code:
          type: string
          example: 75d9090f-06ac-46a2-a0ce-4b8eb287efb9
          description: Promotion code
        clientKey:
          $ref: "#/components/schemas/promotions-clientKey"
        clientKeyValue:
          $ref: "#/components/schemas/promotions-clientKeyValue"
        quantity:
          description: Quantity of redeemed items
          type: integer
          example: 2
          default: 1
        sourceId:
          description: "The source of redemption. It should be unique for the source of promotion to ensure that redemptions are successfully deduplicated when retried. Example: a concatenation of receipt ID and index of the discounted transaction line on the receipt."
          type: string
          example: 3f0a1670-eb63-43f1-a6b8-895a74621964-3
        orderId:
          description: Receipt ID for which the promotion was redeemed. It's required when using step promotions. The order ID will be used to check if requirements of granting a step promotion are fulfilled.
          type: string
          example: 3f0a1670-eb63-43f1-a6b8-895a74621964
        lockIdentifier:
          description: Identifier of the "promotion requested" lock which will be released when the promotion is redeemed. This kind of lock blocks a profile from requesting new promotions and can be applied when using the [Get Profile promotions by a custom filter](#operation/GetClientPromotionsByACustomFilter) endpoint.
          type: string
          example: 6561d87b-2697-46ad-8f9a-0550736b86e3
      example:
        code: 75d9090f-06ac-46a2-a0ce-4b8eb287efb9
        clientKey: clientId
        clientKeyValue: "434428563"
    promotions-clientKeyValue:
      description: Value of the selected identifier
      type: string
      example: "434428563"
    promotions-clientKey:
      type: string
      example: clientId
      description: Type of profile identifier
      enum:
        - externalId
        - clientId
        - email
        - phone
        - uuid
    promotions-promotionClientPossibleToRedeemResponse:
      type: object
      properties:
        code:
          $ref: "#/components/schemas/promotions-promotionCode"
        possibleRedeems:
          $ref: "#/components/schemas/promotions-assignmentPossibleRedeems"
        lastingAt:
          $ref: "#/components/schemas/promotions-assignmentLastingAt"
    promotions-Viewpromotiondetails-HTTP200:
      type: object
      properties:
        data:
          $ref: "#/components/schemas/promotions-promotionDataResponse"
    promotions-PromotionCreateUpdateDeleteRes:
      type: object
      properties:
        message:
          type: string
          description: Short summary of the response
        data:
          $ref: "#/components/schemas/promotions-promotionDataResponse"
    promotions-promotionDataCreate:
      type: object
      description: Details of a promotion
      properties:
        visibilityStatus:
          $ref: "#/components/schemas/promotions-promotionVisibility"
        type:
          $ref: "#/components/schemas/promotions-promotionType"
        redeemLimitPerClient:
          $ref: "#/components/schemas/promotions-promotionRedeemLimitPerClient"
        redeemQuantityPerActivation:
          $ref: "#/components/schemas/promotions-promotionRedeemQuantity"
        redeemLimitGlobal:
          $ref: "#/components/schemas/promotions-promotionRedeemLimitGlobal"
        redeemType:
          $ref: "#/components/schemas/promotions-promotionRedeemType"
        details:
          $ref: "#/components/schemas/promotions-promotionDetails"
        discountType:
          $ref: "#/components/schemas/promotions-promotionDiscountType"
        discountValue:
          $ref: "#/components/schemas/promotions-promotionDiscountValue"
        discountMode:
          $ref: "#/components/schemas/promotions-promotionDiscountMode"
        discountModeDetails:
          $ref: "#/components/schemas/promotions-promotionDiscountModeDetails"
        preDiscountValue:
          $ref: "#/components/schemas/promotions-promotionPreDiscountValue"
        requireRedeemedPoints:
          $ref: "#/components/schemas/promotions-promotionRequirePoints"
        headerName:
          $ref: "#/components/schemas/promotions-promotionHeaderName"
        headerDescription:
          $ref: "#/components/schemas/promotions-promotionHeaderDescription"
        name:
          $ref: "#/components/schemas/promotions-promotionName"
        headline:
          $ref: "#/components/schemas/promotions-promotionHeadline"
        description:
          $ref: "#/components/schemas/promotions-promotionDescription"
        images:
          $ref: "#/components/schemas/promotions-promotionImages"
        tags:
          $ref: "#/components/schemas/promotions-promotionTags"
        startAt:
          $ref: "#/components/schemas/promotions-promotionStartAt"
        expireAt:
          $ref: "#/components/schemas/promotions-promotionExpireAt"
        displayFrom:
          $ref: "#/components/schemas/promotions-promotionDisplayFrom"
        displayTo:
          $ref: "#/components/schemas/promotions-promotionDisplayTo"
        lastingTime:
          $ref: "#/components/schemas/promotions-promotionLastingTime"
        params:
          $ref: "#/components/schemas/promotions-promotionParams"
        itemScope:
          $ref: "#/components/schemas/promotions-promotionItemScope"
        minBasketValue:
          $ref: "#/components/schemas/promotions-promotionMinBasket"
        maxBasketValue:
          $ref: "#/components/schemas/promotions-promotionMaxBasket"
        catalog:
          $ref: "#/components/schemas/promotions-promotionCatalog"
        catalogItemType:
          $ref: "#/components/schemas/promotions-promotionCatalogItemType"
        catalogIndexItems:
          $ref: "#/components/schemas/promotions-promotionCatalogIndexItems"
        catalogFilterIds:
          $ref: "#/components/schemas/promotions-promotionCatalogFilterIds"
        excludeCatalog:
          $ref: "#/components/schemas/promotions-promotionExcludeCatalog"
        excludeCatalogItemType:
          $ref: "#/components/schemas/promotions-promotionExcludeCatalogItemType"
        excludeCatalogIndexItems:
          $ref: "#/components/schemas/promotions-promotionExcludeCatalogIndexItems"
        excludeCatalogFilterIds:
          $ref: "#/components/schemas/promotions-promotionExcludeCatalogFilterIds"
        activationLimitGlobalType:
          $ref: "#/components/schemas/promotions-activationLimitGlobalType"
        activationLimitGlobalLimit:
          $ref: "#/components/schemas/promotions-activationLimitGlobalLimit"
        activationLimitGlobalRelativeMinutes:
          $ref: "#/components/schemas/promotions-activationLimitGlobalRelativeMinutes"
        storeCatalog:
          $ref: "#/components/schemas/promotions-promotionStoreCatalog"
        storeItemType:
          $ref: "#/components/schemas/promotions-promotionStoreItemType"
        storeIds:
          $ref: "#/components/schemas/promotions-promotionStoreIds"
        targetType:
          $ref: "#/components/schemas/promotions-promotionTargetType"
        targetSegment:
          $ref: "#/components/schemas/promotions-promotionTargetSegment"
        price:
          $ref: "#/components/schemas/promotions-promotionPrice"
        priority:
          $ref: "#/components/schemas/promotions-promotionPriority"
        voucherPool:
          $ref: "#/components/schemas/promotions-VoucherPool"
        importHash:
          $ref: "#/components/schemas/promotions-promotionImportHash"
    promotions-VoucherPool:
      type: object
      description: Settings for assigning codes from a voucher pool when the promotion is activated. When this is used, a promotion can only be redeemed once per activation.
      properties:
        enabled:
          type: boolean
          default: false
          description: Enables automatic assignment of codes from the pool when the promotion is activated.
        uuid:
          type: string
          format: uuid
          description: UUID of the voucher pool
        transferable:
          type: boolean
          default: false
          description: When `true`, the voucher can be redeemed by a different user than the one who activated the promotion.
    promotions-promotionExcludeCatalogFilterIds:
      type: array
      items:
        type: string
      description: |
        
        'An array of catalog filter IDs to be executed to fetch catalog items to exclude if `excludeCatalogItemType` is set to `FILTERED`.


        If `excludeCatalogItemType` is set to `ALL`, set `excludeCatalogFilterIds` to null.'
      nullable: true
      example: []
    promotions-promotionExcludeCatalogIndexItems:
      type: array
      items:
        type: string
      description: |
        
        'An array of items from the catalog to be excluded in the promotion if `excludeCatalogItemType` is set to `SELECTED`.


        If `excludeCatalogItemType` is set to `ALL`, set `excludeCatalogIndexItems` to null.'
      nullable: true
      example:
        - "29727276"
    promotions-promotionExcludeCatalogItemType:
      type: string
      enum:
        - ALL
        - SELECTED
        - FILTERED
      description: |
        
        - If set to "ALL", define the catalog in the `excludeCatalog` field and set `excludeCatalogIndexItems` to null.

        - If set to "SELECTED", define the catalog in the `excludeCatalog` field and provide a list of catalog items in `excludeCatalogIndexItems`.

        - If set to "FILTERED", define the catalog in the `excludeCatalog` field and provide a list of catalog filter ids in `excludeCatalogFilterIds`.
      default: ALL
      example: SELECTED
    promotions-promotionExcludeCatalog:
      type: string
      description: ID of the item catalog that the promotion should exclude
      nullable: true
      example:
        - "311"
    promotions-promotionDataDelete:
      type: object
      required:
        - value
      properties:
        value:
          type: string
          description: Code of the promotion to delete
    promotions-promotionDataCreateOrUpdate:
      type: object
      properties:
        uuid:
          $ref: "#/components/schemas/promotions-promotionUuid"
        code:
          $ref: "#/components/schemas/promotions-promotionCode"
        visibilityStatus:
          $ref: "#/components/schemas/promotions-promotionVisibility"
        type:
          $ref: "#/components/schemas/promotions-promotionType"
        redeemLimitPerClient:
          $ref: "#/components/schemas/promotions-promotionRedeemLimitPerClient"
        redeemQuantityPerActivation:
          $ref: "#/components/schemas/promotions-promotionRedeemQuantity"
        redeemLimitGlobal:
          $ref: "#/components/schemas/promotions-promotionRedeemLimitGlobal"
        redeemType:
          $ref: "#/components/schemas/promotions-promotionRedeemType"
        discountType:
          $ref: "#/components/schemas/promotions-promotionDiscountType"
        details:
          $ref: "#/components/schemas/promotions-promotionDetails"
        discountValue:
          $ref: "#/components/schemas/promotions-promotionDiscountValue"
        discountMode:
          $ref: "#/components/schemas/promotions-promotionDiscountMode"
        discountModeDetails:
          $ref: "#/components/schemas/promotions-promotionDiscountModeDetails"
        preDiscountValue:
          $ref: "#/components/schemas/promotions-promotionPreDiscountValue"
        requireRedeemedPoints:
          $ref: "#/components/schemas/promotions-promotionRequirePoints"
        headerName:
          $ref: "#/components/schemas/promotions-promotionHeaderName"
        headerDescription:
          $ref: "#/components/schemas/promotions-promotionHeaderDescription"
        name:
          $ref: "#/components/schemas/promotions-promotionName"
        headline:
          $ref: "#/components/schemas/promotions-promotionHeadline"
        description:
          $ref: "#/components/schemas/promotions-promotionDescription"
        images:
          $ref: "#/components/schemas/promotions-promotionImages"
        tags:
          $ref: "#/components/schemas/promotions-promotionTags"
        startAt:
          $ref: "#/components/schemas/promotions-promotionStartAt"
        expireAt:
          $ref: "#/components/schemas/promotions-promotionExpireAt"
        displayFrom:
          $ref: "#/components/schemas/promotions-promotionDisplayFrom"
        displayTo:
          $ref: "#/components/schemas/promotions-promotionDisplayTo"
        lastingTime:
          $ref: "#/components/schemas/promotions-promotionLastingTime"
        params:
          $ref: "#/components/schemas/promotions-promotionParams"
        itemScope:
          $ref: "#/components/schemas/promotions-promotionItemScope"
        minBasketValue:
          $ref: "#/components/schemas/promotions-promotionMinBasket"
        maxBasketValue:
          $ref: "#/components/schemas/promotions-promotionMaxBasket"
        catalog:
          $ref: "#/components/schemas/promotions-promotionCatalog"
        catalogItemType:
          $ref: "#/components/schemas/promotions-promotionCatalogItemType"
        catalogIndexItems:
          $ref: "#/components/schemas/promotions-promotionCatalogIndexItems"
        catalogFilterIds:
          $ref: "#/components/schemas/promotions-promotionCatalogFilterIds"
        excludeCatalog:
          $ref: "#/components/schemas/promotions-promotionExcludeCatalog"
        excludeCatalogItemType:
          $ref: "#/components/schemas/promotions-promotionExcludeCatalogItemType"
        excludeCatalogIndexItems:
          $ref: "#/components/schemas/promotions-promotionExcludeCatalogIndexItems"
        excludeCatalogFilterIds:
          $ref: "#/components/schemas/promotions-promotionExcludeCatalogFilterIds"
        storeCatalog:
          $ref: "#/components/schemas/promotions-promotionStoreCatalog"
        storeItemType:
          $ref: "#/components/schemas/promotions-promotionStoreItemType"
        storeIds:
          $ref: "#/components/schemas/promotions-promotionStoreIds"
        targetType:
          $ref: "#/components/schemas/promotions-promotionTargetType"
        targetSegment:
          $ref: "#/components/schemas/promotions-promotionTargetSegment"
        price:
          $ref: "#/components/schemas/promotions-promotionPrice"
        priority:
          $ref: "#/components/schemas/promotions-promotionPriority"
        voucherPool:
          $ref: "#/components/schemas/promotions-VoucherPool"
        importHash:
          $ref: "#/components/schemas/promotions-promotionImportHash"
    promotions-HTTP200withMessage:
      type: object
      properties:
        message:
          type: string
          description: Short summary of the response
    promotions-VouchersListWithErrors:
      type: object
      description: List of errors
      properties:
        httpStatus:
          allOf:
            - $ref: "#/components/schemas/promotions-ErrorV2HttpStatus"
            - default: 207
        traceId:
          type: string
          description: Trace ID for troubleshooting
          example: c72d530fd1b813ae
        timestamp:
          type: string
          format: date-timed
          description: Time when the error occurred
          example: 2021-12-28T08:27:54.549Z
        errorCode:
          allOf:
            - $ref: "#/components/schemas/promotions-ErrorV2Code"
            - default: ERR-003
        message:
          allOf:
            - $ref: "#/components/schemas/promotions-ErrorV2Message"
            - default: Batch operation failed
        errors:
          $ref: "#/components/schemas/promotions-BatchErrorItems"
        data:
          $ref: "#/components/schemas/promotions-VoucherList"
    promotions-BatchErrorItems:
      type: array
      description: A list of redemption errors
      items:
        $ref: "#/components/schemas/promotions-BatchError"
    promotions-BatchError:
      type: object
      description: Error that occurred and data source index
      properties:
        source:
          type: object
          description: Identifier of the item which caused the error
          properties:
            index:
              type: integer
              example: 1
              description: Index of an item which failed
        errorCode:
          allOf:
            - $ref: "#/components/schemas/promotions-ErrorV2Code"
            - example: ERR-002
        message:
          allOf:
            - $ref: "#/components/schemas/promotions-ErrorV2Message"
            - example: Invalid data
        errors:
          type: array
          description: Error details
          items:
            $ref: "#/components/schemas/promotions-ErrorSchema"
    promotions-ErrorSchema:
      type: object
      description: Error details
      properties:
        errorCode:
          allOf:
            - $ref: "#/components/schemas/promotions-ErrorV2Code"
            - example: VLD-080
        message:
          allOf:
            - $ref: "#/components/schemas/promotions-ErrorV2Message"
            - example: String fails to match the required pattern
        source:
          type: object
          description: The entity which caused a problem
          properties:
            pointer:
              type: string
              description: Pointer to the wrong element
    promotions-ErrorV2Code:
      type: string
      description: Error code which helps identify the issue. See [API error reference](https://hub.synerise.com/api-reference/errors.html).
      example: ERR-001
    promotions-ErrorV2HttpStatus:
      type: number
      description: HTTP status of the error
      example: 500
    promotions-RedeemVouchersRequest:
      type: array
      description: Vouchers to redeem
      items:
        $ref: "#/components/schemas/promotions-RedeemVoucher"
    promotions-RedeemVoucher:
      required:
        - voucherKey
        - voucherValue
      type: object
      properties:
        options:
          $ref: "#/components/schemas/promotions-VoucherRedeemOptions"
        voucherKey:
          $ref: "#/components/schemas/promotions-VoucherKey"
        voucherValue:
          $ref: "#/components/schemas/promotions-VoucherValue"
      example:
        voucherKey: code
        voucherValue: 75d9090f-06ac-46a2-a0ce-4b8eb287efb9
        options:
          quantity: 1
          sourceId: 75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1
          orderId: 75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1
          lockIdentifier: 75d9090f-06ac-46a2-a0ce-4b8eb287efb9
    promotions-VoucherValue:
      description: Value of the selected identifier
      type: string
      example: "434428563"
    promotions-VoucherKey:
      type: string
      example: code
      description: Type of voucher identifier
      enum:
        - code
    promotions-VoucherRedeemOptions:
      type: object
      description: Additional options of the operation
      properties:
        quantity:
          $ref: "#/components/schemas/promotions-Quantity"
        sourceId:
          $ref: "#/components/schemas/promotions-SourceId"
        orderId:
          $ref: "#/components/schemas/promotions-OrderId"
    promotions-OrderId:
      description: Receipt ID for which the voucher was redeemed.
      type: string
      example: 3f0a1670-eb63-43f1-a6b8-895a74621964
    promotions-SourceId:
      description: "The source of redemption. It should be unique to ensure that redemptions are successfully deduplicated when retried. Example: a concatenation of receipt ID and index of the discounted transaction line on the receipt."
      type: string
      example: 3f0a1670-eb63-43f1-a6b8-895a74621964-3
    promotions-Quantity:
      description: Quantity of redeemed items
      type: integer
      example: 2
      default: 1
    promotions-RedeemVouchersForProfileRequest:
      type: array
      description: Vouchers to redeem
      items:
        $ref: "#/components/schemas/promotions-RedeemVoucherForProfile"
    promotions-RedeemVoucherForProfile:
      type: object
      required:
        - profileKey
        - profileValue
        - voucherKey
        - voucherValue
      properties:
        profileKey:
          $ref: "#/components/schemas/promotions-clientKey"
        profileValue:
          $ref: "#/components/schemas/promotions-clientKeyValue"
        voucherKey:
          $ref: "#/components/schemas/promotions-VoucherKey"
        voucherValue:
          $ref: "#/components/schemas/promotions-VoucherValue"
        options:
          $ref: "#/components/schemas/promotions-VoucherRedeemOptions"
    promotions-PromotionImportBatchPartialErrorResponse:
      type: object
      properties:
        httpStatus:
          $ref: "#/components/schemas/promotions-ErrorV2HttpStatus"
        errorCode:
          $ref: "#/components/schemas/promotions-ErrorV2Code"
        message:
          $ref: "#/components/schemas/promotions-ErrorV2Message"
        help:
          type: string
          nullable: true
          description: Currently unused
        data:
          anyOf:
            - $ref: "#/components/schemas/promotions-SuccessfulBatchDeleteData"
            - $ref: "#/components/schemas/promotions-SuccessfulBatchImportData"
        errors:
          type: array
          description: Per-item failures. The position in the original `data[]` array is reported via `source.index`.
          items:
            type: object
            properties:
              source:
                type: object
                description: Information about the property that caused the problem
                properties:
                  index:
                    type: integer
                    description: Zero-based index of the failing item in the request `data[]` array.
              errorCode:
                $ref: "#/components/schemas/promotions-ErrorV2Code"
              message:
                $ref: "#/components/schemas/promotions-ErrorV2Message"
              help:
                type: string
                nullable: true
                description: Currently unused
              httpStatus:
                $ref: "#/components/schemas/promotions-ErrorV2HttpStatus"
              errors:
                type: array
                nullable: true
                description: "Per-field validation failures for this item. Present when the failure is a Joi body validation error (`errorCode: ERR-042`). Joi runs with `abortEarly: false`, so a single item may report multiple field violations."
                items:
                  type: object
                  properties:
                    source:
                      type: object
                      properties:
                        pointer:
                          type: string
                          description: JSON Pointer (RFC 6901) into the failing item, e.g. `/code`, `/discountModeDetails/discountSteps/0/usageThreshold`.
                    errorCode:
                      $ref: "#/components/schemas/promotions-ErrorV2Code"
                    message:
                      type: string
                      description: Original Joi message for the field.
                    help:
                      type: string
                      nullable: true
                      description: Currently unused
                    httpStatus:
                      $ref: "#/components/schemas/promotions-ErrorV2HttpStatus"
    promotions-SuccessfulBatchImportData:
      title: Import
      type: array
      minLength: 0
      description: Promotions with correct data, queued for import. If `discountMode` wasn't included in the request, it's set to `STATIC`. Other properties are only included if they were added to the request.
      items:
        $ref: "#/components/schemas/promotions-promotionImportData"
    promotions-promotionImportData:
      type: object
      description: |
        Promotion payload accepted by the batch import endpoint. Applies SPD-2026-03 limits.

        Cross-field validation (items violating these rules are rejected as `PromotionImportStatus` with `status: FAILED` on the `promotions-changes` topic):
          - `name` and `headerName` MUST be non-empty when `visibilityStatus` is `HIDDEN` or `PUBLISH`.
          - `catalog` is REQUIRED when `catalogItemType` is `SELECTED` or `FILTERED`.
          - `excludeCatalog` is REQUIRED when `excludeCatalogItemType` is `SELECTED` or `FILTERED`.
          - When `details.discountType.name` is `BOGO` and `itemScope` is `LINE_ITEM`, `discountType` MUST be one of `PERCENT`, `AMOUNT`, `EXACT_PRICE`, `DIGITAL_CASHBACK`.
          - `expireAt` MUST be greater than `startAt`; `displayTo` MUST be greater than `displayFrom`; `maxBasketValue` MUST be greater than `minBasketValue`.
      anyOf:
        - required:
            - uuid
        - required:
            - code
      properties:
        uuid:
          $ref: "#/components/schemas/promotions-promotionUuid"
        code:
          $ref: "#/components/schemas/promotions-promotionCode"
        visibilityStatus:
          $ref: "#/components/schemas/promotions-promotionVisibility"
        type:
          $ref: "#/components/schemas/promotions-promotionType"
        redeemLimitPerClient:
          $ref: "#/components/schemas/promotions-promotionRedeemLimitPerClient"
        redeemQuantityPerActivation:
          $ref: "#/components/schemas/promotions-promotionRedeemQuantity"
        redeemLimitGlobal:
          $ref: "#/components/schemas/promotions-promotionRedeemLimitGlobal"
        redeemType:
          $ref: "#/components/schemas/promotions-promotionRedeemType"
        autoRedeem:
          $ref: "#/components/schemas/promotions-promotionAutoRedeem"
        activationLimitGlobalType:
          $ref: "#/components/schemas/promotions-activationLimitGlobalType"
        activationLimitGlobalLimit:
          $ref: "#/components/schemas/promotions-activationLimitGlobalLimit"
        activationLimitGlobalRelativeMinutes:
          $ref: "#/components/schemas/promotions-activationLimitGlobalRelativeMinutes"
        discountType:
          $ref: "#/components/schemas/promotions-promotionDiscountType"
        details:
          $ref: "#/components/schemas/promotions-promotionImportDetails"
        discountValue:
          $ref: "#/components/schemas/promotions-promotionDiscountValue"
        discountMode:
          $ref: "#/components/schemas/promotions-promotionDiscountMode"
        discountModeDetails:
          $ref: "#/components/schemas/promotions-promotionImportDiscountModeDetails"
        preDiscountValue:
          $ref: "#/components/schemas/promotions-promotionPreDiscountValue"
        requireRedeemedPoints:
          $ref: "#/components/schemas/promotions-promotionRequirePoints"
        headerName:
          $ref: "#/components/schemas/promotions-promotionHeaderName"
        headerDescription:
          $ref: "#/components/schemas/promotions-promotionHeaderDescription"
        name:
          $ref: "#/components/schemas/promotions-promotionName"
        headline:
          $ref: "#/components/schemas/promotions-promotionImportHeadline"
        description:
          $ref: "#/components/schemas/promotions-promotionDescription"
        images:
          $ref: "#/components/schemas/promotions-promotionImportImages"
        tags:
          $ref: "#/components/schemas/promotions-promotionImportTags"
        metric:
          $ref: "#/components/schemas/promotions-promotionMetric"
        startAt:
          $ref: "#/components/schemas/promotions-promotionStartAt"
        expireAt:
          $ref: "#/components/schemas/promotions-promotionExpireAt"
        displayFrom:
          $ref: "#/components/schemas/promotions-promotionDisplayFrom"
        displayTo:
          $ref: "#/components/schemas/promotions-promotionDisplayTo"
        lastingTime:
          $ref: "#/components/schemas/promotions-promotionLastingTime"
        params:
          $ref: "#/components/schemas/promotions-promotionImportParams"
        itemScope:
          $ref: "#/components/schemas/promotions-promotionItemScope"
        minBasketValue:
          $ref: "#/components/schemas/promotions-promotionMinBasket"
        maxBasketValue:
          $ref: "#/components/schemas/promotions-promotionMaxBasket"
        catalog:
          $ref: "#/components/schemas/promotions-promotionImportCatalog"
        catalogItemType:
          $ref: "#/components/schemas/promotions-promotionCatalogItemType"
        catalogIndexItems:
          $ref: "#/components/schemas/promotions-promotionImportCatalogIndexItems"
        catalogFilterIds:
          $ref: "#/components/schemas/promotions-promotionImportCatalogFilterIds"
        excludeCatalog:
          $ref: "#/components/schemas/promotions-promotionImportExcludeCatalog"
        excludeCatalogItemType:
          $ref: "#/components/schemas/promotions-promotionExcludeCatalogItemType"
        excludeCatalogIndexItems:
          $ref: "#/components/schemas/promotions-promotionImportExcludeCatalogIndexItems"
        excludeCatalogFilterIds:
          $ref: "#/components/schemas/promotions-promotionImportExcludeCatalogFilterIds"
        storeCatalog:
          $ref: "#/components/schemas/promotions-promotionImportStoreCatalog"
        storeItemType:
          $ref: "#/components/schemas/promotions-promotionStoreItemType"
        storeIds:
          $ref: "#/components/schemas/promotions-promotionImportStoreIds"
        targetType:
          $ref: "#/components/schemas/promotions-promotionTargetType"
        targetSegment:
          $ref: "#/components/schemas/promotions-promotionImportTargetSegment"
        price:
          $ref: "#/components/schemas/promotions-promotionPrice"
        priority:
          $ref: "#/components/schemas/promotions-promotionPriority"
        voucherPool:
          $ref: "#/components/schemas/promotions-VoucherPool"
    promotions-promotionImportTargetSegment:
      type: array
      maxItems: 10
      nullable: true
      description: This field applies only when `targetType` is set to "SEGMENT" (import limit — 10 entries).
      items:
        type: string
        description: ID of the segmentation of profiles that can redeem this promotion
    promotions-promotionImportStoreIds:
      type: array
      maxItems: 500
      items:
        type: string
      description: An array of stores from the store catalog where the promotion is available if `storeItemType` is set to `SELECTED` (import limit — 500 entries).
      nullable: true
    promotions-promotionImportStoreCatalog:
      type: string
      nullable: true
      minLength: 1
      maxLength: 255
      description: ID of the store catalog that the promotion applies to (import limit — 255 chars).
    promotions-promotionImportExcludeCatalogFilterIds:
      type: array
      items:
        type: string
      nullable: true
      maxItems: 5
      description: Catalog filter IDs for FILTERED exclusion (import limit — 5 entries). Requires `excludeCatalog` to be defined.
    promotions-promotionImportExcludeCatalogIndexItems:
      type: array
      items:
        type: string
      nullable: true
      maxItems: 50
      description: Catalog items excluded from the promotion (import limit — 50 entries). Requires `excludeCatalog` to be defined.
    promotions-promotionImportExcludeCatalog:
      type: string
      nullable: true
      maxLength: 255
      description: ID of the item catalog excluded from the promotion (import limit — 255 chars). Required when `excludeCatalogItemType` is `SELECTED` or `FILTERED`.
    promotions-promotionImportCatalogFilterIds:
      type: array
      items:
        type: string
      nullable: true
      maxItems: 5
      description: Catalog filter IDs for FILTERED targeting (import limit — 5 entries). Requires `catalog` to be defined.
    promotions-promotionImportCatalogIndexItems:
      type: array
      items:
        type: string
      nullable: true
      maxItems: 50
      description: Catalog items included in the promotion (import limit — 50 entries). Requires `catalog` to be defined.
    promotions-promotionImportCatalog:
      type: string
      nullable: true
      maxLength: 255
      description: ID of the item catalog targeted by the promotion (import limit — 255 chars). Required when `catalogItemType` is `SELECTED` or `FILTERED`.
    promotions-promotionImportParams:
      type: object
      description: |
        A JSON object with any custom parameters of type string, object, array.

        Import limit — serialized JSON must not exceed 128 KB (131072 bytes).
      nullable: true
      additionalProperties: true
    promotions-promotionImportTags:
      description: |
        An array of tags (import limit — 20 entries).

        **IMPORTANT:** To be able to use a tag for promotions, you must first assign the tag to a directory with `"type":"promotion"`. If the directory type does not exist, create it using [this endpoint](https://developers.synerise.com/AssetManagement/AssetManagement.html#operation/createDirectoryType). Then create a directory of that type and assign tags to it.
      type: array
      maxItems: 20
      items:
        type: object
        properties:
          hash:
            type: string
            description: Hash ID of the tag
            example: 6f54671d-157f-4c4e-a577-11fac3111293
      nullable: true
    promotions-promotionImportImages:
      type: array
      maxItems: 8
      nullable: true
      items:
        required:
          - url
          - type
        type: object
        properties:
          url:
            description: Image or thumbnail source
            type: string
            example: https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png
          type:
            type: string
            enum:
              - image
              - thumbnail
      description: Images and thumbnails for the promotion (import limit — 8 entries).
    promotions-promotionImportHeadline:
      type: string
      nullable: true
      maxLength: 255
      description: Promotion headline displayed to viewers (import limit — 255 chars).
    promotions-promotionImportDiscountModeDetails:
      type: object
      nullable: true
      description: Step discount configuration (import limit — up to 5 steps).
      required:
        - discountUsageTrigger
      properties:
        steps:
          type: array
          maxItems: 5
          items:
            required:
              - discountValue
              - usageThreshold
            type: object
            properties:
              discountValue:
                type: number
                description: Discount value in given step.
              usageThreshold:
                type: number
                description: Threshold after current step would apply.
        discountUsageTrigger:
          type: string
          enum:
            - TRANSACTION
            - REDEEM
          description: Describe after what action new steps would be applied.
    promotions-promotionImportDetails:
      type: object
      description: |
        Promotion details.

        Import limit — serialized JSON must not exceed 128 KB (131072 bytes).
      nullable: true
      properties:
        discountType:
          $ref: "#/components/schemas/promotions-promotionDiscountTypeDetails"
        cashbackSettings:
          $ref: "#/components/schemas/promotions-cashbackSettings"
    promotions-promotionAutoRedeem:
      type: boolean
      nullable: true
      description: If true, the promotion is automatically redeemed on activation.
    promotions-SuccessfulBatchDeleteData:
      title: Delete
      type: array
      minLength: 0
      description: Promotions correctly added to queue for deletion.
      items:
        type: object
        properties:
          code:
            $ref: "#/components/schemas/promotions-promotionCode"
    promotions-PromotionImportBatchAcceptedResponse:
      type: object
      properties:
        data:
          $ref: "#/components/schemas/promotions-SuccessfulBatchImportData"
    promotions-PromotionImportBatchRequest:
      type: object
      required:
        - data
      properties:
        data:
          type: array
          items:
            $ref: "#/components/schemas/promotions-promotionImportData"
          minItems: 1
          maxItems: 1000
          description: Array of promotion objects to import (upsert)
        extra:
          type: object
          description: Import metadata
          nullable: true
          properties:
            importHash:
              type: string
              description: Import identifier for troubleshooting
              maxLength: 255
              nullable: true
    promotions-PromotionImportBatchDeleteAcceptedResponse:
      type: object
      properties:
        data:
          type: array
          description: Array of promotions queued for deletion
          items:
            type: object
            properties:
              code:
                $ref: "#/components/schemas/promotions-promotionCode"
    promotions-PromotionDeleteBatchRequest:
      type: object
      required:
        - data
      properties:
        data:
          type: array
          items:
            $ref: "#/components/schemas/promotions-PromotionDeleteItem"
          minItems: 1
          maxItems: 1000
          description: Array of objects with promotion code to delete
        extra:
          type: object
          nullable: true
          description: Additional metadata
          properties:
            importHash:
              type: string
              description: Import identifier for troubleshooting
              maxLength: 255
              nullable: true
    promotions-PromotionDeleteItem:
      type: object
      description: Item accepted by the batch delete endpoint. The promotion is identified by its code.
      required:
        - code
      properties:
        code:
          $ref: "#/components/schemas/promotions-promotionCode"
    promotions-processSaleRes:
      type: object
      properties:
        responseCode:
          $ref: "#/components/schemas/promotions-responseCode"
        responseDescription:
          $ref: "#/components/schemas/promotions-responseDescription"
        operationId:
          $ref: "#/components/schemas/promotions-operationId"
        clientDateTime:
          $ref: "#/components/schemas/promotions-clientDateTime"
        terminal:
          $ref: "#/components/schemas/promotions-terminal"
        transactionMetric:
          $ref: "#/components/schemas/promotions-transactionMetric"
        finalValue:
          $ref: "#/components/schemas/promotions-finalValue"
        promotionErrors:
          type: array
          items:
            $ref: "#/components/schemas/promotions-promotionErrors"
        transactionItems:
          type: array
          items:
            $ref: "#/components/schemas/promotions-transactionItemWithGrants"
          description: Array of processed transaction items
        transactionAdditionalItem:
          type: array
          items:
            $ref: "#/components/schemas/promotions-transactionAdditionalItem"
          description: Array of processed additional items, currently not used
        transactionGrantReport:
          type: array
          description: Report of printouts related to the transaction, currently not used
          items: {}
    promotions-transactionAdditionalItem:
      type: object
      required:
        - seqNo
        - type
        - code
      properties:
        seqNo:
          type: integer
          description: Sequential number of additional item
        type:
          type: string
          description: Type of the additional item
          enum:
            - COUPON
        code:
          type: string
          description: Code of the additional item
    promotions-transactionItemWithGrants:
      type: object
      required:
        - seqNo
        - articleRef
        - quantity
        - evidPrice
        - finalPrice
        - finalValue
        - grantedDiscounts
      properties:
        seqNo:
          $ref: "#/components/schemas/promotions-TransactionItemSeqNo"
        articleRef:
          $ref: "#/components/schemas/promotions-TransactionItemArticleRef"
        quantity:
          $ref: "#/components/schemas/promotions-TransactionItemQuantity"
        evidPrice:
          $ref: "#/components/schemas/promotions-TransactionItemEvidPrice"
        finalPrice:
          $ref: "#/components/schemas/promotions-TransactionItemFinalPrice"
        finalValue:
          $ref: "#/components/schemas/promotions-TransactionItemFinalValue"
        grantedDiscounts:
          type: array
          items:
            $ref: "#/components/schemas/promotions-grantedDiscount"
          description: Array of granted discounts
    promotions-grantedDiscount:
      type: object
      required:
        - source
        - priceDiscount
      properties:
        source:
          $ref: "#/components/schemas/promotions-discountSource"
        priceDiscount:
          type: string
          description: The amount subtracted from `evidPrice`
          example: "12.45"
    promotions-discountSource:
      type: object
      description: Source of the discount
      required:
        - type
        - id
      properties:
        type:
          type: integer
          description: |
            
            By default:

            - `1` for promotions from your own database

            - `2` for promotions from your Synerise Workspace
        id:
          type: string
          description: ID of the promotion in the source domain, for example a promotion code
    promotions-TransactionItemFinalValue:
      type: string
      description: "The total cost of the product: `finalValue = finalPrice * quantity`"
      example: "123.23"
    promotions-TransactionItemFinalPrice:
      type: string
      description: Price per unit after discount, including tax
      example: "30.23"
    promotions-TransactionItemEvidPrice:
      type: string
      description: Price per unit before discount, including tax
      example: "34.23"
    promotions-TransactionItemQuantity:
      type: string
      description: Quantity of the product, provided to 3 decimal places
      example: "3.231"
    promotions-TransactionItemArticleRef:
      type: string
      description: Item's identifier in the product catalog
    promotions-TransactionItemSeqNo:
      type: integer
      description: Sequential number of transaction line item
    promotions-promotionErrors:
      type: array
      description: Array of promotion errors
      items:
        $ref: "#/components/schemas/promotions-promotionError"
    promotions-promotionError:
      type: object
      description: Details of errors that occurred during promotion activation
      properties:
        key:
          type: string
          description: Type of promotion identifier
          enum:
            - uuid
            - code
        value:
          type: string
          description: Value of the selected identifier
        error:
          $ref: "#/components/schemas/promotions-PromotionActivationErrorSchema"
    promotions-PromotionActivationErrorSchema:
      type: object
      description: Details of an error
      properties:
        errorCode:
          $ref: "#/components/schemas/promotions-OptionalErrorV2Code"
        message:
          $ref: "#/components/schemas/promotions-ResponseErrorMessage"
      example:
        message: Points not met limits for activation
        name: PointsNotMetError
        errorCode: ERR-042
    promotions-OptionalErrorV2Code:
      type: string
      description: Error code which helps identify the issue. See [API error reference](https://hub.synerise.com/api-reference/errors.html).
      example: ERR-001
      nullable: true
    promotions-finalValue:
      type: string
      description: The total cost of all items in the basket, after discounts, including tax
    promotions-transactionMetric:
      type: object
      description: Metadata of the transaction
      required:
        - posTransactionId
        - beginDateTime
        - globalTransactionId
      properties:
        posTransactionId:
          type: integer
          description: ID of the transaction within the POS
        beginDateTime:
          format: date-time
          description: Time when the transaction starts
        globalTransactionId:
          type: string
          description: Global transaction ID
          nullable: true
    promotions-terminal:
      type: object
      description: Data about the terminal that is the transaction's source
      required:
        - storeId
        - posId
      properties:
        storeId:
          type: string
          description: ID of the store
        posId:
          type: integer
          description: ID of the point of sale (POS)
    promotions-clientDateTime:
      type: string
      format: date-time
      description: Operation's start time
    promotions-operationId:
      type: integer
      description: Operation ID
      nullable: false
    promotions-responseDescription:
      type: string
      description: Description of the response. Used for diagnostics and troubleshooting.
    promotions-responseCode:
      type: number
      description: Response code. 0 is the same as HTTP 200. Other HTTP codes are sent as usual.
    promotions-processSaleReq:
      type: object
      required:
        - operationId
        - clientDateTime
        - terminal
        - transactionMetric
        - finalValue
        - transactionItems
        - transactionAdditionalItems
        - paymentsReport
      properties:
        operationId:
          $ref: "#/components/schemas/promotions-operationId"
        clientDateTime:
          $ref: "#/components/schemas/promotions-clientDateTime"
        terminal:
          $ref: "#/components/schemas/promotions-terminal"
        transactionMetric:
          $ref: "#/components/schemas/promotions-transactionMetric"
        finalValue:
          $ref: "#/components/schemas/promotions-finalValue"
        transactionItems:
          type: array
          items:
            $ref: "#/components/schemas/promotions-transactionItemWithoutGrants"
          description: Array of transaction items
        transactionAdditionalItems:
          type: array
          items:
            $ref: "#/components/schemas/promotions-transactionAdditionalItem"
          description: Array of additional items in the transaction
        paymentsReport:
          $ref: "#/components/schemas/promotions-paymentsReport"
        promotionsToActivate:
          type: array
          items:
            $ref: "#/components/schemas/promotions-promotionActivationProcessSale"
          description: Array of promotions to activate during the sale process
    promotions-promotionActivationProcessSale:
      required:
        - key
        - value
        - pointsToUse
      type: object
      properties:
        key:
          type: string
          description: Type of promotion identifier
          enum:
            - uuid
            - code
        value:
          type: string
          description: Value of the selected identifier
        pointsToUse:
          type: integer
          minimum: 0
          description: How many points should be converted to digital money and stored as ready to redeem in transactions in digital cashback promotions.
      example:
        key: code
        value: 7893467834GG
        pointsToUse: 100
    promotions-paymentsReport:
      type: object
      description: Payment information
      required:
        - paymentItems
      properties:
        paymentItems:
          type: array
          description: Array of payment methods information
          items:
            $ref: "#/components/schemas/promotions-paymentItem"
    promotions-paymentItem:
      type: object
      required:
        - seqNo
        - type
        - name
        - amount
      properties:
        seqNo:
          type: integer
          description: Sequential number of payment method
        type:
          type: integer
          description: Type of payment method (id in external dictionary)
        name:
          type: string
          description: Name of the payment method
        amount:
          type: string
          description: Amount of payment
        hashCode:
          type: string
          description: Hash code of payment method
    promotions-transactionItemWithoutGrants:
      type: object
      required:
        - seqNo
        - articleRef
        - quantity
        - evidPrice
        - finalPrice
        - finalValue
      properties:
        seqNo:
          $ref: "#/components/schemas/promotions-TransactionItemSeqNo"
        articleRef:
          $ref: "#/components/schemas/promotions-TransactionItemArticleRef"
        quantity:
          $ref: "#/components/schemas/promotions-TransactionItemQuantity"
        evidPrice:
          $ref: "#/components/schemas/promotions-TransactionItemEvidPrice"
        finalPrice:
          $ref: "#/components/schemas/promotions-TransactionItemFinalPrice"
        finalValue:
          $ref: "#/components/schemas/promotions-TransactionItemFinalValue"
    promotions-processCheckoutRes:
      type: object
      properties:
        responseCode:
          $ref: "#/components/schemas/promotions-responseCode"
        responseDescription:
          $ref: "#/components/schemas/promotions-responseDescription"
        operationId:
          $ref: "#/components/schemas/promotions-operationId"
        clientDateTime:
          $ref: "#/components/schemas/promotions-clientDateTime"
        terminal:
          $ref: "#/components/schemas/promotions-terminal"
        transactionGrantReport:
          type: object
          description: Report of printouts related to the transaction
          properties:
            printouts:
              type: array
              items:
                $ref: "#/components/schemas/promotions-printout"
    promotions-printout:
      type: object
      properties:
        source:
          type: object
          properties:
            source:
              $ref: "#/components/schemas/promotions-discountSource"
            printoutType:
              type: string
              enum:
                - FREE_TEXT
                - COUPON
              description: Type of printout
            printoutId:
              type: string
              description: ID of printout in source domain
            text:
              type: string
              description: Printout information text. Default name of handbill configuration.
            variables:
              type: array
              items:
                $ref: "#/components/schemas/promotions-printoutVariable"
    promotions-printoutVariable:
      type: object
      properties:
        type:
          type: string
          enum:
            - CODE
          description: Type of variable attached to printout
        value:
          type: string
          description: Value of the variable. Eg. code of coupon.
    promotions-processCheckoutReq:
      type: object
      required:
        - operationId
        - clientDateTime
        - terminal
        - transactionMetric
        - finalValue
        - transactionItems
        - transactionAdditionalItems
        - paymentsReport
      properties:
        operationId:
          $ref: "#/components/schemas/promotions-operationId"
        clientDateTime:
          $ref: "#/components/schemas/promotions-clientDateTime"
        terminal:
          $ref: "#/components/schemas/promotions-terminal"
        transactionMetric:
          $ref: "#/components/schemas/promotions-transactionMetric"
        finalValue:
          $ref: "#/components/schemas/promotions-finalValue"
        transactionItems:
          type: array
          items:
            $ref: "#/components/schemas/promotions-transactionItemWithoutGrants"
          description: Array of transaction items
        transactionAdditionalItems:
          type: array
          items:
            $ref: "#/components/schemas/promotions-transactionAdditionalItem"
          description: Array of additional items in the transaction
        paymentsReport:
          $ref: "#/components/schemas/promotions-paymentsReport"
    promotions-handbillConfigWithSimplifiedVariants:
      type: object
      description: Details of a single handbill configuration
      properties:
        uuid:
          $ref: "#/components/schemas/promotions-handbillUuid"
        createdAt:
          $ref: "#/components/schemas/promotions-objectCreatedAt"
        updatedAt:
          $ref: "#/components/schemas/promotions-objectUpdatedAt"
        channel:
          $ref: "#/components/schemas/promotions-handbillChannel"
        status:
          $ref: "#/components/schemas/promotions-handbillStatus"
        userId:
          $ref: "#/components/schemas/promotions-userId"
        origin:
          $ref: "#/components/schemas/promotions-handbillOrigin"
        name:
          $ref: "#/components/schemas/promotions-handbillName"
        description:
          $ref: "#/components/schemas/promotions-handbillDescription"
        controlGroup:
          $ref: "#/components/schemas/promotions-handbillControlGroup"
        variants:
          $ref: "#/components/schemas/promotions-handbillVariantsSimple"
    promotions-handbillVariantsSimple:
      type: array
      description: Variants of the handbill configuration.
      items:
        type: object
        description: Handbill variant
        properties:
          name:
            $ref: "#/components/schemas/promotions-handbillVariantName"
          uuid:
            $ref: "#/components/schemas/promotions-handbillVariantUuid"
          percentage:
            $ref: "#/components/schemas/promotions-handbillVariantPercentage"
          ai:
            $ref: "#/components/schemas/promotions-handbillVariantAi"
    promotions-handbillVariantAi:
      type: object
      description: Additional configuration for the AI recommendations engine
      required:
        - controlVariant
      properties:
        controlVariant:
          type: boolean
          description: "When `true`, the promotions are assigned at random. When `false`, the promotions are assigned based on the AI recommendations settings: `varietyFactor`, `varietyGroupSize`,`redistributionFrequencyFactor`, `popularityBoosting`."
        varietyFactor:
          description: Adjust the variety of returned promotions. The higher the number, the more variety. The choice of promotions is calculated by the AI.
          type: number
          minimum: 0
          maximum: 1
          example: 0.5
        varietyGroupSize:
          description: Defines how many similar items may be recommended. This is calculated in according to `varietyFactor`.
          type: integer
          minimum: 1
          example: 1
        redistributionFrequencyFactor:
          description: Allows adjusting the frequency of promotion redistribution. The default value of 1 allows the model to decide how often to redistribute promotions. A value lower than 1 decreases redistribution frequency, a value higher than 1 increases it.
          type: number
          minimum: 0.5
          maximum: 1.5
          example: 0.5
        popularityBoosting:
          description: Allows adjusting how important product popularity is for the promotions model. Higher values increase the importance.
          type: number
          minimum: 0
          maximum: 1
          example: 1
    promotions-handbillVariantPercentage:
      type: integer
      description: The size of the group, in relation to the entire group to which the promotion applies. The control group and the groups for each variant must sum up to 100%.
    promotions-handbillVariantUuid:
      type: string
      format: uuid
      description: UUID of the variant. Generated automatically. Do not send this field in create/update requests.
    promotions-handbillVariantName:
      type: string
      description: Name of the variant
    promotions-handbillControlGroup:
      nullable: true
      description: Details of the control group. A control group is the part of profiles who are not offered any promotions so their activity can be compared with promotion-enabled profiles to check a promotion's effectiveness.
      type: object
      required:
        - name
        - percentage
      properties:
        name:
          type: string
          description: Name of the control group
        percentage:
          $ref: "#/components/schemas/promotions-handbillVariantPercentage"
    promotions-handbillDescription:
      type: string
      description: Description of the handbill configuration
    promotions-handbillName:
      type: string
      description: Name of the handbill configuration
    promotions-handbillOrigin:
      type: string
      enum:
        - USER
        - PROFILE
      description: Informs if this object was created/updated by a User or a Workspace.
    promotions-userId:
      type: integer
      description: ID of the user who created this object or the last user who updated it, if applicable
    promotions-handbillStatus:
      type: string
      description: Status of the handbill
      enum:
        - DRAFT
        - ACTIVE
        - INACTIVE
    promotions-handbillChannel:
      description: |-
        Channel of the handbill.
        * CHECK_IN means that the promotions are offered before a purchase.
        * CHECK_OUT means that promotions are offered after a purchase, and can be used in a future transaction.
        * MOBILE is used to deliver promotions to a mobile application.
      type: string
      enum:
        - MOBILE
        - CHECK_OUT
        - CHECK_IN
    promotions-objectUpdatedAt:
      type: string
      format: date-time
      description: Time when the object was last updated
    promotions-handbillUuid:
      type: string
      format: uuid
      description: UUID of the variant. Generated automatically.
    promotions-handbillConfig:
      type: object
      description: Details of a single handbill configuration
      properties:
        uuid:
          $ref: "#/components/schemas/promotions-handbillUuid"
        createdAt:
          $ref: "#/components/schemas/promotions-objectCreatedAt"
        updatedAt:
          $ref: "#/components/schemas/promotions-objectUpdatedAt"
        channel:
          $ref: "#/components/schemas/promotions-handbillChannel"
        status:
          $ref: "#/components/schemas/promotions-handbillStatus"
        userId:
          $ref: "#/components/schemas/promotions-userId"
        origin:
          $ref: "#/components/schemas/promotions-handbillOrigin"
        name:
          $ref: "#/components/schemas/promotions-handbillName"
        description:
          $ref: "#/components/schemas/promotions-handbillDescription"
        controlGroup:
          $ref: "#/components/schemas/promotions-handbillControlGroup"
        variants:
          $ref: "#/components/schemas/promotions-handbillVariants"
    promotions-handbillVariants:
      type: array
      description: Variants of the handbill configuration. If you do not want to use variants, send an empty array.
      items:
        type: object
        description: Handbill variant
        required:
          - name
          - percentage
          - ai
          - limits
          - activity
        properties:
          name:
            $ref: "#/components/schemas/promotions-handbillVariantName"
          uuid:
            $ref: "#/components/schemas/promotions-handbillVariantUuid"
          percentage:
            $ref: "#/components/schemas/promotions-handbillVariantPercentage"
          ai:
            $ref: "#/components/schemas/promotions-handbillVariantAi"
          limits:
            $ref: "#/components/schemas/promotions-handbillVariantLimits"
          activity:
            $ref: "#/components/schemas/promotions-handbillVariantActivity"
          printout:
            $ref: "#/components/schemas/promotions-handbillVariantPrintout"
          filterIds:
            type: array
            description: An array of filter UUIDs
            deprecated: true
            items:
              type: string
              format: uuid
          types:
            $ref: "#/components/schemas/promotions-handbillVariantTypes"
          excludeByAvailableProducts:
            $ref: "#/components/schemas/promotions-handbillExcludeByAvailableProducts"
          slotFilters:
            $ref: "#/components/schemas/promotions-handbillVariantSlotFilters"
    promotions-handbillVariantSlotFilters:
      type: object
      description: Slots to include in the coupon
      nullable: true
      required:
        - order
        - slots
      properties:
        order:
          type: string
          enum:
            - GIVEN
            - AI
          description: |-
            The type of slot ordering when they are returned, where:
                `GIVEN` - slots are returned in the order they were created
                `AI` - order of slots is changed by AI engine score
        slots:
          type: array
          description: Slots in the coupon. You can use them, for example, to create a slot that will only show promotions for a certain brand, and another for all the other brands. This is done by applying filters that include certain promotions.
          items:
            type: object
            required:
              - filterId
              - limit
            properties:
              filterId:
                description: UUID of a filter with promotions
                type: string
                format: uuid
              limit:
                description: Number of promotions to be returned a in given slot
                type: number
                minimum: 1
                maximum: 50
                example: 5
    promotions-handbillExcludeByAvailableProducts:
      description: When `true`, promotions aren't generated for items which already belong to another assigned promotion.
      type: boolean
      example: true
      default: true
      nullable: false
    promotions-handbillVariantTypes:
      type: array
      nullable: true
      description: Array of promotions types which will be taken as promotion candidates to assign. When set to null, only promotions with HANDBILL type will be considered as candidates.  For type HANDBILL, promotions are assigned with lasting date calculated by `activity` settings in variant, so all get promotions endpoints consider those dates when filtering by `lastingOnly` flag. For other types than HANDBILL, promotions lasting date is only respected in `/get-for-client/handbill/:handbillUuid` endpoint. Other get promotions endpoints don't filter those promotions by `lastingOnly` flag.
      items:
        type: string
        description: Promotion type
        enum:
          - MEMBERS_ONLY
          - HANDBILL
          - CUSTOM
          - GENERAL
      example:
        - MEMBERS_ONLY
        - HANDBILL
    promotions-handbillVariantPrintout:
      type: object
      description: Details for printing the coupon
      nullable: true
      required:
        - template
      properties:
        template:
          type: string
          description: Template in [Pug format](https://pugjs.org/api/getting-started.html). The template can contain references to variables in the definition of the promotion, for example `promotion.name`, `promotion.tags[1]`. You can also use the [Moment.js library](https://momentjs.com/). The `#{}` elements allow you to insert JS code with the scope limited to `promotion`, `moment`, and `JSON`.
          example: "|#{promotion.name};#{promotion.discountType == 'EXACT_PRICE' ? 'Price':'Discount'} #{promotion.discountValue} #{promotion.discountType == 'PERCENT'? '%' : 'USD'};Valid for;#{moment.utc(coupon.createdAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')} - #{moment.utc(coupon.lastingAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!"
        maxLineLength:
          type: integer
          description: Maximum number of characters to print on a line
          example: 18
        newLineDelimiter:
          type: string
          description: Line delimiter
          example: ;
    promotions-handbillVariantActivity:
      type: object
      nullable: true
      description: Defines how long the handbill promotions remain assigned to the profile after the handbill is generated.
      properties:
        lastingType:
          type: string
          description: Type of handbill expiration.
          default: RELATIVE
          enum:
            - RELATIVE
            - CRON
        lasting:
          type: object
          description: Defines a time period. Required if lastingType is `RELATIVE`.
          required:
            - value
            - unit
          properties:
            unit:
              description: The time unit
              enum:
                - HOURS
                - DAYS
            value:
              type: integer
              example: 24
              description: The amount of time units
        cronWeekdays:
          type: array
          description: 'Used when `"lastingType": "CRON"`. Array of week days when the handbill promotions expire'
          items:
            type: number
            description: Day of the week in crontab notation (0 is Sunday, 6 is Saturday)
          example:
            - 0
            - 1
            - 6
        cronTime:
          type: string
          description: 'Used when `"lastingType": "CRON"`. Clock time in UTC when the handbill promotions expire, in HH:MM format.'
          example: 12:34
        lastingAt:
          type: string
          format: date-time
          description: 'Used when `"lastingType": "RELATIVE"`. Time when the handbill expires.'
        timeExclusions:
          type: object
          nullable: true
          required:
            - uuid
          properties:
            uuid:
              type: string
              format: uuid
              example: 6a177f3e-748f-44d4-ac30-a457a5199685
    promotions-handbillVariantLimits:
      type: object
      nullable: true
      description: Daily redemption limits of this variant
      properties:
        limitPerDay:
          type: integer
          description: The maximum number of times each profile can redeem this handbill in a single day
          example: 6
          deprecated: true
        limitExceptions:
          type: array
          description: Days of the week when the limits are different
          nullable: true
          items:
            type: object
            required:
              - dayOfWeek
              - limitPerDay
            properties:
              dayOfWeek:
                type: integer
                description: Day of the week when the exception applies. "1" is Monday.
                minimum: 1
                maximum: 7
                example: 5
              limitPerDay:
                type: integer
                example: 8
                description: The maximum number of times each profile can redeem this promotion in the day defined for this exception.
        limitsPerBasket:
          type: array
          description: The minimum basket limits that should be met
          nullable: true
          items:
            type: object
            required:
              - basketSize
              - basketValue
              - condition
            properties:
              basketSize:
                type: integer
                description: Minimum basket size
                minimum: 0
                example: 12
              basketValue:
                type: number
                description: Minimum basket value
                minimum: 0
                example: 30.5
              condition:
                type: string
                description: Condition if minimum values should be conjunction or alternative
                enum:
                  - AND
                  - OR
        limitExclusion:
          type: array
          description: Items that should not be taken into consideration while calculating basket value and size
          nullable: true
          items:
            type: object
            required:
              - catalogId
            properties:
              catalogId:
                type: number
                description: Catalog that the products and/or filters belong to
                example: 22424
              products:
                type: array
                description: Products that should be excluded
                nullable: true
                items:
                  type: string
                  description: Product reference
                  example: UGG-BB-PUR-06
              filters:
                type: array
                description: Filter ids of products that should be excluded
                nullable: true
                items:
                  type: string
                  description: Filter ids
                  example: 7c1fbdf6-dd27-11ea-87d0-0242ac130003
    promotions-handbillConfigCreateRequest:
      type: object
      required:
        - channel
        - status
        - name
        - description
        - controlGroup
        - variants
      properties:
        channel:
          $ref: "#/components/schemas/promotions-handbillChannel"
        status:
          $ref: "#/components/schemas/promotions-handbillStatus"
        name:
          $ref: "#/components/schemas/promotions-handbillName"
        description:
          $ref: "#/components/schemas/promotions-handbillDescription"
        controlGroup:
          $ref: "#/components/schemas/promotions-handbillControlGroup"
        variants:
          $ref: "#/components/schemas/promotions-handbillVariants"
    promotions-handbillConfigUpdateRequest:
      type: object
      properties:
        channel:
          $ref: "#/components/schemas/promotions-handbillChannel"
        status:
          $ref: "#/components/schemas/promotions-handbillStatus"
        name:
          $ref: "#/components/schemas/promotions-handbillName"
        description:
          $ref: "#/components/schemas/promotions-handbillDescription"
        controlGroup:
          $ref: "#/components/schemas/promotions-handbillControlGroup"
        variants:
          $ref: "#/components/schemas/promotions-handbillVariants"
    promotions-promotionsSettingsBody:
      type: object
      properties:
        checkoutSettings:
          $ref: "#/components/schemas/promotions-checkoutSettings"
        enableCodeGeneration:
          $ref: "#/components/schemas/promotions-enableCodeGeneration"
        codePrefix:
          $ref: "#/components/schemas/promotions-codePrefix"
        blockTag:
          $ref: "#/components/schemas/promotions-blockTag"
        expression:
          $ref: "#/components/schemas/promotions-expression"
        promotionListSettings:
          $ref: "#/components/schemas/promotions-promotionListSettings"
        promotionAssignmentSettings:
          $ref: "#/components/schemas/promotions-promotionAssignmentSettings"
        restorePointsOnProfileDeactivation:
          $ref: "#/components/schemas/promotions-restorePointsOnProfileDeactivation"
        allowRedeemCompletionWhenBlocked:
          $ref: "#/components/schemas/promotions-allowRedeemCompletionWhenBlocked"
        saleSettings:
          $ref: "#/components/schemas/promotions-saleSettings"
        lockSettings:
          $ref: "#/components/schemas/promotions-lockSettings"
        transferSettings:
          $ref: "#/components/schemas/promotions-transferSettings"
        cashbackSettings:
          $ref: "#/components/schemas/promotions-cashbackSettings"
    promotions-transferSettings:
      type: array
      maxItems: 1
      description: Settings for point transfers
      items:
        type: object
        properties:
          expression:
            $ref: "#/components/schemas/promotions-pointsExpression"
          recipient:
            $ref: "#/components/schemas/promotions-pointsRecipient"
          sender:
            $ref: "#/components/schemas/promotions-pointsSender"
    promotions-pointsSender:
      type: object
      description: Point sender settings
      properties:
        segments:
          $ref: "#/components/schemas/promotions-pointsSenderSegments"
    promotions-pointsSenderSegments:
      type: array
      nullable: true
      description: IDs of the Profile segmentations that can participate in point transfers as senders
      items:
        type: string
    promotions-pointsRecipient:
      type: object
      description: Point recipient settings
      properties:
        segments:
          $ref: "#/components/schemas/promotions-pointsRecipientSegments"
    promotions-pointsRecipientSegments:
      type: array
      nullable: true
      description: IDs of the Profile segmentations that can participate in point transfers as recipients
      items:
        type: string
    promotions-pointsExpression:
      type: string
      format: uuid
      nullable: true
      description: UUID of expression that defines how the points should be calculated when evaluating sender points balance
      example: 2395fc33-f2f0-420c-8e7b-0ac63c3454de
    promotions-lockSettings:
      type: object
      nullable: true
      description: Settings for locks
      required:
        - lockPromotionRequestByIdentifier
      properties:
        promotionRequestedLockTtl:
          $ref: "#/components/schemas/promotions-promotionRequestedLockTtl"
        processSalePromotionActivationLockWaitTime:
          $ref: "#/components/schemas/promotions-processSalePromotionActivationLockWaitTime"
        lockPromotionRequestByIdentifier:
          $ref: "#/components/schemas/promotions-lockPromotionRequestByIdentifier"
    promotions-lockPromotionRequestByIdentifier:
      type: boolean
      description: Indicates if POS should provide the `lockIdentifier`, which puts a lock on promotion fetching the promotion list. This identifier can be sent when using the [Get Profile promotions by a custom filter](#operation/GetClientPromotionsByACustomFilter) endpoint.
      nullable: false
    promotions-processSalePromotionActivationLockWaitTime:
      type: number
      description: The time in seconds that the system will wait and retry to acquire a promotion activation lock during the process sale operation.
      nullable: true
      default: null
    promotions-promotionRequestedLockTtl:
      type: number
      description: The time in seconds for which promotion deactivation will be blocked after a POS request.
      nullable: true
      default: null
    promotions-saleSettings:
      type: object
      nullable: true
      description: Settings for sales
      properties:
        discountSourceType:
          $ref: "#/components/schemas/promotions-discountSourceType"
        clientIdCardType:
          $ref: "#/components/schemas/promotions-clientIdCardType"
        handbillCheckout:
          $ref: "#/components/schemas/promotions-handbillCheckout"
        priceValueBaseStrategy:
          $ref: "#/components/schemas/promotions-priceValueBaseStrategy"
        combineBasketDiscounts:
          $ref: "#/components/schemas/promotions-combineBasketDiscounts"
        discountOrder:
          $ref: "#/components/schemas/promotions-discountOrder"
        returnFields:
          $ref: "#/components/schemas/promotions-returnFields"
    promotions-returnFields:
      type: array
      items:
        type: string
      description: An array of promotion fields which should be returned in the Process Basket endpoints in the `transactionItems.grantedDiscounts` object.
    promotions-discountOrder:
      type: object
      description: Discount order settings
      properties:
        strategy:
          $ref: "#/components/schemas/promotions-discountOrderStrategy"
        direction:
          $ref: "#/components/schemas/promotions-discountOrderDirection"
    promotions-discountOrderDirection:
      type: string
      description: Direction of the discount order within the strategy selected in `strategy`.
      default: desc
      enum:
        - asc
        - desc
    promotions-discountOrderStrategy:
      type: string
      description: The strategy defines the order of applying discounts. The direction is set in `direction`.
      default: DISCOUNT_VALUE
      enum:
        - DISCOUNT_VALUE
        - PRIORITY
    promotions-combineBasketDiscounts:
      type: boolean
      description: If `true`, basket discounts are combined.
      default: false
    promotions-priceValueBaseStrategy:
      type: string
      default: MUTABLE
      description: |
        
        This strategy defines how basket discount values are calculated in the Process Basket endpoints.

        - If the CONSTANT strategy is chosen, the discounts are always calculated based on the evidPrice of the item.
        - If the MUTABLE strategy is chosen, the price of an item is updated after each promotion assignment and it is treated as a base for calculating the discounts that follow.

        **Example:** One basket with two promotions (20%, 30%) and one item with a price of 1.00.

        - When the CONSTANT strategy is chosen, the discounts are always subtracted from evidPrice=1.00, so the effective discounts are 0.20 and 0.30. The final price is 0.50.
        - When the MUTABLE strategy is chosen, the discounts are calculated using the updated item price, so applying them in order (20%, 30%) is done in the following way:
          1. `20% of 1.00 = 0.20, *updated price* = 0.80`
          2. `30% of *updated price* = 30% * 0.80 = 0.24`
          3. The final price is `1.00 - 0.20 - 0.24 = 0.56`

          To define the order of applying promotions, use the `discountOrder` object.
      enum:
        - CONSTANT
        - MUTABLE
    promotions-handbillCheckout:
      type: string
      format: uuid
      nullable: true
      description: UUID of the Handbill which is used to generate promotions in the Process Checkout endpoints
    promotions-clientIdCardType:
      type: integer
      nullable: true
      description: The type of card which is used for extracting profile identification data
      example: 0
    promotions-discountSourceType:
      type: integer
      nullable: true
      description: The type which is assigned to discounts to differentiate which ones come from Synerise when using the Process Basket/Checkout endpoints.
      example: 0
    promotions-allowRedeemCompletionWhenBlocked:
      type: boolean
      description: When set to `true`, the profile can complete the redemption of promotions that had been activated before a lock was put on that profile.
      nullable: true
      default: false
    promotions-restorePointsOnProfileDeactivation:
      type: boolean
      description: When set to `true` and you use the method which [deactivates all promotions for a profile](#operation/deactivateAllPromotions), the points taken for activation of the promotion will be restored.
      nullable: true
      default: true
    promotions-promotionAssignmentSettings:
      type: object
      nullable: true
      description: Filter for promotions in [`/promotion/get-for-client/{identifierType}/{identifierValue}/handbill/{handbillUuid}`](#operation/getAssignHandbillForClient_GET) method
      allOf:
        - $ref: "#/components/schemas/promotions-promotionsListFilter"
    promotions-promotionsListFilter:
      type: object
      properties:
        setFieldsValues:
          $ref: "#/components/schemas/promotions-promotionListLimitSetValues"
        where:
          $ref: "#/components/schemas/promotions-promotionListWhere"
        fields:
          $ref: "#/components/schemas/promotions-promotionListFields"
        sort:
          $ref: "#/components/schemas/promotions-promotionListSort"
        page:
          $ref: "#/components/schemas/promotions-promotionListPage"
        limit:
          $ref: "#/components/schemas/promotions-promotionListLimit"
    promotions-promotionListLimit:
      type: number
      description: The number of items to return per page
    promotions-promotionListPage:
      type: number
      description: Page number to return for pagination. The first page has the index `1`.
    promotions-promotionListSort:
      type: object
      nullable: true
      description: Promotion sorting settings
      properties:
        forDBQuery:
          type: array
          description: Sorting options for database queries (sort all promotions matched by the filter)
          items:
            type: object
            properties:
              field:
                type: string
                description: Field name to sort by
                enum:
                  - headerName
                  - name
                  - code
                  - startAt
                  - createdAt
                  - updatedAt
                  - expireAt
                  - requireRedeemedPoints
                  - type
                  - priority
                  - status
              direction:
                type: string
                description: Sorting direction
                enum:
                  - asc
                  - desc
        forPaginator:
          type: string
          description: Sorting options for paginator result (sort only a chunk received from the database)
          enum:
            - DISCOUNT_VALUE
            - PRIORITY
    promotions-promotionListFields:
      type: array
      description: Fields to be returned in the promotion object
      nullable: true
      items:
        type: string
    promotions-promotionListWhere:
      type: object
      description: Promotion filter
      properties:
        excludeIds:
          type: array
          description: IDs of promotions to exclude from the list
          nullable: true
          items:
            type: integer
            example: 3
        handbillPromotionIds:
          type: array
          description: Handbill promotion IDs to include
          nullable: true
          items:
            type: integer
            example: 3
        visibilityStatus:
          type: array
          description: Filter by visibility status
          nullable: true
          items:
            $ref: "#/components/schemas/promotions-promotionVisibility"
        status:
          $ref: "#/components/schemas/promotions-promotionStatusArray"
        statusByType:
          type: object
          description: Filter by a combination of promotion type and status
          properties:
            GENERAL:
              $ref: "#/components/schemas/promotions-promotionStatusArray"
            CUSTOM:
              $ref: "#/components/schemas/promotions-promotionStatusArray"
            MEMBERS_ONLY:
              $ref: "#/components/schemas/promotions-promotionStatusArray"
            HANDBILL:
              $ref: "#/components/schemas/promotions-promotionStatusArray"
        target:
          $ref: "#/components/schemas/promotions-promotionTargetArray"
        targetByType:
          type: object
          description: Filter by a combination of promotion type and target
          properties:
            GENERAL:
              $ref: "#/components/schemas/promotions-promotionTargetArray"
            CUSTOM:
              $ref: "#/components/schemas/promotions-promotionTargetArray"
            MEMBERS_ONLY:
              $ref: "#/components/schemas/promotions-promotionTargetArray"
            HANDBILL:
              $ref: "#/components/schemas/promotions-promotionTargetArray"
        type:
          type: array
          description: Filter by promotion type
          nullable: true
          items:
            $ref: "#/components/schemas/promotions-promotionType"
        presentOnly:
          $ref: "#/components/schemas/promotions-promotionPresentOnly"
        lastingOnly:
          $ref: "#/components/schemas/promotions-promotionLastingOnly"
        displayableOnly:
          $ref: "#/components/schemas/promotions-promotionDisplayableOnly"
        checkExistsInTarget:
          $ref: "#/components/schemas/promotions-promotionCheckExistsInTarget"
        tagNames:
          $ref: "#/components/schemas/promotions-promotionTagArray"
    promotions-promotionTagArray:
      type: array
      description: Promotion filter by promotion tags
      nullable: true
      items:
        type: string
    promotions-promotionCheckExistsInTarget:
      nullable: true
      type: boolean
      default: true
      description: When set to `true`, the profile must exist within the target segmentation.
    promotions-promotionDisplayableOnly:
      description: When set to `true`, filters to promotions that are currently configured to be displayed (by `displayFrom` and `displayTo` dates).
      type: boolean
      nullable: true
      default: true
    promotions-promotionLastingOnly:
      description: When set to `true`, filters to promotions that are currently active and those that were not yet activated.
      type: boolean
      nullable: true
      default: true
    promotions-promotionPresentOnly:
      description: When set to `false`, expired promotions are included in the response.
      type: boolean
      nullable: true
      default: true
    promotions-promotionTargetArray:
      type: array
      description: Promotion filter by target type
      nullable: true
      items:
        $ref: "#/components/schemas/promotions-promotionTargetType"
    promotions-promotionStatusArray:
      type: array
      description: Promotion filter by assignment status
      nullable: true
      items:
        $ref: "#/components/schemas/promotions-assignmentStatus"
    promotions-promotionListLimitSetValues:
      type: object
      deprecated: true
      description: Set values on promotions when returning list to profile
    promotions-promotionListSettings:
      type: object
      nullable: true
      description: Filter for promotions in [`/promotion/get-for-client-by-custom-settings/{identifierType}/{identifierValue}`](#operation/GetClientPromotionsByACustomFilter) method
      allOf:
        - $ref: "#/components/schemas/promotions-promotionsListFilter"
    promotions-expression:
      type: string
      nullable: true
      format: uuid
      description: Expression UUID which will be used to count the balance of loyalty points in the promotion activation endpoint.
    promotions-blockTag:
      type: string
      description: Tag name which marks a profile as blocked. Blocked profiles do not receive promotions in POS methods and are not allowed to activate new promotions.
      nullable: true
      example: BLOCKED
    promotions-codePrefix:
      type: string
      description: Prefix which will be added to promotion code, when `enableCodeGeneration` is set to true
      nullable: true
      example: SYN
    promotions-enableCodeGeneration:
      type: boolean
      description: Flag which indicates if promotion code should be generated as ordinal number prefixed with prefix defined in `codePrefix`
      nullable: true
      example: true
    promotions-checkoutSettings:
      type: object
      description: Handbill checkout settings
      nullable: true
      properties:
        handbillUuidsForCheckout:
          $ref: "#/components/schemas/promotions-handbillUuidsForCheckout"
        codeGeneration:
          $ref: "#/components/schemas/promotions-codeGeneration"
    promotions-codeGeneration:
      type: object
      description: Checkout code generation options
      nullable: true
      properties:
        prefix:
          type: string
          description: Prefix added to each code
        length:
          type: integer
          default: 36
          description: Length of the random code to generate
        crc:
          type: boolean
          description: When `true`, a CRC string is added to the end of the code
    promotions-handbillUuidsForCheckout:
      type: array
      description: Handbill UUIDs to use for checkout couponing
      nullable: true
      items:
        type: string
        format: uuid
    promotions-createLockRes:
      type: object
      properties:
        callback:
          type: string
          description: URI to call for lock release
    promotions-releaseLockRes:
      type: object
      properties:
        message:
          type: string
          example: Lock release succeeded
    promotions-LockNotFoundErrorV1:
      description: Lock not found
      properties:
        message:
          $ref: "#/components/schemas/promotions-ResponseErrorMessage"
      example:
        message: Lock not found
    promotions-ClientPointsLockErrorV2:
      allOf:
        - $ref: "#/components/schemas/promotions-GenericErrorV2Schema"
        - description: Profile points are locked. Waiting for releasing lock for the profile
          example:
            errorCode: PRO-016
            httpStatus: 423
            message: Profile points are locked. Waiting for releasing lock for the profile.
            timestamp: 2020-10-05T10:59:21.000Z
            traceId: 8705651679b203e7
    promotions-GenericErrorV2Schema:
      type: object
      description: Details of an error
      properties:
        timestamp:
          $ref: "#/components/schemas/promotions-ErrorV2Timestamp"
        traceId:
          $ref: "#/components/schemas/promotions-ErrorV2TraceId"
        errorCode:
          $ref: "#/components/schemas/promotions-ErrorV2Code"
        message:
          $ref: "#/components/schemas/promotions-ErrorV2Message"
        httpStatus:
          $ref: "#/components/schemas/promotions-ErrorV2HttpStatus"
    promotions-ErrorV2TraceId:
      type: string
      description: TraceId of the request which resulted in the error
      example: 8705651679b203e7
    promotions-ErrorV2Timestamp:
      type: string
      format: date-time
      description: Date and time when the error occurred
      example: 2020-10-05T10:59:21.000Z
    promotions-ClientNotFoundError:
      allOf:
        - $ref: "#/components/schemas/promotions-GenericErrorV2Schema"
        - description: Profile not found
          example:
            errorCode: CLI-001
            httpStatus: 404
            message: Profile not found
            timestamp: 2020-10-05T10:59:21.000Z
            traceId: 8705651679b203e7
    promotions-InvalidDataErrorV2:
      allOf:
        - $ref: "#/components/schemas/promotions-GenericErrorV2Schema"
        - description: Details of a body validation error
          properties:
            errors:
              type: array
              items:
                type: object
                description: Details of a validation error
                properties:
                  errorCode:
                    $ref: "#/components/schemas/promotions-ErrorV2Message"
                  source:
                    $ref: "#/components/schemas/promotions-ErrorV2InvalidBodySource"
          example:
            errorCode: ERR-042
            httpStatus: 400
            message: Invalid data
            timestamp: 2020-10-05T10:59:21.000Z
            traceId: 8705651679b203e7
    promotions-ErrorV2InvalidBodySource:
      type: object
      properties:
        pointer:
          description: JSON pointer to the object which was source of the error
          example: /exampleKey
    promotions-ClientPointsRecipientNotInSegmentError:
      allOf:
        - $ref: "#/components/schemas/promotions-GenericErrorV2Schema"
        - description: Point recipient is not in required segmentation
          example:
            errorCode: PRO-035
            httpStatus: 422
            message: Point recipient is not in required segmentation
            timestamp: 2020-10-05T10:59:21.000Z
            traceId: 8705651679b203e7
    promotions-ClientPointsSenderNotInSegmentError:
      allOf:
        - $ref: "#/components/schemas/promotions-GenericErrorV2Schema"
        - description: Point sender is not in the required segmentation
          example:
            errorCode: PRO-034
            httpStatus: 422
            message: Point sender is not in the required segmentation
            timestamp: 2020-10-05T10:59:21.000Z
            traceId: 8705651679b203e7
    promotions-ClientNotHaveRequiredPointsError:
      allOf:
        - $ref: "#/components/schemas/promotions-GenericErrorV2Schema"
        - description: Profile does not have the required number of points
          example:
            errorCode: PRO-015
            httpStatus: 422
            message: Profile does not have the required number of points
            timestamp: 2020-10-05T10:59:21.000Z
            traceId: 8705651679b203e7
    promotions-senderName:
      description: Name of the points sender
      type: string
    promotions-recipientName:
      description: Name of the points recipient
      type: string
    schema-service-ErrorSchemaService:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        errorCode:
          type: string
          description: |
            Code of the error, needed for troubleshooting

            See error reference: [https://developers.synerise.com/errors.html](https://developers.synerise.com/errors.html)
        status:
          type: integer
          description: Error's HTTP status code
        message:
          type: string
          description: Description of the problem
    schema-service-AuthError:
      type: object
      properties:
        timestamp:
          type: string
          description: Time when the error occurred
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
        status:
          type: integer
          format: int32
          description: HTTP status code
    schema-service-GenerateResponse:
      type: object
      required:
        - id
        - hash
        - priority
        - name
        - createdAt
        - updatedAt
        - audience
        - data
        - path
      properties:
        id:
          $ref: "#/components/schemas/schema-service-screenViewId"
        hash:
          $ref: "#/components/schemas/schema-service-screenViewId"
        priority:
          $ref: "#/components/schemas/schema-service-screenViewPriority"
        name:
          $ref: "#/components/schemas/schema-service-screenViewName"
        createdAt:
          $ref: "#/components/schemas/schema-service-CreatedAt"
        updatedAt:
          $ref: "#/components/schemas/schema-service-UpdatedAt"
        audience:
          $ref: "#/components/schemas/schema-service-Audience"
        data:
          type: object
          description: The JSON structure of the screen view, with inserts processed
          properties:
            collection:
              type: array
              description: By default, the `collection` property exists in each screen view, unless the default content was overwritten. This property's value is the output of the `{% screenviewcollection %}` insert. If you moved the insert into a different position in the JSON structure, its result (the array) will be stored at the position where you placed the insert (you can modify the screen definition so that the insert is under a key different than `collection`).
              items:
                $ref: "#/components/schemas/schema-service-DocumentGenerateResponse"
          additionalProperties:
            description: Other JSON entities included in the screen view's JSON structure.
        path:
          type: string
          description: Address of the screen view definition
          example: /v2/screen-views/f9215cb9-4a7e-410b-88cb-8bc40363cc10
    schema-service-DocumentGenerateResponse:
      type: object
      description: Processed document
      required:
        - id
        - slug
        - schema
        - content
      properties:
        uuid:
          $ref: "#/components/schemas/schema-service-DocumentId"
        slug:
          $ref: "#/components/schemas/schema-service-DocumentSlug"
        schema:
          $ref: "#/components/schemas/schema-service-DocumentSchema"
        content:
          $ref: "#/components/schemas/schema-service-documentContentProcessed"
    schema-service-documentContentProcessed:
      description: Content of the document
      anyOf:
        - type: object
          description: The processed JSON content of the document
          additionalProperties:
            description: JSON keys in the document and their values
          example:
            someBoolean: true
            someString: Lorem ipsum
            aNestedDocument:
              uuid: 772d94f7-a604-409a-bfa9-24a64b8a5051
              slug: apple
              schema: fruit
              content:
                color: red
        - type: string
          description: Processed string value of a document (for example, a small document which only includes an insert to return an expression result)
    schema-service-DocumentSchema:
      type: string
      description: Schema of the document (called "Type" in the Synerise Web Application)
      example: containers
    schema-service-DocumentSlug:
      type: string
      description: Slug of the document
      example: basket
      pattern: "[a-z0-9]+(?:-[a-z0-9]+)*"
    schema-service-DocumentId:
      type: string
      format: uuid
      description: UUID of the document
    schema-service-Audience:
      type: object
      description: The profiles (clients) which have access to this resource
      required:
        - targetType
      properties:
        targetType:
          type: string
          description: |
            The method of defining the audience:
            - SEGMENT sets the audience to segmentations whose UUIDs are provided in `segments`
            - QUERY sets the audience to an analytics query provided in `query`
            - ALL sets the audience to all profiles in the database
          enum:
            - SEGMENT
            - QUERY
            - ALL
        segments:
          type: array
          description: "An array of segmentation IDs. Used with `targetType: SEGMENT`"
          items:
            type: string
        query:
          type: string
          description: "Stringified `analysis` object for the segmentation analytics engine. Used with `targetType: QUERY`. Refer to the [Analytics API Reference](https://developers.synerise.com/#operation/addSegmentationPOST_v2)."
          example: '{"analysis":{"title":"Unnamed segmentation","description":"","unique":true,"segments":[{"title":"Segmentation A","description":"","filter":{"matching":true,"expressions":[{"_id":"a9b76c8e-34bd-4ac3-be8f-f37041d126bd","name":"","type":"FUNNEL","matching":true,"funnel":{"_id":"5c759d73-49c6-409f-96a3-b569dff8f8ff","title":"Unnamed","completedWithin":null,"dateFilter":{"type":"RELATIVE","offset":{"type":"DAYS","value":0},"duration":{"type":"DAYS","value":30}},"steps":[{"_id":"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff","title":"","action":{"id":944,"name":"page.visit"},"eventName":"page.visit","expressions":[]}],"exact":false}}]}}]}}'
    schema-service-UpdatedAt:
      type: string
      format: date-time
      description: Last update time
    schema-service-CreatedAt:
      type: string
      description: Creation date
      format: date-time
    schema-service-screenViewName:
      type: string
      description: Name of the screen view
    schema-service-screenViewPriority:
      type: integer
      description: Priority determines which screen view to show to a customer if their profile matches the conditions of more than one screen view. `1` is the highest priority.
      default: 99
    schema-service-screenViewId:
      type: string
      format: uuid
      description: UUID of the screen view
    schema-service-additionalPropertiesForGenerate:
      description: |
        If you are generating the resource with a context that doesn't have the data for inserts in the resource (for example, a document has a `{% customer param %}` insert, but you're authenticated with a workspace JWT, so the customer context can't be extracted from the JWT), you can include the parameters in the request body. If an insert can't be processed, the returned content is empty.

        **Usage example**: if the `{% customer firstName %}` insert is used in a document, you can pass its value by sending `"customer.firstName": "Joe"`

        Because inserts are always encapsulated with quotation marks, inserts that return a number or a boolean value return it as a string.
      anyOf:
        - type: string
        - type: number
    schema-service-screenView:
      type: object
      required:
        - id
        - businessProfileId
        - name
        - status
        - priority
        - scheduled
        - author
        - content
        - audience
        - createdAt
        - updatedAt
        - directory
        - feed
      properties:
        id:
          $ref: "#/components/schemas/schema-service-screenViewId"
        businessProfileId:
          $ref: "#/components/schemas/schema-service-screenViewBpId"
        name:
          $ref: "#/components/schemas/schema-service-screenViewName"
        description:
          $ref: "#/components/schemas/schema-service-screenViewDescription"
        status:
          $ref: "#/components/schemas/schema-service-screenViewStatus"
        priority:
          $ref: "#/components/schemas/schema-service-screenViewPriority"
        scheduled:
          $ref: "#/components/schemas/schema-service-screenViewScheduled"
        author:
          $ref: "#/components/schemas/schema-service-screenViewAuthor"
        content:
          $ref: "#/components/schemas/schema-service-ScreenViewContent"
        audience:
          $ref: "#/components/schemas/schema-service-Audience"
        createdAt:
          $ref: "#/components/schemas/schema-service-CreatedAt"
        updatedAt:
          $ref: "#/components/schemas/schema-service-UpdatedAt"
        deletedAt:
          $ref: "#/components/schemas/schema-service-DeletedAt"
        directory:
          $ref: "#/components/schemas/schema-service-Directory"
        feed:
          $ref: "#/components/schemas/schema-service-Feed"
    schema-service-Feed:
      type: object
      description: Feeds are used to group screen views, similar to document groups.
      required:
        - id
        - slug
        - name
        - createdAt
        - default
      properties:
        id:
          type: string
          format: uuid
          description: UUID of the screen view feed
        slug:
          $ref: "#/components/schemas/schema-service-FeedSlug"
        name:
          $ref: "#/components/schemas/schema-service-FeedName"
        createdAt:
          $ref: "#/components/schemas/schema-service-CreatedAt"
        default:
          type: boolean
          description: Informs if this is the default screen view feed
    schema-service-FeedName:
      type: string
      description: Name of the screen view feed
    schema-service-FeedSlug:
      type: string
      description: Unique slug of the screen view feed
    schema-service-Directory:
      type: object
      description: Details of the directory where the resource is assigned
      required:
        - id
        - name
        - createdAt
        - default
      properties:
        id:
          $ref: "#/components/schemas/schema-service-directoryId"
        name:
          $ref: "#/components/schemas/schema-service-DirectoryName"
        createdAt:
          type: string
          format: date-time
          description: Date and time when the directory was created
        default:
          type: boolean
          description: "`true` if this is the default directory"
    schema-service-DirectoryName:
      type: string
      description: Name of the directory
    schema-service-directoryId:
      type: string
      format: uuid
      description: |
        UUID of a directory. Directories can be used to organize documents and screen views for display in the Synerise Web Application.
        - If you want to organize documents for screen view campaigns, use document groups instead.
        - If you want to organize screen views for display, use screen view feeds instead.
    schema-service-DeletedAt:
      type: string
      format: date-time
      description: Deletion time, if applicable
      nullable: true
    schema-service-ScreenViewContent:
      type: object
      title: With document groups
      description: Content of the screen view
      required:
        - json
        - documents
        - groups
      properties:
        json:
          $ref: "#/components/schemas/schema-service-ScreenViewJsonContent"
        documents:
          type: array
          description: An array of [documents](https://help.synerise.com/docs/assets/documents/introduction-to-documents/). If `groups` is used, this array must be empty.
          items:
            type: string
        data:
          type: array
          description: An array of documents or Brickworks records
          items:
            oneOf:
              - $ref: "#/components/schemas/schema-service-DocumentSlugAsObject"
              - $ref: "#/components/schemas/schema-service-BrickworksRecord"
        groups:
          type: array
          description: An array of [document groups](https://help.synerise.com/docs/assets/documents/introduction-to-documents/), If `documents` is used, this array must be empty.
          items:
            $ref: "#/components/schemas/schema-service-DocumentGroupId"
        groupsOrder:
          type: boolean
          default: false
          description: By default, group are ordered for display by their priority. When this field is set to `true`, they are displayed according to their order in the `groups` array instead.
    schema-service-DocumentGroupId:
      type: string
      format: uuid
      example: 43c97b25-4a10-45d0-99b7-d472eea2bb24
      description: UUID of the group
    schema-service-BrickworksRecord:
      type: object
      description: Object represents brickworks record id.
      required:
        - schemaId
        - objectId
      properties:
        schemaId:
          type: string
          format: uuid
        objectId:
          type: string
    schema-service-DocumentSlugAsObject:
      type: object
      required:
        - slug
      properties:
        slug:
          type: string
          description: Slug of the document
          example: basket
          pattern: "[a-z0-9]+(?:-[a-z0-9]+)*"
    schema-service-ScreenViewJsonContent:
      type: object
      description: |
        JSON structure of the screen view. By default, a newly created screen view has the following `json` value:

        ```
        "collection": "{% screenviewcollection %}"
        ```
        The `{% screenviewcollection %}` insert is used to pick and display the documents from the documents in `documents` or `groups`.

        If this insert is not used, you must manually insert each document with `{% document slug%}`.
      additionalProperties:
        $ref: "#/components/schemas/schema-service-anyProp"
    schema-service-anyProp:
      description: Any JSON entity or entities
    schema-service-screenViewAuthor:
      type: object
      description: Information about the user who created this screen view
      required:
        - id
      properties:
        id:
          type: integer
          description: ID of the user
        name:
          type: string
          description: Name of the user
        avatar:
          type: string
          description: URL of the author's avatar image
    schema-service-screenViewScheduled:
      type: boolean
      description: Informs if the screen view has a defined schedule. Screen views scheduled to be published immediately after activation are considered to be scheduled, so only a draft screen view can have this property at `false`. Copied screen views inherit the schedule of their source.
    schema-service-screenViewStatus:
      type: string
      enum:
        - DRAFT
        - ACTIVE
        - SCHEDULED
        - PAUSED
        - FINISHED
      description: |
        Status of the screen view

        - DRAFT: a screen view that is a work in progress, not complete for activation
        - ACTIVE: a screen view that can be displayed to customers
        - SCHEDULED: a screen view scheduled to activate later
        - PAUSED: a screen view that is temporarily stopped and cannot be displayed
        - FINISHED: a screen view that is stopped and cannot be displayed
    schema-service-screenViewDescription:
      type: string
      description: Description of the screen view
    schema-service-screenViewBpId:
      type: integer
      description: ID of the workspace where this screen view is saved
    schema-service-CreateScreenViewRequest:
      type: object
      required:
        - priority
        - directoryId
        - content
        - audience
        - feedId
      properties:
        priority:
          $ref: "#/components/schemas/schema-service-screenViewPriority"
        name:
          $ref: "#/components/schemas/schema-service-screenViewName"
        directoryId:
          $ref: "#/components/schemas/schema-service-directoryId"
        content:
          $ref: "#/components/schemas/schema-service-ScreenViewContent"
        audience:
          $ref: "#/components/schemas/schema-service-Audience"
        schedule:
          $ref: "#/components/schemas/schema-service-EntrySchedule"
        feedId:
          $ref: "#/components/schemas/schema-service-feedId"
    schema-service-feedId:
      type: string
      format: uuid
      description: UUID of the feed where this screen view is assigned.
    schema-service-EntrySchedule:
      type: object
      description: Configuration of the schedule
      properties:
        enabled:
          type: boolean
          description: Defines if the schedule configuration is enabled. A schedule must be enabled in order to become active at the selected time.
        endDate:
          type: string
          format: date-time
          description: Time when the schedule stops being active. If `endType` is NEVER, this field is null.
          nullable: true
        endType:
          type: string
          description: |
            - NEVER: schedule never becomes inactive.

            - DATE: schedule becomes inactive at the time set by `endDate`.
          enum:
            - NEVER
            - DATE
        parts:
          type: array
          description: |
            
            An array of time rules that allow more granularity. All objects must match the period type set in `periodType` (for example, you **cannot mix** weekly and monthly conditions). 

            If `periodType` is ENTIRE, this array is empty.
          items:
            $ref: "#/components/schemas/schema-service-EntryScheduleRepeatPart"
        periodType:
          type: string
          description: |
            Defines when the schedule applies within its activity period.

            - ENTIRE: schedule is applied at all time since it becomes active until it becomes inactive.


            - WEEKLY: schedule is applied at specified days of the week (and optionally at specific times during those days)

            - MONTHLY: schedule is applied at specified days of the month (and optionally at specific times during those days)
          enum:
            - ENTIRE
            - WEEKLY
            - MONTHLY
        startDate:
          type: string
          format: date-time
          description: Time when the schedule becomes active. If `startType` is NOW, this field is null.
        startType:
          type: string
          enum:
            - NOW
            - SCHEDULED
        timezone:
          type: string
          example: Europe/Warsaw
          description: Time zone according to the [tz database](https://en.wikipedia.org/wiki/Tz_database)
    schema-service-EntryScheduleRepeatPart:
      type: object
      properties:
        startDay:
          type: integer
          format: int32
          example: 1
          description: |
            If `periodType` is:


            - WEEKLY, the values are 1-7 (1 is Monday).

            - MONTHLY, the values are 1-31 (days of the month).

            **Note:**<br/>
            If you want to define two time rules for a day (for example, the schedule is active on Monday at 06:00-07:00 and 15:00-16:00), create a separate object for each time period in the `parts` array.
        startTime:
          type: string
          example: 08:18:03
          description: The hour when the schedule becomes active.
        endDay:
          type: integer
          format: int32
          example: 1
          description: Must be identical to `startDay`.
        endTime:
          type: string
          example: 44283
          description: The hour when the schedule becomes inactive.
    schema-service-CreateRequest:
      type: object
      properties:
        name:
          type: string
          description: If no name is provided, defaults to "Unnamed document" or Screen View Campaign" (depending on what you are initializing).
        directory:
          type: string
          format: uuid
          description: If no directory is provided, the default directory is used.
    schema-service-standardApiResponse:
      type: object
      required:
        - status
        - body
      properties:
        status:
          type: string
          description: Status of the request
        body:
          type: string
          description: Additional information, if applicable.
    schema-service-identifierValue:
      type: string
      description: Value of the profile identifier selected in `identifierType` (profile ID is sent as a string)
    schema-service-ScreenViewFeed:
      type: object
      required:
        - name
        - slug
      properties:
        slug:
          $ref: "#/components/schemas/schema-service-FeedSlug"
        name:
          $ref: "#/components/schemas/schema-service-FeedName"
    schema-service-ScreenViewsListResponse:
      type: object
      required:
        - meta
        - data
      properties:
        meta:
          $ref: "#/components/schemas/schema-service-Meta"
        data:
          type: array
          description: Array of analytics
          items:
            oneOf:
              - $ref: "#/components/schemas/schema-service-screenView"
    schema-service-Meta:
      type: object
      description: Pagination metadata
      properties:
        links:
          type: array
          description: Links to the neighboring pages and the first page
          items:
            $ref: "#/components/schemas/schema-service-Link"
        limit:
          type: integer
          format: int32
          description: Limit of items per page
        count:
          type: number
          nullable: true
          description: Currently unused
    schema-service-Link:
      type: object
      required:
        - url
        - rel
      properties:
        url:
          type: string
          description: URL of the page, used for navigation
        rel:
          type: string
          description: The type of relation to the current page. `first` is always the first page.
          enum:
            - first
            - prev
            - next
    schema-service-screenViewMetadata:
      type: object
      description: Data of the screen view
      properties:
        id:
          $ref: "#/components/schemas/schema-service-screenViewId"
        version:
          $ref: "#/components/schemas/schema-service-screenViewVersion"
        status:
          $ref: "#/components/schemas/schema-service-screenViewStatus"
        hash:
          $ref: "#/components/schemas/schema-service-hashId"
        parentVersion:
          $ref: "#/components/schemas/schema-service-screenViewParentVersion"
        authorId:
          type: string
          description: ID of the user who created the screen view
        businessProfileId:
          $ref: "#/components/schemas/schema-service-screenViewBpId"
        priority:
          $ref: "#/components/schemas/schema-service-screenViewPriority"
        name:
          $ref: "#/components/schemas/schema-service-screenViewName"
        description:
          $ref: "#/components/schemas/schema-service-screenViewDescription"
        isActive:
          $ref: "#/components/schemas/schema-service-screenViewActive"
        createdAt:
          $ref: "#/components/schemas/schema-service-CreatedAt"
        updatedAt:
          $ref: "#/components/schemas/schema-service-UpdatedAt"
        deletedAt:
          $ref: "#/components/schemas/schema-service-DeletedAt"
    schema-service-screenViewActive:
      type: boolean
      description: Defines if the screen view is active.
    schema-service-screenViewParentVersion:
      type: string
      description: If the current was created from another version, this is is the UUID of the parent version.
    schema-service-hashId:
      type: string
      description: Hash ID of the version. Consists of the UUID of the screen view and and the version ID.
      example: bb6639b2-a98e-49d9-804f-ed6c0e2a0d2f:2019-12-05T08:22:10.094
    schema-service-screenViewVersion:
      type: string
      description: Version of the screen view
    schema-service-GraphObject:
      type: object
      required:
        - id
        - type
        - children
      properties:
        id:
          type: string
          description: UUID of the screen view or document
        type:
          type: string
          description: Type of the entity
          enum:
            - document
            - screenview
        name:
          type: string
          description: Name of the screen view or document (not slug)
        children:
          type: array
          description: Screen views or documents that refer to this entity
          items:
            $ref: "#/components/schemas/schema-service-GraphObject"
    schema-service-NewDirectory:
      type: object
      required:
        - name
      properties:
        name:
          $ref: "#/components/schemas/schema-service-DirectoryName"
    schema-service-DocumentMetadata:
      type: object
      description: Data of the document
      required:
        - docId
        - name
        - status
        - scheduled
        - authorId
        - directoryId
      properties:
        docId:
          $ref: "#/components/schemas/schema-service-DocumentId"
        name:
          $ref: "#/components/schemas/schema-service-DocumentName"
        status:
          $ref: "#/components/schemas/schema-service-DocumentStatus"
        authorId:
          type: integer
          format: int64
          description: ID of the user who created the document
        directoryId:
          type: string
          format: uuid
          description: UUID of the directory where the document is saved
        scheduled:
          $ref: "#/components/schemas/schema-service-DocumentScheduled"
        createdAt:
          $ref: "#/components/schemas/schema-service-CreatedAt"
        updatedAt:
          $ref: "#/components/schemas/schema-service-UpdatedAt"
        deletedAt:
          $ref: "#/components/schemas/schema-service-DeletedAt"
    schema-service-DocumentScheduled:
      type: boolean
      description: Informs if the document has a defined schedule. Documents scheduled to be published immediately after activation are considered to be scheduled, so only a draft document can have this property at `false`. Copied documents inherit the schedule of their source document.
    schema-service-DocumentStatus:
      type: string
      enum:
        - DRAFT
        - ACTIVE
        - SCHEDULED
        - PAUSED
        - FINISHED
      description: Filter by status
    schema-service-DocumentName:
      type: string
      description: Name of the document
    schema-service-SchedulerResponse:
      type: object
      description: Details of the schedule
      properties:
        active:
          type: boolean
          description: "`true` if the conditions of the schedule match the current time. This is not related to document/screen view status."
        externalId:
          $ref: "#/components/schemas/schema-service-ScheduleExternalId"
        type:
          $ref: "#/components/schemas/schema-service-ScheduleType"
        finished:
          type: boolean
          description: "`true` if the conditions of the schedule mean it ended in the past. This is not related to document/screen view status."
        schedule:
          $ref: "#/components/schemas/schema-service-EntrySchedule"
    schema-service-ScheduleType:
      type: string
      description: Type of the scheduled object
      enum:
        - SCREENVIEW
        - DOCUMENT
    schema-service-ScheduleExternalId:
      type: string
      format: uuid
      description: UUID of the screen view or document that the schedule applies to
    schema-service-SchedulerRequest:
      type: object
      description: Schedule object
      properties:
        externalId:
          $ref: "#/components/schemas/schema-service-ScheduleExternalId"
        type:
          $ref: "#/components/schemas/schema-service-ScheduleType"
        schedule:
          $ref: "#/components/schemas/schema-service-EntrySchedule"
    schema-service-paginatedScreenViews:
      type: object
      required:
        - data
        - pagination
      properties:
        data:
          type: array
          description: A page of screen views
          items:
            $ref: "#/components/schemas/schema-service-screenView"
        pagination:
          $ref: "#/components/schemas/schema-service-pagination"
    schema-service-pagination:
      type: object
      description: Pagination metadata
      required:
        - limit
        - page
        - pages
        - total
      properties:
        limit:
          type: integer
          description: The number of items per page
        page:
          type: integer
          description: The current page
        pages:
          type: integer
          description: The total number of pages
        total:
          type: integer
          description: The total number of items on all pages
    schema-service-screenViewLegacy:
      type: object
      required:
        - id
        - businessProfileId
        - name
        - status
        - priority
        - scheduled
        - author
        - content
        - audience
        - createdAt
        - updatedAt
        - directory
        - feed
      properties:
        id:
          $ref: "#/components/schemas/schema-service-screenViewId"
        version:
          $ref: "#/components/schemas/schema-service-screenViewVersion"
        parentVersion:
          $ref: "#/components/schemas/schema-service-screenViewParentVersion"
        businessProfileId:
          $ref: "#/components/schemas/schema-service-screenViewBpId"
        name:
          $ref: "#/components/schemas/schema-service-screenViewName"
        description:
          $ref: "#/components/schemas/schema-service-screenViewDescription"
        status:
          $ref: "#/components/schemas/schema-service-screenViewStatus"
        priority:
          $ref: "#/components/schemas/schema-service-screenViewPriority"
        scheduled:
          $ref: "#/components/schemas/schema-service-screenViewScheduled"
        author:
          $ref: "#/components/schemas/schema-service-screenViewAuthor"
        content:
          $ref: "#/components/schemas/schema-service-ScreenViewContentLegacy"
        audience:
          $ref: "#/components/schemas/schema-service-Audience"
        createdAt:
          $ref: "#/components/schemas/schema-service-CreatedAt"
        updatedAt:
          $ref: "#/components/schemas/schema-service-UpdatedAt"
        deletedAt:
          $ref: "#/components/schemas/schema-service-DeletedAt"
        directory:
          $ref: "#/components/schemas/schema-service-Directory"
        feed:
          $ref: "#/components/schemas/schema-service-Feed"
    schema-service-ScreenViewContentLegacy:
      type: object
      description: Content of the screen view. It's possible to create a screen view without any documents (`documents` and `groups` arrays are both empty in that case).
      required:
        - json
        - documents
        - groups
      properties:
        json:
          $ref: "#/components/schemas/schema-service-ScreenViewJsonContent"
        documents:
          type: array
          minItems: 0
          description: An array of [documents](https://help.synerise.com/docs/assets/documents/introduction-to-documents/). If `groups` is used or the SV contains no documents, this array must be empty.
          items:
            $ref: "#/components/schemas/schema-service-documentId"
        groups:
          type: array
          minItems: 0
          description: An array of [document groups](https://help.synerise.com/docs/assets/documents/introduction-to-documents/). If `documents` is used or the SV contains no documents, this array must be empty.
          items:
            $ref: "#/components/schemas/schema-service-DocumentGroupId"
        groupsOrder:
          type: boolean
          default: false
          description: By default, group are ordered for display by their priority. When this field is set to `true`, they are displayed according to their order in the `groups` array instead.
    schema-service-documentId:
      type: object
      required:
        - slug
      properties:
        slug:
          type: string
          description: Slug of the document
        version:
          type: string
          description: Version of the document
    schema-service-versionsOfScreenView:
      type: object
      properties:
        draft:
          $ref: "#/components/schemas/schema-service-screenViewMetadata"
        currentlyPublished:
          $ref: "#/components/schemas/schema-service-screenViewMetadata"
        previouslyPublished:
          $ref: "#/components/schemas/schema-service-paginatedScreenViewMetadata"
    schema-service-paginatedScreenViewMetadata:
      type: object
      description: Paginated list of previously published screen views
      required:
        - data
        - pagination
      properties:
        data:
          type: array
          description: A page of screen views
          items:
            $ref: "#/components/schemas/schema-service-screenViewMetadata"
        pagination:
          $ref: "#/components/schemas/schema-service-pagination"
    schema-service-GenerateScreenViewResponse:
      type: object
      required:
        - id
        - version
        - hash
        - businessProfileId
        - name
        - priority
        - audience
        - createdAt
        - updatedAt
        - path
        - data
      properties:
        id:
          $ref: "#/components/schemas/schema-service-screenViewId"
        version:
          $ref: "#/components/schemas/schema-service-screenViewVersion"
        parentVersion:
          $ref: "#/components/schemas/schema-service-screenViewParentVersion"
        name:
          $ref: "#/components/schemas/schema-service-screenViewName"
        priority:
          $ref: "#/components/schemas/schema-service-screenViewPriority"
        audience:
          $ref: "#/components/schemas/schema-service-Audience"
        createdAt:
          $ref: "#/components/schemas/schema-service-CreatedAt"
        updatedAt:
          $ref: "#/components/schemas/schema-service-UpdatedAt"
        hash:
          $ref: "#/components/schemas/schema-service-hashId"
        path:
          $ref: "#/components/schemas/schema-service-path"
        data:
          type: object
    schema-service-path:
      type: string
      description: Url Path.
      example: /screenView
    schema-service-versionedScreenViewKey:
      type: object
      properties:
        screenViewId:
          $ref: "#/components/schemas/schema-service-screenViewId"
        screenViewVersion:
          $ref: "#/components/schemas/schema-service-screenViewVersion"
    schema-service-publishRequest:
      type: object
      required:
        - overwrite
      properties:
        overwrite:
          description: Currently unused
          type: boolean
    vouchers-voucherResponseMessage:
      required:
        - message
      type: object
      properties:
        message:
          type: string
          description: Details of the response
    vouchers-data:
      required:
        - uuid
        - poolUuid
        - createdAt
        - updatedAt
      type: object
      description: Details of the voucher
      properties:
        uuid:
          type: string
          description: UUID of the voucher
        poolUuid:
          $ref: "#/components/schemas/vouchers-inBodyPoolUuid"
        clientId:
          $ref: "#/components/schemas/vouchers-inBodyClientId"
        createdAt:
          type: string
          format: date-time
          description: Time when the voucher was created
        updatedAt:
          type: string
          format: date-time
          description: Time when the voucher was last updated
    vouchers-inBodyClientId:
      type: integer
      description: ID of the Profile
    vouchers-inBodyPoolUuid:
      type: string
      description: UUID of the voucher pool
      example: faec32b0-c343-4362-ba32-c6148c649da4
    vouchers-voucherActionRequestAsClientReq:
      required:
        - poolUuid
      type: object
      properties:
        poolUuid:
          $ref: "#/components/schemas/vouchers-inBodyPoolUuid"
        clientUuid:
          $ref: "#/components/schemas/vouchers-deprecatedInBodyClientUuid"
    vouchers-deprecatedInBodyClientUuid:
      deprecated: true
      type: string
      nullable: true
      description: UUID of the Profile. This field is ignored.
      example: 17243772-008a-42e1-ba37-c3807cebde8f
    vouchers-vouchersDataList:
      type: object
      properties:
        data:
          type: array
          description: An array of vouchers
          items:
            $ref: "#/components/schemas/vouchers-voucherData"
    vouchers-voucherData:
      required:
        - poolUuid
      type: object
      properties:
        poolUuid:
          $ref: "#/components/schemas/vouchers-inBodyPoolUuid"
        clientUuid:
          $ref: "#/components/schemas/vouchers-inBodyClientUuid"
        clientId:
          $ref: "#/components/schemas/vouchers-inBodyClientId"
        code:
          $ref: "#/components/schemas/vouchers-voucherCode"
        expireIn:
          $ref: "#/components/schemas/vouchers-expireIn"
        redeemAt:
          $ref: "#/components/schemas/vouchers-redeemAt"
        assignedAt:
          $ref: "#/components/schemas/vouchers-assignedAt"
        status:
          $ref: "#/components/schemas/vouchers-voucherStatus"
        createdAt:
          $ref: "#/components/schemas/vouchers-createdAt"
        updatedAt:
          $ref: "#/components/schemas/vouchers-updatedAt"
    vouchers-updatedAt:
      type: string
      format: date-time
      description: Time when the voucher was last updated.
    vouchers-createdAt:
      type: string
      format: date-time
      description: Time when the voucher was created.
    vouchers-voucherStatus:
      type: string
      description: Voucher status
      enum:
        - ASSIGNED
        - UNASSIGNED
        - REDEEMED
        - CANCELED
      example: ASSIGNED
    vouchers-assignedAt:
      type: string
      format: date-time
      description: Time when the voucher was assigned. Defaults to current time when assigning.
      nullable: true
    vouchers-redeemAt:
      type: string
      format: date-time
      description: Time when the voucher was redeemed. Defaults to current time when redeeming.
      nullable: true
    vouchers-expireIn:
      type: string
      format: date-time
      description: Date when the voucher expires.
      nullable: true
    vouchers-voucherCode:
      type: string
      description: |
        Voucher code
        Must match the pattern: `^.{0,36}$`
      example: code123
      nullable: true
    vouchers-inBodyClientUuid:
      type: string
      description: UUID of the Profile
      example: 07243772-008a-42e1-ba37-c3807cebde8f
    vouchers-getOrAssignAndGetVoucherDataRes:
      type: object
      description: Details of the voucher
      properties:
        code:
          $ref: "#/components/schemas/vouchers-voucherCode"
        expireIn:
          $ref: "#/components/schemas/vouchers-expireIn"
        redeemAt:
          $ref: "#/components/schemas/vouchers-redeemAt"
        assignedAt:
          $ref: "#/components/schemas/vouchers-assignedAt"
        createdAt:
          $ref: "#/components/schemas/vouchers-createdAt"
        updatedAt:
          $ref: "#/components/schemas/vouchers-updatedAt"
    vouchers-voucher-HTTP400Res:
      required:
        - message
        - error
      type: object
      properties:
        message:
          type: string
          description: Description of the problem
          example: Out of scope. Pool is empty.
        error:
          type: array
          items:
            $ref: "#/components/schemas/vouchers-errorObj"
          description: Details of the problem
    vouchers-errorObj:
      type: object
      properties:
        field:
          type: string
          description: Name of the field that cause the problem (if applicable)
          example: code
        message:
          type: string
          example: code must be unique
          description: Details of the problem
        validatorKey:
          type: string
          example: not_unique
          description: System ID of the problem (if applicable)
    vouchers-bulkCreateResponse:
      properties:
        message:
          type: string
          default: Create object with success
        data:
          type: object
          properties:
            vouchersCreated:
              type: integer
              description: Number of created vouchers
              example: 3
            duplicatedCodes:
              type: array
              items:
                type: string
                example: code123
              description: Codes which are duplicated (already exists for given workspace) and was ignored while creating vouchers
    vouchers-bulkCreateVouchersReq:
      required:
        - poolUuid
        - codeList
      type: object
      properties:
        poolUuid:
          $ref: "#/components/schemas/vouchers-inBodyPoolUuid"
        codeList:
          type: string
          description: A list of unique voucher codes, separated by semicolons
          example: 3845734682364756454534;384574634564545456;567868678345234346748
    vouchers-listVouchersSuccessRes:
      required:
        - data
      type: object
      properties:
        data:
          type: array
          description: An array of vouchers
          items:
            $ref: "#/components/schemas/vouchers-voucherData"
        meta:
          $ref: "#/components/schemas/vouchers-paginationMeta"
    vouchers-paginationMeta:
      type: object
      description: Optional metadata
      properties:
        link:
          type: array
          description: Links to other pages
          items:
            type: object
            description: Link to another page on the list
            properties:
              rel:
                type: string
                enum:
                  - first
                  - last
                  - next
                  - prev
                description: The type of relationship to the current page
              url:
                type: string
                description: The URL of the page
        totalCount:
          type: integer
          description: The total number of items on all pages
        totalPages:
          type: integer
          description: The total number of pages
        page:
          type: integer
          description: The current page
        limit:
          type: integer
          description: The number of items per page
        code:
          type: integer
          description: HTTP code
    vouchers-voucherActionRequestAsProfileReq:
      required:
        - poolUuid
        - clientUuid
      type: object
      properties:
        poolUuid:
          $ref: "#/components/schemas/vouchers-inBodyPoolUuid"
        clientUuid:
          $ref: "#/components/schemas/vouchers-inBodyClientUuid"
    vouchers-voucherActionRequestByClientIdentifierAsProfileReq:
      required:
        - poolUuid
        - clientIdentifierValue
      type: object
      properties:
        poolUuid:
          $ref: "#/components/schemas/vouchers-inBodyPoolUuid"
        clientIdentifierValue:
          $ref: "#/components/schemas/vouchers-inBodyClientIdentifierValue"
    vouchers-inBodyClientIdentifierValue:
      description: Value of the profile identifier. For example `clientIdentifierValue=custom_identify_1234`
      oneOf:
        - type: string
          maxLength: 100
          example: custom_identify_1234
        - type: integer
          format: int64
          maxLength: 100
          example: 1234
    vouchers-voucherDataRedeemed:
      type: object
      properties:
        poolUuid:
          $ref: "#/components/schemas/vouchers-inBodyPoolUuid"
        clientUuid:
          $ref: "#/components/schemas/vouchers-inBodyClientUuid"
        clientId:
          $ref: "#/components/schemas/vouchers-inBodyClientId"
        code:
          $ref: "#/components/schemas/vouchers-voucherCode"
        expireIn:
          $ref: "#/components/schemas/vouchers-expireIn"
        redeemAt:
          $ref: "#/components/schemas/vouchers-redeemAt"
        assignedAt:
          $ref: "#/components/schemas/vouchers-assignedAt"
        status:
          $ref: "#/components/schemas/vouchers-voucherRedeemedStatus"
        createdAt:
          $ref: "#/components/schemas/vouchers-createdAt"
        updatedAt:
          $ref: "#/components/schemas/vouchers-updatedAt"
    vouchers-voucherRedeemedStatus:
      type: string
      default: REDEEMED
    vouchers-voucherRedeemReq:
      required:
        - code
      type: object
      properties:
        code:
          type: string
          description: |
            Voucher code
            Must match the pattern: `^.{0,36}$`
          example: code123
          nullable: false
    vouchers-poolData:
      type: object
      description: Voucher pool details
      properties:
        uuid:
          $ref: "#/components/schemas/vouchers-poolUuid"
        name:
          $ref: "#/components/schemas/vouchers-poolName"
        barcodeType:
          $ref: "#/components/schemas/vouchers-poolBarcodeType"
        description:
          $ref: "#/components/schemas/vouchers-poolDescription"
        voucherPrefix:
          $ref: "#/components/schemas/vouchers-voucherPrefix"
        poolLimit:
          $ref: "#/components/schemas/vouchers-poolLimit"
        redeemedLimitPerClient:
          $ref: "#/components/schemas/vouchers-redeemedLimitPerClient"
        startAt:
          $ref: "#/components/schemas/vouchers-poolStartAt"
        expireIn:
          $ref: "#/components/schemas/vouchers-poolExpireIn"
        lastingTime:
          $ref: "#/components/schemas/vouchers-lastingTime"
        userId:
          $ref: "#/components/schemas/vouchers-userId"
        assignedCount:
          $ref: "#/components/schemas/vouchers-assignedCount"
        activeCount:
          $ref: "#/components/schemas/vouchers-activeCount"
        countAt:
          $ref: "#/components/schemas/vouchers-countAt"
    vouchers-countAt:
      type: string
      format: date-time
      description: Time when the pool starts functioning. Defaults to current time.
    vouchers-activeCount:
      type: integer
      format: int32
      description: Number of active vouchers. **To refresh the counter, use [this endpoint](#operation/getVouchersCount).**
    vouchers-assignedCount:
      type: integer
      format: int32
      description: Number of assigned vouchers. **To refresh the counter, use [this endpoint](#operation/getVouchersCount).**
    vouchers-userId:
      type: integer
      format: int32
      description: ID of the User who created the pool
    vouchers-lastingTime:
      type: integer
      format: int32
      description: Lasting time of the voucher
    vouchers-poolExpireIn:
      type: string
      format: date-time
      description: Time when the pool stops functioning. Defaults to current time. Must be later than `startAt`.
    vouchers-poolStartAt:
      type: string
      format: date-time
      description: Time when the pool starts functioning. Defaults to current time.
    vouchers-redeemedLimitPerClient:
      type: integer
      default: 0
      description: Maximum number of times that one Profile can retrieve a voucher from this pool
    vouchers-poolLimit:
      type: integer
      default: 0
      description: Maximum number of vouchers to store in the pool
    vouchers-voucherPrefix:
      type: string
      default: "0"
      description: A prefix added to each voucher in the pool
    vouchers-poolDescription:
      type: string
      description: A description of the pool
    vouchers-poolBarcodeType:
      type: string
      description: The type of codes in the pool
      enum:
        - NONE
        - UPC
        - EAN-13
        - CODE-39
        - CODE-128
        - ISBN
        - ISSN
        - QR-CODE
      default: NONE
    vouchers-poolName:
      type: string
      description: Name of the voucher pool
    vouchers-poolUuid:
      type: string
      description: UUID of the voucher pool
      example: 8465c240-d38e-42f8-af29-b9fa1ed05115
    vouchers-createAVoucherPoolReq:
      required:
        - name
        - expireIn
      type: object
      properties:
        name:
          $ref: "#/components/schemas/vouchers-poolName"
        barcodeType:
          $ref: "#/components/schemas/vouchers-poolBarcodeType"
        description:
          $ref: "#/components/schemas/vouchers-poolDescription"
        voucherPrefix:
          $ref: "#/components/schemas/vouchers-voucherPrefix"
        poolLimit:
          $ref: "#/components/schemas/vouchers-poolLimit"
        redeemedLimitPerClient:
          $ref: "#/components/schemas/vouchers-redeemedLimitPerClient"
        startAt:
          $ref: "#/components/schemas/vouchers-poolStartAt"
    vouchers-poolDataRes:
      type: object
      properties:
        uuid:
          $ref: "#/components/schemas/vouchers-poolUuid"
        name:
          $ref: "#/components/schemas/vouchers-poolName"
        description:
          $ref: "#/components/schemas/vouchers-poolDescription"
        barcodeType:
          $ref: "#/components/schemas/vouchers-poolBarcodeType"
        voucherPrefix:
          $ref: "#/components/schemas/vouchers-voucherPrefix"
        poolLimit:
          $ref: "#/components/schemas/vouchers-poolLimit"
        redeemedLimitPerClient:
          $ref: "#/components/schemas/vouchers-redeemedLimitPerClient"
        startAt:
          $ref: "#/components/schemas/vouchers-poolStartAt"
        expireIn:
          $ref: "#/components/schemas/vouchers-poolExpireIn"
        userId:
          $ref: "#/components/schemas/vouchers-userId"
        assignedCount:
          $ref: "#/components/schemas/vouchers-assignedCount"
        activeCount:
          $ref: "#/components/schemas/vouchers-activeCount"
        countAt:
          $ref: "#/components/schemas/vouchers-countAt"
        lastingTime:
          $ref: "#/components/schemas/vouchers-lastingTime"
    vouchers-getVouchersCountRes:
      required:
        - data
      type: object
      properties:
        data:
          type: object
          properties:
            assignedCount:
              type: integer
              format: int32
              example: 130
              description: Number of assigned vouchers
            activeCount:
              type: integer
              format: int32
              example: 130
              description: Number of active vouchers
            countAt:
              type: string
              format: date-time
              description: Time when the calculation was made
  parameters:
    promotions-queryStoreIds:
      name: storeIds
      in: query
      description: Limits the response to data from particular stores, identified by IDs.
      required: false
      schema:
        type: string
      style: form
      explode: false
    promotions-queryIncludeVouchers:
      name: includeVouchers
      in: query
      schema:
        type: boolean
        example: false
        default: false
      description: |
        
        When `true`, promotion with defined vouchers will also have list of assigned vouchers.

        When `false`, vouchers will not be fetched.
    promotions-queryCheckGlobalActivationLimits:
      name: checkGlobalActivationLimits
      in: query
      description: Flag to indicate if global limits should be checked
      required: false
      style: form
      explode: false
      schema:
        type: boolean
        example: true
        default: true
    promotions-queryIncludeMeta:
      name: includeMeta
      in: query
      description: |
        
        When `true`, pagination metadata is included in the response body.

        When `false`, the data is included in the response headers:

        - Link: links to neighbors, first, and last pages in pagination.

        - X-Pagination-Total-Count: total number of items on all pages

        - X-Pagination-Total-Pages: total number of pages

        - X-Pagination-Page: current page

        - X-Pagination-Limit: maximum number of items on a page
      required: false
      schema:
        type: boolean
        example: false
        default: false
    promotions-queryPage:
      name: page
      in: query
      description: Page number to return for pagination. The first page has the index `1`.
      required: false
      schema:
        type: integer
        format: int32
        example: 4
        default: 1
    promotions-queryLimit:
      name: limit
      in: query
      description: The number of items to return per page
      required: false
      schema:
        type: integer
        example: 100
        default: 100
        maximum: 1000
    promotions-queryTagNames:
      name: tagNames
      in: query
      description: Filter the response to promotions with a certain tag or tags
      required: false
      style: form
      explode: false
      schema:
        type: array
        items:
          type: string
    promotions-queryPromotionDisplayableOnly:
      name: displayableOnly
      in: query
      description: When set to `true`, promotions which are not currently active are included in response, according to date range defined in promotion fields `displayFrom` and `displayTo`.
      required: false
      style: form
      explode: false
      schema:
        type: boolean
        example: true
        default: false
    promotions-queryPromotionPresentOnly:
      name: presentOnly
      in: query
      description: |
        When set to:
        - `true`, the response includes only promotions that are currently active (startAt later than now or null, expireAt later than now or null)
        - `false`, the response includes the above and also promotions that are expired or will become active in the future.
      required: false
      style: form
      explode: false
      schema:
        type: boolean
        example: true
        default: true
    promotions-queryPromotionStatus:
      name: status
      in: query
      description: Filter by promotion status
      required: false
      style: form
      explode: false
      schema:
        type: array
        items:
          type: string
          enum:
            - ACTIVE
            - ASSIGNED
            - REDEEMED
    promotions-queryPromotionSort:
      name: sort
      in: query
      required: false
      description: |
        The sorting order of the response.


          You can sort by any combination of the following attributes:
          * `headerName`: promotion header name
          * `name`: promotion name
          * `code`: promotion code
          * `startAt`: time when the promotion starts
          * `createdAt`: time when the promotion was created
          * `updatedAt`: time when the promotion was last updated
          * `expireAt`: time when the promotion expires
          * `requireRedeemedPoints`: how many loyalty points are needed to redeem the promotion
          * `type`: type of the promotion
          * `priority`: priority of the promotion
          * `status` : status of the promotion for the Profile

          Additionally, you can add the following attributes:
          * `ai` : enables ai sorting, should be only combined with `status` sorting (direction of sorting is not needed)

          You can sort ascending (default) or descending by adding `asc` or `desc` after the parameter, separated by a comma.

          **Example**: `sort=requireRedeemedPoints&sort=expireAt,asc&sort=status,desc`
      style: form
      explode: true
      allowReserved: true
      schema:
        type: string
        example: requireRedeemedPoints,desc
    promotions-queryExcludeTag:
      name: excludeTags
      in: query
      description: Promotions with the tags included in this list will not be deactivated
      required: false
      style: form
      explode: false
      schema:
        type: array
        items:
          type: string
    promotions-queryLockPoints:
      name: lockPoints
      in: query
      description: Lock profile points during the deactivation process
      required: false
      style: form
      explode: false
      schema:
        type: boolean
        example: true
        default: true
    promotions-queryReturnCodes:
      name: returnCodes
      in: query
      description: Return deactivated codes
      required: false
      style: form
      explode: false
      schema:
        type: boolean
        example: true
        default: false
    promotions-pathIdentifierValue:
      name: identifierValue
      in: path
      description: The value of the selected identifier
      required: true
      schema:
        type: string
    promotions-pathClientIdentifierType:
      name: identifierType
      in: path
      description: |
        The Profile identifier to use for the request.

        `externalId` is known as `customId` or `custom_identify` in other Synerise services.
      required: true
      schema:
        type: string
        example: email
        enum:
          - email
          - phone
          - externalId
          - uuid
          - clientId
    promotions-queryPromotionUuids:
      in: query
      name: promotionUuids
      description: Filters the response data by a list of promotion UUIDs.
      required: false
      schema:
        type: string
        example: fc1ee5bf-ad97-47a8-a474-e1b6e755ff38,aabaed4e-4ee7-44d5-b079-445a017ec6fe
      style: form
      explode: true
    promotions-queryPromotionFields:
      name: fields
      in: query
      description: Return only specified promotion fields. If `fields` is not specified, all fields are returned.
      required: false
      style: form
      explode: false
      schema:
        example: uuid,requireRedeemedPoints,requireRedeemedPoints,possibleRedeems,status,currentRedeemedQuantity,lastingAt
        type: array
        items:
          type: string
          enum:
            - uuid
            - code
            - status
            - type
            - redeemLimitPerClient
            - redeemQuantityPerActivation
            - currentRedeemedQuantity
            - currentRedeemLimit
            - activationCounter
            - possibleRedeems
            - details
            - discountType
            - discountValue
            - discountMode
            - discountModeDetails
            - requireRedeemedPoints
            - name
            - headline
            - description
            - images
            - startAt
            - expireAt
            - displayFrom
            - displayTo
            - assignedAt
            - lastingTime
            - lastingAt
            - catalogIndexItems
            - params
            - price
            - priority
            - maxBasketValue
            - minBasketValue
            - itemScope
            - tags
            - handbillUuid
    promotions-queryLastingOnly:
      name: lastingOnly
      in: query
      description: When set to `true`, shows promotions/vouchers that are currently active and those that are still inactivated. (lastingAt set to null or lastingAt in future)
      required: false
      style: form
      explode: false
      schema:
        type: boolean
        example: true
        default: true
    promotions-pathPromoIdentifierType:
      name: identifierType
      in: path
      required: true
      description: The promotion identifier to use for the request
      schema:
        type: string
        enum:
          - uuid
          - code
    promotions-queryTargetByType:
      name: targetByType
      in: query
      description: A combination of target and type, for example `[SEGMENT]=ACTIVE`
      required: false
      style: form
      explode: true
      schema:
        type: string
        example: "[SEGMENT]=ACTIVE"
    promotions-queryQuery:
      in: query
      name: query
      description: A string to search for in the `headerName` parameter or fragment of UUID.
      schema:
        type: string
    promotions-queryOrder:
      in: query
      name: order
      description: Sorting order
      schema:
        type: string
        enum:
          - asc
          - desc
        default: asc
    promotions-queryOrderFieldName:
      in: query
      name: orderFieldName
      description: Name of the parameter used for sorting
      schema:
        type: string
        enum:
          - createdAt
          - headerName
          - code
          - startAt
          - expireAt
          - name
          - type
        default: createdAt
    promotions-queryStoreCatalog:
      name: storeCatalog
      in: query
      description: Limits the response to data from stores included in a catalog.
      required: false
      schema:
        type: string
    promotions-queryVisibilityStatus:
      name: visibilityStatus
      in: query
      description: Visibility status
      required: false
      style: form
      explode: true
      schema:
        type: array
        items:
          type: string
          enum:
            - DRAFT
            - PUBLISH
            - HIDDEN
    promotions-queryTarget:
      name: target
      in: query
      required: false
      description: The target of the promotion
      style: form
      explode: false
      schema:
        type: array
        items:
          type: string
          enum:
            - ALL
            - SEGMENT
          default: ALL
    promotions-queryPromotionType:
      name: type
      in: query
      description: Promotion type
      required: false
      style: form
      explode: false
      schema:
        type: array
        items:
          type: string
          enum:
            - GENERAL
            - CUSTOM
            - MEMBERS_ONLY
            - HANDBILL
    promotions-queryStatusByType:
      name: statusByType
      in: query
      description: A combination of status and type, for example `[CUSTOM]=ACTIVE`
      required: false
      style: form
      explode: true
      schema:
        type: string
        example: "[CUSTOM]=ACTIVE"
    promotions-queryLockIdentifier:
      name: lockIdentifier
      in: query
      schema:
        type: string
        example: 6561d87b-2697-46ad-8f9a-0550736b86e3
      description: |-
        Identifier of the lock which will be created with this request. The lock disables the profile's possibility to fetch promotion lists.

        This lock will be active until one of those conditions is met:

        - the TTL (configured with the [settings](#operation/endpointSettingsUpdateSettingsPUT) endpoint) expires.
        - it is removed using the [Release "promotion requested" lock](#operation/endpointLockReleasePromotionRequestedLockForClientPOST) endpoint.
        - a promotion is redeemed and this lock's identifier is provided with the redemption request.
    promotions-queryHandbillSort:
      name: sort
      in: query
      required: false
      description: |
        The sorting order of the response.


        You can sort by any combination of the following attributes:

        * `createdAt`: time when the configuration was created

        * `updatedAt`: time when the configuration was last updated


        You can sort ascending (default) or descending by adding `asc` or `desc` after the parameter, separated by a comma."
      style: form
      explode: true
      allowReserved: true
      schema:
        type: string
        example: createdAt,desc
    promotions-pathHandbillUuid:
      name: handbillUuid
      in: path
      required: true
      description: UUID of the handbill configuration
      schema:
        type: string
        format: uuid
    promotions-queryHandbillUuid:
      name: handbillUuid
      in: query
      required: true
      style: form
      schema:
        type: array
        description: An array of handbill configuration UUIDs
        items:
          type: string
    promotions-queryLockTtlSec:
      in: query
      name: lockTtlSec
      description: Lock duration in seconds
      schema:
        type: number
        default: 900
    promotions-pathLockIdentifier:
      name: lockIdentifier
      in: path
      description: Lock identifier
      required: true
      schema:
        type: string
        example: 2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119
    schema-service-pathFeedSlug:
      in: path
      name: feedSlug
      description: Slug of the screen view feed
      required: true
      schema:
        type: string
    schema-service-pathScreenViewId:
      name: screenViewId
      in: path
      required: true
      description: UUID of the screen view
      schema:
        type: string
        format: uuid
    schema-service-pathIdentifierType:
      in: path
      name: identifierType
      description: Type of the profile identifier. The value is sent in `identifierValue` in the request body.
      required: true
      schema:
        type: string
        enum:
          - id
          - uuid
          - email
          - custom_identify
    schema-service-queryFeedId:
      name: feedId
      in: query
      required: false
      schema:
        type: string
        format: uuid
        description: UUID of the screen view feed for filtering the results
    schema-service-queryStatus:
      name: status
      in: query
      required: false
      schema:
        type: string
        enum:
          - DRAFT
          - ACTIVE
          - SCHEDULED
          - PAUSED
          - FINISHED
        description: Filter by status
    schema-service-queryDirectoryId:
      name: directoryId
      in: query
      required: false
      description: UUID of the directory for filtering the results
      schema:
        type: string
        format: uuid
    schema-service-querySearch:
      name: search
      in: query
      required: false
      description: A string to search for in resource names
      schema:
        type: string
    schema-service-queryLimit:
      name: limit
      in: query
      required: false
      description: Limit of items per page
      schema:
        type: number
        format: int32
        default: 25
    schema-service-queryPage:
      name: page
      in: query
      required: false
      schema:
        type: number
        format: int32
        minimum: 1
        default: 1
    schema-service-pathDirectoryId:
      name: directoryId
      in: path
      required: true
      description: UUID of the directory
      schema:
        type: string
        format: uuid
    schema-service-pathFeedId:
      name: feedId
      in: path
      required: true
      description: UUID of a screen view feed
      schema:
        type: string
        format: uuid
    schema-service-QueryPageRequired:
      in: query
      name: page
      description: The number of the page to retrieve
      required: true
      schema:
        type: integer
    schema-service-QueryLimitRequired:
      in: query
      name: limit
      description: The maximum number of items to retrieve for pagination
      required: true
      schema:
        type: string
    schema-service-pathScreenViewVersion:
      name: screenViewVersion
      in: path
      required: true
      description: Version of the screen view
      schema:
        type: string
    vouchers-apiVersionHeader:
      name: Api-Version
      in: header
      required: true
      style: simple
      explode: false
      schema:
        type: string
        enum:
          - "4.4"
          - "4.2"
    vouchers-contentTypeHeader:
      name: Content-Type
      in: header
      required: true
      style: simple
      explode: false
      schema:
        type: string
        enum:
          - application/json
    vouchers-acceptHeader:
      name: Accept
      in: header
      required: true
      style: simple
      explode: false
      schema:
        type: string
        enum:
          - application/json
    vouchers-queryIncludeMeta:
      name: includeMeta
      in: query
      description: |
        
        When `true`, pagination metadata is included in the response body.

        When `false`, the data is included in the response headers:

        - Link: links to neighbors, first, and last pages in pagination.

        - X-Pagination-Total-Count: total number of items on all pages

        - X-Pagination-Total-Pages: total number of pages

        - X-Pagination-Page: current page

        - X-Pagination-Limit: maximum number of items on a page
      required: false
      schema:
        type: boolean
        example: false
        default: false
    vouchers-queryPage:
      name: page
      in: query
      description: Page number to return for pagination. The first page has the index `1`.
      required: false
      schema:
        type: integer
        format: int32
        example: 4
        default: 1
    vouchers-queryLimit:
      name: limit
      in: query
      description: The number of items to return per page
      required: false
      schema:
        type: integer
        format: int32
        example: 100
        default: 100
        maximum: 1000
    vouchers-pathVoucherUuid:
      name: voucherUuid
      in: path
      description: UUID of the voucher
      required: true
      schema:
        type: string
        example: 29392878-d43f-402e-8297-f63d465cf173
    vouchers-pathVoucherSearchValue:
      name: searchValue
      in: path
      description: The value to search for
      required: true
      schema:
        type: string
        example: 29392878-d43f-402e-8297-f63d465cf173
    vouchers-pathVoucherSearchKey:
      name: searchKey
      in: path
      description: The key type to search by
      required: true
      schema:
        type: string
        example: code
        enum:
          - code
          - uuid
    vouchers-pathClientUuid:
      name: clientUuid
      in: path
      description: UUID of the Profile
      required: true
      schema:
        type: string
        example: e9e6840b-b9d4-4c7b-8191-9c4f9e751c76
    vouchers-queryClientIdentifierValue:
      name: clientIdentifierValue
      in: query
      description: The value of the selected profile identifier
      required: true
      schema:
        type: string
      example: custom_identify_123456
    vouchers-queryClientIdentifierName:
      name: clientIdentifierName
      in: query
      description: The Profile identifier to use for the request.
      required: true
      schema:
        type: string
        enum:
          - id
          - uuid
          - email
          - custom_identify
      example: custom_identify
    vouchers-queryFilter:
      name: query
      in: query
      description: Filter by phrase in pool name.
      required: false
      schema:
        type: string
    vouchers-querySortingOrder:
      name: order
      in: query
      description: Sorting order. If you include this parameter, you **must** also send the `orderFieldName` parameter.
      required: false
      schema:
        type: string
        enum:
          - asc
          - desc
        default: asc
    vouchers-querySortFieldName:
      name: orderFieldName
      in: query
      description: Name of the parameter used for sorting. If you include this parameter, you **must** also send the `order` parameter.
      required: false
      schema:
        type: string
        enum:
          - name
          - poolLimit
          - startAt
          - expireIn
          - createdAt
        default: createdAt
    vouchers-pathPoolUuid:
      name: poolUuid
      in: path
      description: UUID of the voucher pool
      required: true
      style: simple
      explode: false
      schema:
        type: string
        example: 8465c240-d38e-42f8-af29-b9fa1ed05115
  responses:
    promotions-403:
      description: Forbidden
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                $ref: "#/components/schemas/promotions-ErrorCode"
              error:
                $ref: "#/components/schemas/promotions-ResponseError"
              message:
                $ref: "#/components/schemas/promotions-ResponseErrorMessage"
              timestamp:
                $ref: "#/components/schemas/promotions-ErrorTimestamp"
    promotions-401:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                $ref: "#/components/schemas/promotions-ErrorCode"
              error:
                $ref: "#/components/schemas/promotions-ResponseError"
              message:
                $ref: "#/components/schemas/promotions-ResponseErrorMessage"
              timestamp:
                $ref: "#/components/schemas/promotions-ErrorTimestamp"
    promotions-400:
      description: Request body invalid/malformed/missing elements
      content:
        application/json:
          schema:
            anyOf:
              - $ref: "#/components/schemas/promotions-ErrorObject"
              - type: object
                title: JSON structure issue
                properties:
                  message:
                    $ref: "#/components/schemas/promotions-ResponseError"
                  code:
                    type: string
                    description: String-type code of the error
    promotions-500:
      description: General error
    promotions-ProfilePromotionsBlockedError:
      description: Profile promotions blocked
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/promotions-ErrorObject"
    promotions-PromotionActivate422:
      description: Global Activation limit reached
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/promotions-ErrorObject"
    promotions-PromotionActivate412:
      description: Already activated/Already redeemed/Activation limit reached/Promotion not started/Promotion expired
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/promotions-ErrorObject"
    promotions-WaitingForProfileLockReleaseError:
      description: Waiting for profile lock release
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/promotions-ErrorObject"
    promotions-Promotion404:
      description: Profile, promotion, or related resource not found
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/promotions-ErrorObject"
    promotions-PromotionDeactivationForbiddenError:
      description: Promotion deactivation is forbidden due to promotion setup.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/promotions-ErrorObject"
    promotions-ClientNotFoundError:
      description: Profile not found
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/promotions-PromotionResponseMessage"
          example:
            message: Profile not found
    promotions-PromotionCreated:
      description: Promotion created
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Status of the operation
    promotions-PromotionUpdated:
      description: Promotion updated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Status of the operation
    promotions-VouchersRedeemedResponseWithErrors:
      description: Some vouchers couldn't be redeemed
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/promotions-VouchersListWithErrors"
    promotions-VouchersRedeemedResponse:
      description: Vouchers redeemed
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Status of the operation
              data:
                $ref: "#/components/schemas/promotions-VoucherList"
    promotions-PromotionImportBatchPartialError:
      description: Some items failed validation
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/promotions-PromotionImportBatchPartialErrorResponse"
    promotions-ProcessSale428:
      description: Property discountSourceType in sale settings is not defined
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/promotions-ErrorObject"
    promotions-LockAlreadyExistsError:
      description: Lock already exists
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/promotions-PromotionResponseMessage"
          example:
            message: Lock already exits
    promotions-ClientPointsLockErrorResponseV2:
      description: Profile points lock error
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/promotions-ClientPointsLockErrorV2"
    promotions-ClientNotFoundErrorResponseV2:
      description: Profile not found
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/promotions-ClientNotFoundError"
    promotions-InvalidDataErrorResponseV2:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/promotions-InvalidDataErrorV2"
    schema-service-404:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/schema-service-ErrorSchemaService"
    schema-service-403:
      description: Forbidden; insufficient permissions
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/schema-service-AuthError"
    schema-service-401:
      description: "Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc."
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/schema-service-AuthError"
    schema-service-genericError:
      description: See error message for details
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/schema-service-ErrorSchemaService"
